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
MarketModelPathwiseMultiCaplet Class Reference

market-model pathwise caplet More...

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

+ Inheritance diagram for MarketModelPathwiseMultiCaplet:
+ Collaboration diagram for MarketModelPathwiseMultiCaplet:

Public Member Functions

 MarketModelPathwiseMultiCaplet (const std::vector< Time > &rateTimes, const std::vector< Real > &accruals, const std::vector< Time > &paymentTimes, const std::vector< Rate > &strikes)
 
 ~MarketModelPathwiseMultiCaplet () 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

std::vector< RealrateTimes_
 
std::vector< Realaccruals_
 
std::vector< TimepaymentTimes_
 
std::vector< Ratestrikes_
 
Size numberRates_
 
Size currentIndex_
 
EvolutionDescription evolution_
 

Detailed Description

market-model pathwise caplet

implementation of path wise methodology for caplets, essentially a test class since we have better ways of computing Greeks of caplets

used in MarketModelTest::testPathwiseVegas and MarketModelTest::testPathwiseGreeks

Definition at line 44 of file pathwiseproductcaplet.hpp.

Constructor & Destructor Documentation

◆ MarketModelPathwiseMultiCaplet()

MarketModelPathwiseMultiCaplet ( const std::vector< Time > &  rateTimes,
const std::vector< Real > &  accruals,
const std::vector< Time > &  paymentTimes,
const std::vector< Rate > &  strikes 
)

Definition at line 34 of file pathwiseproductcaplet.cpp.

+ Here is the call graph for this function:

◆ ~MarketModelPathwiseMultiCaplet()

~MarketModelPathwiseMultiCaplet ( )
overridedefault

Member Function Documentation

◆ suggestedNumeraires()

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

Implements MarketModelPathwiseMultiProduct.

Definition at line 100 of file pathwiseproductcaplet.cpp.

◆ evolution()

const EvolutionDescription & evolution ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 109 of file pathwiseproductcaplet.cpp.

◆ possibleCashFlowTimes()

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

Implements MarketModelPathwiseMultiProduct.

Definition at line 114 of file pathwiseproductcaplet.cpp.

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 119 of file pathwiseproductcaplet.cpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 124 of file pathwiseproductcaplet.cpp.

◆ alreadyDeflated()

bool alreadyDeflated ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 29 of file pathwiseproductcaplet.cpp.

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelPathwiseMultiProduct.

Definition at line 130 of file pathwiseproductcaplet.cpp.

◆ 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 69 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 95 of file pathwiseproductcaplet.cpp.

Member Data Documentation

◆ rateTimes_

std::vector<Real> rateTimes_
private

Definition at line 80 of file pathwiseproductcaplet.hpp.

◆ accruals_

std::vector<Real> accruals_
private

Definition at line 81 of file pathwiseproductcaplet.hpp.

◆ paymentTimes_

std::vector<Time> paymentTimes_
private

Definition at line 82 of file pathwiseproductcaplet.hpp.

◆ strikes_

std::vector<Rate> strikes_
private

Definition at line 83 of file pathwiseproductcaplet.hpp.

◆ numberRates_

Size numberRates_
private

Definition at line 84 of file pathwiseproductcaplet.hpp.

◆ currentIndex_

Size currentIndex_
private

Definition at line 86 of file pathwiseproductcaplet.hpp.

◆ evolution_

EvolutionDescription evolution_
private

Definition at line 88 of file pathwiseproductcaplet.hpp.