QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Composition of one or more market-model products. More...
#include <multiproductcomposite.hpp>
Public Member Functions | |
MarketModelMultiProduct interface | |
Size | numberOfProducts () const override |
Size | maxNumberOfCashFlowsPerProductPerStep () const override |
bool | nextTimeStep (const CurveState ¤tState, 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< MarketModelMultiProduct > | clone () const override |
returns a newly-allocated copy of itself More... | |
Public Member Functions inherited from MarketModelComposite | |
MarketModelComposite ()=default | |
const EvolutionDescription & | evolution () const override |
std::vector< Size > | suggestedNumeraires () const override |
std::vector< Time > | possibleCashFlowTimes () const override |
void | reset () override |
during simulation put product at start of path More... | |
void | add (const Clone< MarketModelMultiProduct > &, Real multiplier=1.0) |
void | subtract (const Clone< MarketModelMultiProduct > &, Real multiplier=1.0) |
void | finalize () |
Size | size () const |
const MarketModelMultiProduct & | item (Size i) const |
MarketModelMultiProduct & | item (Size i) |
Real | multiplier (Size i) const |
Public Member Functions inherited from MarketModelMultiProduct | |
virtual | ~MarketModelMultiProduct ()=default |
virtual std::vector< Size > | suggestedNumeraires () const =0 |
virtual const EvolutionDescription & | evolution () const =0 |
virtual std::vector< Time > | possibleCashFlowTimes () 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 ¤tState, 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< MarketModelMultiProduct > | clone () const =0 |
returns a newly-allocated copy of itself More... | |
Additional Inherited Members | |
Protected Types inherited from MarketModelComposite | |
typedef std::vector< SubProduct >::iterator | iterator |
typedef std::vector< SubProduct >::const_iterator | const_iterator |
Protected Attributes inherited from MarketModelComposite | |
std::vector< SubProduct > | components_ |
std::vector< Time > | rateTimes_ |
std::vector< Time > | evolutionTimes_ |
EvolutionDescription | evolution_ |
bool | finalized_ = false |
Size | currentIndex_ |
std::vector< Time > | cashflowTimes_ |
std::vector< std::vector< Time > > | allEvolutionTimes_ |
std::vector< std::valarray< bool > > | isInSubset_ |
Composition of one or more market-model products.
Instances of this class build a multiple market-model product by composing two or more subproducts.
Definition at line 33 of file multiproductcomposite.hpp.
|
overridevirtual |
Implements MarketModelMultiProduct.
Definition at line 24 of file multiproductcomposite.cpp.
|
overridevirtual |
Implements MarketModelMultiProduct.
Definition at line 32 of file multiproductcomposite.cpp.
|
overridevirtual |
return value indicates whether path is finished, TRUE means done
Implements MarketModelMultiProduct.
Definition at line 40 of file multiproductcomposite.cpp.
|
overridevirtual |
returns a newly-allocated copy of itself
Implements MarketModelMultiProduct.
Definition at line 82 of file multiproductcomposite.cpp.