QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
MarketModelPathwiseMultiDeflatedCap Class Reference

#include <ql/models/marketmodels/products/pathwise/pathwiseproductcaplet.hpp>

+ Inheritance diagram for MarketModelPathwiseMultiDeflatedCap:
+ Collaboration diagram for MarketModelPathwiseMultiDeflatedCap:

Public Member Functions

 MarketModelPathwiseMultiDeflatedCap (const std::vector< Time > &rateTimes, const std::vector< Real > &accruals, const std::vector< Time > &paymentTimes, Rate strike, std::vector< std::pair< Size, Size > > startsAndEnds)
 
 ~MarketModelPathwiseMultiDeflatedCap () override=default
 
std::vector< SizesuggestedNumeraires () const override
 
const EvolutionDescriptionevolution () const override
 
std::vector< TimepossibleCashFlowTimes () const override
 
Size numberOfProducts () const override
 
Size maxNumberOfCashFlowsPerProductPerStep () const override
 
bool alreadyDeflated () 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< MarketModelPathwiseMultiProduct::CashFlow > > &cashFlowsGenerated) override
 return value indicates whether path is finished, TRUE means done More...
 
std::unique_ptr< MarketModelPathwiseMultiProductclone () const override
 returns a newly-allocated copy of itself More...
 
- Public Member Functions inherited from MarketModelPathwiseMultiProduct
virtual ~MarketModelPathwiseMultiProduct ()=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 bool alreadyDeflated () 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< MarketModelPathwiseMultiProduct::CashFlow > > &cashFlowsGenerated)=0
 return value indicates whether path is finished, TRUE means done More...
 
virtual std::unique_ptr< MarketModelPathwiseMultiProductclone () const =0
 returns a newly-allocated copy of itself More...
 

Private Attributes

MarketModelPathwiseMultiDeflatedCaplet underlyingCaplets_
 
Size numberRates_
 
std::vector< std::pair< Size, Size > > startsAndEnds_
 
Size currentIndex_
 
std::vector< SizeinnerCashFlowSizes_
 
std::vector< std::vector< MarketModelPathwiseMultiProduct::CashFlow > > innerCashFlowsGenerated_
 

Detailed Description

MarketModelPathwiseMultiDeflatedCap to price several caps and get their derivatives simultaneously. Mainly useful for testing pathwise market vegas code.

Definition at line 148 of file pathwiseproductcaplet.hpp.

Constructor & Destructor Documentation

◆ MarketModelPathwiseMultiDeflatedCap()

MarketModelPathwiseMultiDeflatedCap ( const std::vector< Time > &  rateTimes,
const std::vector< Real > &  accruals,
const std::vector< Time > &  paymentTimes,
Rate  strike,
std::vector< std::pair< Size, Size > >  startsAndEnds 
)

Definition at line 282 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ ~MarketModelPathwiseMultiDeflatedCap()

Member Function Documentation

◆ suggestedNumeraires()

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

Implements MarketModelPathwiseMultiProduct.

Definition at line 307 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ evolution()

const EvolutionDescription & evolution ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 313 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ possibleCashFlowTimes()

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

Implements MarketModelPathwiseMultiProduct.

Definition at line 318 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 323 of file pathwiseproductcaplet.cpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 327 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ alreadyDeflated()

bool alreadyDeflated ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 333 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelPathwiseMultiProduct.

Definition at line 339 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ nextTimeStep()

bool nextTimeStep ( const CurveState currentState,
std::vector< Size > &  numberCashFlowsThisStep,
std::vector< std::vector< MarketModelPathwiseMultiProduct::CashFlow > > &  cashFlowsGenerated 
)
overridevirtual

return value indicates whether path is finished, TRUE means done

Implements MarketModelPathwiseMultiProduct.

Definition at line 346 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ clone()

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

returns a newly-allocated copy of itself

Implements MarketModelPathwiseMultiProduct.

Definition at line 376 of file pathwiseproductcaplet.cpp.

Member Data Documentation

◆ underlyingCaplets_

MarketModelPathwiseMultiDeflatedCaplet underlyingCaplets_
private

Definition at line 184 of file pathwiseproductcaplet.hpp.

◆ numberRates_

Size numberRates_
private

Definition at line 186 of file pathwiseproductcaplet.hpp.

◆ startsAndEnds_

std::vector<std::pair<Size,Size> > startsAndEnds_
private

Definition at line 188 of file pathwiseproductcaplet.hpp.

◆ currentIndex_

Size currentIndex_
private

Definition at line 191 of file pathwiseproductcaplet.hpp.

◆ innerCashFlowSizes_

std::vector<Size> innerCashFlowSizes_
private

Definition at line 192 of file pathwiseproductcaplet.hpp.

◆ innerCashFlowsGenerated_

std::vector<std::vector<MarketModelPathwiseMultiProduct::CashFlow> > innerCashFlowsGenerated_
private

Definition at line 193 of file pathwiseproductcaplet.hpp.