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

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

+ Inheritance diagram for MarketModelPathwiseSwap:
+ Collaboration diagram for MarketModelPathwiseSwap:

Public Member Functions

 MarketModelPathwiseSwap (const std::vector< Time > &rateTimes, const std::vector< Time > &accruals, const std::vector< Rate > &strikes, Real multiplier=1.0)
 
 ~MarketModelPathwiseSwap () 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< Ratestrikes_
 
Size numberRates_
 
Real multiplier_
 
Size currentIndex_
 
EvolutionDescription evolution_
 

Detailed Description

Swap for doing Greeks. Fairly useless when used directly, but if we want to look a breakable swap it becomes useful.

Examples
MarketModels.cpp.

Definition at line 41 of file pathwiseproductswap.hpp.

Constructor & Destructor Documentation

◆ MarketModelPathwiseSwap()

MarketModelPathwiseSwap ( const std::vector< Time > &  rateTimes,
const std::vector< Time > &  accruals,
const std::vector< Rate > &  strikes,
Real  multiplier = 1.0 
)

Definition at line 33 of file pathwiseproductswap.cpp.

+ Here is the call graph for this function:

◆ ~MarketModelPathwiseSwap()

~MarketModelPathwiseSwap ( )
overridedefault

Member Function Documentation

◆ suggestedNumeraires()

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

Implements MarketModelPathwiseMultiProduct.

Definition at line 94 of file pathwiseproductswap.cpp.

◆ evolution()

const EvolutionDescription & evolution ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 103 of file pathwiseproductswap.cpp.

◆ possibleCashFlowTimes()

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

Implements MarketModelPathwiseMultiProduct.

Definition at line 108 of file pathwiseproductswap.cpp.

◆ numberOfProducts()

Size numberOfProducts ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 113 of file pathwiseproductswap.cpp.

◆ maxNumberOfCashFlowsPerProductPerStep()

Size maxNumberOfCashFlowsPerProductPerStep ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 118 of file pathwiseproductswap.cpp.

◆ alreadyDeflated()

bool alreadyDeflated ( ) const
overridevirtual

Implements MarketModelPathwiseMultiProduct.

Definition at line 28 of file pathwiseproductswap.cpp.

◆ reset()

void reset ( )
overridevirtual

during simulation put product at start of path

Implements MarketModelPathwiseMultiProduct.

Definition at line 124 of file pathwiseproductswap.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 66 of file pathwiseproductswap.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 89 of file pathwiseproductswap.cpp.

Member Data Documentation

◆ rateTimes_

std::vector<Real> rateTimes_
private

Definition at line 77 of file pathwiseproductswap.hpp.

◆ accruals_

std::vector<Real> accruals_
private

Definition at line 78 of file pathwiseproductswap.hpp.

◆ strikes_

std::vector<Rate> strikes_
private

Definition at line 79 of file pathwiseproductswap.hpp.

◆ numberRates_

Size numberRates_
private

Definition at line 80 of file pathwiseproductswap.hpp.

◆ multiplier_

Real multiplier_
private

Definition at line 81 of file pathwiseproductswap.hpp.

◆ currentIndex_

Size currentIndex_
private

Definition at line 84 of file pathwiseproductswap.hpp.

◆ evolution_

EvolutionDescription evolution_
private

Definition at line 86 of file pathwiseproductswap.hpp.