QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CMSwapCurveState Class Reference

Curve state for constant-maturity-swap market models More...

#include <cmswapcurvestate.hpp>

+ Inheritance diagram for CMSwapCurveState:
+ Collaboration diagram for CMSwapCurveState:

Public Member Functions

 CMSwapCurveState (const std::vector< Time > &rateTimes, Size spanningForwards)
 
Modifiers
void setOnCMSwapRates (const std::vector< Rate > &cmSwapRates, Size firstValidIndex=0)
 
- Public Member Functions inherited from CurveState
 CurveState (const std::vector< Time > &rateTimes)
 
virtual ~CurveState ()=default
 
Size numberOfRates () const
 
const std::vector< Time > & rateTimes () const
 
const std::vector< Time > & rateTaus () const
 
Rate swapRate (Size begin, Size end) const
 

Inspectors

Size spanningFwds_
 
Size first_
 
std::vector< DiscountFactordiscRatios_
 
std::vector< RateforwardRates_
 
std::vector< RatecmSwapRates_
 
std::vector< RealcmSwapAnnuities_
 
std::vector< RateirrCMSwapRates_
 
std::vector< RealirrCMSwapAnnuities_
 
std::vector< RatecotSwapRates_
 
std::vector< RealcotAnnuities_
 
Real discountRatio (Size i, Size j) const override
 
Rate forwardRate (Size i) const override
 
Rate coterminalSwapRate (Size i) const override
 
Rate coterminalSwapAnnuity (Size numeraire, Size i) const override
 
Rate cmSwapRate (Size i, Size spanningForwards) const override
 
Rate cmSwapAnnuity (Size numeraire, Size i, Size spanningForwards) const override
 
const std::vector< Rate > & forwardRates () const override
 
const std::vector< Rate > & coterminalSwapRates () const override
 
const std::vector< Rate > & cmSwapRates (Size spanningForwards) const override
 
std::unique_ptr< CurveStateclone () const override
 

Additional Inherited Members

- Protected Attributes inherited from CurveState
Size numberOfRates_
 
std::vector< TimerateTimes_
 
std::vector< TimerateTaus_
 

Detailed Description

Curve state for constant-maturity-swap market models

Definition at line 30 of file cmswapcurvestate.hpp.

Constructor & Destructor Documentation

◆ CMSwapCurveState()

CMSwapCurveState ( const std::vector< Time > &  rateTimes,
Size  spanningForwards 
)
explicit

Definition at line 26 of file cmswapcurvestate.cpp.

Member Function Documentation

◆ setOnCMSwapRates()

void setOnCMSwapRates ( const std::vector< Rate > &  cmSwapRates,
Size  firstValidIndex = 0 
)

Definition at line 40 of file cmswapcurvestate.cpp.

+ Here is the caller graph for this function:

◆ discountRatio()

Real discountRatio ( Size  i,
Size  j 
) const
overridevirtual

Implements CurveState.

Definition at line 87 of file cmswapcurvestate.cpp.

+ Here is the caller graph for this function:

◆ forwardRate()

Rate forwardRate ( Size  i) const
overridevirtual

Implements CurveState.

Definition at line 94 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:

◆ coterminalSwapRate()

Rate coterminalSwapRate ( Size  i) const
overridevirtual

Implements CurveState.

Definition at line 113 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:

◆ coterminalSwapAnnuity()

Rate coterminalSwapAnnuity ( Size  numeraire,
Size  i 
) const
overridevirtual

Implements CurveState.

Definition at line 101 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:

◆ cmSwapRate()

Rate cmSwapRate ( Size  i,
Size  spanningForwards 
) const
overridevirtual

Implements CurveState.

Definition at line 140 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cmSwapAnnuity()

Rate cmSwapAnnuity ( Size  numeraire,
Size  i,
Size  spanningForwards 
) const
overridevirtual

Implements CurveState.

Definition at line 122 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forwardRates()

const std::vector< Rate > & forwardRates ( ) const
overridevirtual

Implements CurveState.

Definition at line 155 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:

◆ coterminalSwapRates()

const std::vector< Rate > & coterminalSwapRates ( ) const
overridevirtual

Implements CurveState.

Definition at line 161 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:

◆ cmSwapRates()

const std::vector< Rate > & cmSwapRates ( Size  spanningForwards) const
overridevirtual

Implements CurveState.

Definition at line 169 of file cmswapcurvestate.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clone()

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

Implements CurveState.

Definition at line 181 of file cmswapcurvestate.cpp.

Member Data Documentation

◆ spanningFwds_

Size spanningFwds_
private

Definition at line 56 of file cmswapcurvestate.hpp.

◆ first_

Size first_
private

Definition at line 57 of file cmswapcurvestate.hpp.

◆ discRatios_

std::vector<DiscountFactor> discRatios_
private

Definition at line 58 of file cmswapcurvestate.hpp.

◆ forwardRates_

std::vector<Rate> forwardRates_
mutableprivate

Definition at line 59 of file cmswapcurvestate.hpp.

◆ cmSwapRates_

std::vector<Rate> cmSwapRates_
private

Definition at line 61 of file cmswapcurvestate.hpp.

◆ cmSwapAnnuities_

std::vector<Real> cmSwapAnnuities_
private

Definition at line 62 of file cmswapcurvestate.hpp.

◆ irrCMSwapRates_

std::vector<Rate> irrCMSwapRates_
mutableprivate

Definition at line 64 of file cmswapcurvestate.hpp.

◆ irrCMSwapAnnuities_

std::vector<Real> irrCMSwapAnnuities_
mutableprivate

Definition at line 65 of file cmswapcurvestate.hpp.

◆ cotSwapRates_

std::vector<Rate> cotSwapRates_
mutableprivate

Definition at line 66 of file cmswapcurvestate.hpp.

◆ cotAnnuities_

std::vector<Real> cotAnnuities_
mutableprivate

Definition at line 67 of file cmswapcurvestate.hpp.