QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MarketModelCashRebate Class Reference

#include <cashrebate.hpp>

+ Inheritance diagram for MarketModelCashRebate:
+ Collaboration diagram for MarketModelCashRebate:

Public Member Functions

 MarketModelCashRebate (EvolutionDescription evolution, const std::vector< Time > &paymentTimes, Matrix amounts, Size numberOfProducts)
 
- Public Member Functions inherited from MarketModelMultiProduct
virtual ~MarketModelMultiProduct ()=default
 
virtual std::vector< SizesuggestedNumeraires () const =0
 
virtual const EvolutionDescriptionevolution () const =0
 
virtual std::vector< TimepossibleCashFlowTimes () const =0
 
virtual Size numberOfProducts () const =0
 
virtual Size maxNumberOfCashFlowsPerProductPerStep () const =0
 
virtual void reset ()=0
 during simulation put product at start of path More...
 
virtual bool nextTimeStep (const CurveState &currentState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< CashFlow > > &cashFlowsGenerated)=0
 return value indicates whether path is finished, TRUE means done More...
 
virtual std::unique_ptr< MarketModelMultiProductclone () const =0
 returns a newly-allocated copy of itself More...
 

MarketModelMultiProduct interface

EvolutionDescription evolution_
 
std::vector< TimepaymentTimes_
 
Matrix amounts_
 
Size numberOfProducts_
 
Size currentIndex_
 
std::vector< SizesuggestedNumeraires () const override
 
const EvolutionDescriptionevolution () const override
 
std::vector< TimepossibleCashFlowTimes () const override
 
Size numberOfProducts () const override
 
Size maxNumberOfCashFlowsPerProductPerStep () const override
 
void reset () override
 during simulation put product at start of path More...
 
bool nextTimeStep (const CurveState &currentState, std::vector< Size > &numberCashFlowsThisStep, std::vector< std::vector< CashFlow > > &cashFlowsGenerated) override
 return value indicates whether path is finished, TRUE means done More...
 
std::unique_ptr< MarketModelMultiProductclone () const override
 returns a newly-allocated copy of itself More...
 

Detailed Description

Class to model receipt of a fixed cash amount once. Product terminates immediately. Mainly useful as rebate received when another product is cancelled.

Definition at line 36 of file cashrebate.hpp.

Constructor & Destructor Documentation

◆ MarketModelCashRebate()

MarketModelCashRebate ( EvolutionDescription  evolution,
const std::vector< Time > &  paymentTimes,
Matrix  amounts,
Size  numberOfProducts 
)

Definition at line 26 of file cashrebate.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ suggestedNumeraires()

std::vector< Size > suggestedNumeraires ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 69 of file cashrebate.cpp.

◆ evolution()

const EvolutionDescription & evolution ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 74 of file cashrebate.cpp.

◆ possibleCashFlowTimes()

std::vector< Time > possibleCashFlowTimes ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 48 of file cashrebate.cpp.

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 53 of file cashrebate.cpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 58 of file cashrebate.cpp.

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelMultiProduct.

Definition at line 63 of file cashrebate.cpp.

◆ nextTimeStep()

bool nextTimeStep ( const CurveState currentState,
std::vector< Size > &  numberCashFlowsThisStep,
std::vector< std::vector< CashFlow > > &  cashFlowsGenerated 
)
overridevirtual

return value indicates whether path is finished, TRUE means done

Implements MarketModelMultiProduct.

Definition at line 80 of file cashrebate.cpp.

◆ clone()

std::unique_ptr< MarketModelMultiProduct > clone ( ) const
overridevirtual

returns a newly-allocated copy of itself

Implements MarketModelMultiProduct.

Definition at line 97 of file cashrebate.cpp.

Member Data Documentation

◆ evolution_

EvolutionDescription evolution_
private

Definition at line 57 of file cashrebate.hpp.

◆ paymentTimes_

std::vector<Time> paymentTimes_
private

Definition at line 58 of file cashrebate.hpp.

◆ amounts_

Matrix amounts_
private

Definition at line 59 of file cashrebate.hpp.

◆ numberOfProducts_

Size numberOfProducts_
private

Definition at line 60 of file cashrebate.hpp.

◆ currentIndex_

Size currentIndex_
private

Definition at line 62 of file cashrebate.hpp.