QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Composition of two or more market-model products. More...
#include <compositeproduct.hpp>
Classes | |
struct | SubProduct |
Public Member Functions | |
MarketModelComposite ()=default | |
MarketModelMultiProduct interface | |
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... | |
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... | |
Composite facilities | |
typedef std::vector< SubProduct >::iterator | iterator |
typedef std::vector< SubProduct >::const_iterator | const_iterator |
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_ |
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 |
Composition of two or more market-model products.
Instances of this class build a market-model product by composing one or more subproducts.
Definition at line 36 of file compositeproduct.hpp.
|
protected |
Definition at line 69 of file compositeproduct.hpp.
|
protected |
Definition at line 70 of file compositeproduct.hpp.
|
default |
|
overridevirtual |
Implements MarketModelMultiProduct.
Definition at line 25 of file compositeproduct.cpp.
|
overridevirtual |
Implements MarketModelMultiProduct.
Definition at line 30 of file compositeproduct.cpp.
|
overridevirtual |
Implements MarketModelMultiProduct.
Definition at line 35 of file compositeproduct.cpp.
|
overridevirtual |
during simulation put product at start of path
Implements MarketModelMultiProduct.
Definition at line 40 of file compositeproduct.cpp.
void add | ( | const Clone< MarketModelMultiProduct > & | product, |
Real | multiplier = 1.0 |
||
) |
Definition at line 50 of file compositeproduct.cpp.
void subtract | ( | const Clone< MarketModelMultiProduct > & | product, |
Real | multiplier = 1.0 |
||
) |
void finalize | ( | ) |
Definition at line 79 of file compositeproduct.cpp.
Size size | ( | ) | const |
Definition at line 139 of file compositeproduct.cpp.
const MarketModelMultiProduct & item | ( | Size | i | ) | const |
MarketModelMultiProduct & item | ( | Size | i | ) |
Definition at line 147 of file compositeproduct.cpp.
|
protected |
Definition at line 68 of file compositeproduct.hpp.
|
protected |
Definition at line 72 of file compositeproduct.hpp.
|
protected |
Definition at line 73 of file compositeproduct.hpp.
|
protected |
Definition at line 74 of file compositeproduct.hpp.
|
protected |
Definition at line 76 of file compositeproduct.hpp.
|
protected |
Definition at line 77 of file compositeproduct.hpp.
|
protected |
Definition at line 78 of file compositeproduct.hpp.
|
protected |
Definition at line 79 of file compositeproduct.hpp.
|
protected |
Definition at line 80 of file compositeproduct.hpp.