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
CallSpecifiedMultiProduct Class Reference

#include <callspecifiedmultiproduct.hpp>

+ Inheritance diagram for CallSpecifiedMultiProduct:
+ Collaboration diagram for CallSpecifiedMultiProduct:

Public Member Functions

 CallSpecifiedMultiProduct (const Clone< MarketModelMultiProduct > &underlying, const Clone< ExerciseStrategy< CurveState > > &, Clone< MarketModelMultiProduct > rebate=Clone< MarketModelMultiProduct >())
 
- 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

Clone< MarketModelMultiProductunderlying_
 
Clone< ExerciseStrategy< CurveState > > strategy_
 
Clone< MarketModelMultiProductrebate_
 
EvolutionDescription evolution_
 
std::vector< std::valarray< bool > > isPresent_
 
std::vector< TimecashFlowTimes_
 
Size rebateOffset_ = 0UL
 
bool wasCalled_ = false
 
std::vector< SizedummyCashFlowsThisStep_
 
std::vector< std::vector< CashFlow > > dummyCashFlowsGenerated_
 
Size currentIndex_ = 0UL
 
bool callable_ = true
 
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...
 
const MarketModelMultiProductunderlying () const
 
const ExerciseStrategy< CurveState > & strategy () const
 
const MarketModelMultiProductrebate () const
 
void enableCallability ()
 
void disableCallability ()
 

Detailed Description

Examples
MarketModels.cpp.

Definition at line 32 of file callspecifiedmultiproduct.hpp.

Constructor & Destructor Documentation

◆ CallSpecifiedMultiProduct()

Definition at line 27 of file callspecifiedmultiproduct.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ suggestedNumeraires()

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

Implements MarketModelMultiProduct.

Definition at line 84 of file callspecifiedmultiproduct.cpp.

◆ evolution()

const EvolutionDescription & evolution ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Examples
MarketModels.cpp.

Definition at line 89 of file callspecifiedmultiproduct.cpp.

◆ possibleCashFlowTimes()

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

Implements MarketModelMultiProduct.

Definition at line 95 of file callspecifiedmultiproduct.cpp.

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 100 of file callspecifiedmultiproduct.cpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelMultiProduct.

Definition at line 106 of file callspecifiedmultiproduct.cpp.

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelMultiProduct.

Definition at line 112 of file callspecifiedmultiproduct.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 122 of file callspecifiedmultiproduct.cpp.

+ Here is the call graph for this function:

◆ clone()

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

returns a newly-allocated copy of itself

Implements MarketModelMultiProduct.

Definition at line 171 of file callspecifiedmultiproduct.cpp.

◆ underlying()

const MarketModelMultiProduct & underlying ( ) const

Definition at line 177 of file callspecifiedmultiproduct.cpp.

+ Here is the caller graph for this function:

◆ strategy()

const ExerciseStrategy< CurveState > & strategy ( ) const

Definition at line 183 of file callspecifiedmultiproduct.cpp.

+ Here is the caller graph for this function:

◆ rebate()

const MarketModelMultiProduct & rebate ( ) const

Definition at line 189 of file callspecifiedmultiproduct.cpp.

◆ enableCallability()

void enableCallability ( )

Definition at line 194 of file callspecifiedmultiproduct.cpp.

◆ disableCallability()

void disableCallability ( )

Definition at line 199 of file callspecifiedmultiproduct.cpp.

Member Data Documentation

◆ underlying_

Clone<MarketModelMultiProduct> underlying_
private

Definition at line 57 of file callspecifiedmultiproduct.hpp.

◆ strategy_

Clone<ExerciseStrategy<CurveState> > strategy_
private

Definition at line 58 of file callspecifiedmultiproduct.hpp.

◆ rebate_

Clone<MarketModelMultiProduct> rebate_
private

Definition at line 59 of file callspecifiedmultiproduct.hpp.

◆ evolution_

EvolutionDescription evolution_
private

Definition at line 60 of file callspecifiedmultiproduct.hpp.

◆ isPresent_

std::vector<std::valarray<bool> > isPresent_
private

Definition at line 61 of file callspecifiedmultiproduct.hpp.

◆ cashFlowTimes_

std::vector<Time> cashFlowTimes_
private

Definition at line 62 of file callspecifiedmultiproduct.hpp.

◆ rebateOffset_

Size rebateOffset_ = 0UL
private

Definition at line 63 of file callspecifiedmultiproduct.hpp.

◆ wasCalled_

bool wasCalled_ = false
private

Definition at line 64 of file callspecifiedmultiproduct.hpp.

◆ dummyCashFlowsThisStep_

std::vector<Size> dummyCashFlowsThisStep_
private

Definition at line 65 of file callspecifiedmultiproduct.hpp.

◆ dummyCashFlowsGenerated_

std::vector<std::vector<CashFlow> > dummyCashFlowsGenerated_
private

Definition at line 66 of file callspecifiedmultiproduct.hpp.

◆ currentIndex_

Size currentIndex_ = 0UL
private

Definition at line 67 of file callspecifiedmultiproduct.hpp.

◆ callable_

bool callable_ = true
private

Definition at line 68 of file callspecifiedmultiproduct.hpp.