QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.8
Protected Types | Protected Attributes | List of all members
MarketModelComposite Class Reference

Composition of two or more market-model products. More...

#include <ql/models/marketmodels/products/compositeproduct.hpp>

+ Inheritance diagram for MarketModelComposite:

Public Member Functions

MarketModelMultiProduct interface
const EvolutionDescriptionevolution () const
 
std::vector< SizesuggestedNumeraires () const
 
std::vector< TimepossibleCashFlowTimes () const
 
void reset ()
 during simulation put product at start of path
 
Composite facilities
void add (const Clone< MarketModelMultiProduct > &, Real multiplier=1.0)
 
void subtract (const Clone< MarketModelMultiProduct > &, Real multiplier=1.0)
 
void finalize ()
 
Size size () const
 
const MarketModelMultiProductitem (Size i) const
 
MarketModelMultiProductitem (Size i)
 
Real multiplier (Size i) const
 
- Public Member Functions inherited from MarketModelMultiProduct
virtual Size numberOfProducts () const =0
 
virtual Size maxNumberOfCashFlowsPerProductPerStep () const =0
 
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
 
virtual std::auto_ptr< MarketModelMultiProductclone () const =0
 returns a newly-allocated copy of itself
 

Protected Types

typedef std::vector< SubProduct >::iterator iterator
 
typedef std::vector< SubProduct >::const_iterator const_iterator
 

Protected Attributes

std::vector< SubProduct > components_
 
std::vector< TimerateTimes_
 
std::vector< TimeevolutionTimes_
 
EvolutionDescription evolution_
 
bool finalized_
 
Size currentIndex_
 
std::vector< TimecashflowTimes_
 
std::vector< std::vector< Time > > allEvolutionTimes_
 
std::vector< std::valarray< bool > > isInSubset_
 

Detailed Description

Composition of two or more market-model products.

Instances of this class build a market-model product by composing one or more subproducts.

Precondition
All subproducts must have the same rate times.