QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
SingleProductComposite Class Reference

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

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

Inheritance diagram for SingleProductComposite:

Public Member Functions

MarketModelMultiProduct interface
Size numberOfProducts () const override
Size maxNumberOfCashFlowsPerProductPerStep () const override
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
std::unique_ptr< MarketModelMultiProductclone () const override
 returns a newly-allocated copy of itself
Public Member Functions inherited from MarketModelComposite
const EvolutionDescriptionevolution () const override
std::vector< SizesuggestedNumeraires () const override
std::vector< TimepossibleCashFlowTimes () const override
void reset () override
 during simulation put product at start of path
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

Additional Inherited Members

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

Detailed Description

Composition of one or more market-model products.

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

Precondition
All subproducts must have the same rate times.

Member Function Documentation

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

◆ 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.

◆ clone()

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

returns a newly-allocated copy of itself

Implements MarketModelMultiProduct.