QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Curve state for market-model simulations More...
#include <curvestate.hpp>
Public Member Functions | |
CurveState (const std::vector< Time > &rateTimes) | |
virtual | ~CurveState ()=default |
Inspectors | |
Size | numberOfRates_ |
std::vector< Time > | rateTimes_ |
std::vector< Time > | rateTaus_ |
Size | numberOfRates () const |
const std::vector< Time > & | rateTimes () const |
const std::vector< Time > & | rateTaus () const |
virtual Real | discountRatio (Size i, Size j) const =0 |
virtual Rate | forwardRate (Size i) const =0 |
virtual Rate | coterminalSwapAnnuity (Size numeraire, Size i) const =0 |
virtual Rate | coterminalSwapRate (Size i) const =0 |
virtual Rate | cmSwapAnnuity (Size numeraire, Size i, Size spanningForwards) const =0 |
virtual Rate | cmSwapRate (Size i, Size spanningForwards) const =0 |
virtual const std::vector< Rate > & | forwardRates () const =0 |
virtual const std::vector< Rate > & | coterminalSwapRates () const =0 |
virtual const std::vector< Rate > & | cmSwapRates (Size spanningForwards) const =0 |
Rate | swapRate (Size begin, Size end) const |
virtual std::unique_ptr< CurveState > | clone () const =0 |
Curve state for market-model simulations
This class stores the state of the yield curve associated to the fixed calendar times within the simulation. This is the workhorse discounting object associated to the rate times of the simulation. It's important to pass the rates via an object like this to the product rather than directly to make it easier to switch to other engines such as a coterminal swap rate engine. Many products will not need expired rates and others will only require the first rate.
Definition at line 41 of file curvestate.hpp.
CurveState | ( | const std::vector< Time > & | rateTimes | ) |
|
virtualdefault |
Size numberOfRates | ( | ) | const |
const std::vector< Time > & rateTimes | ( | ) | const |
const std::vector< Time > & rateTaus | ( | ) | const |
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
|
pure virtual |
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
|
pure virtual |
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
Definition at line 32 of file curvestate.cpp.
|
pure virtual |
Implemented in CMSwapCurveState, CoterminalSwapCurveState, and LMMCurveState.
|
protected |
Definition at line 84 of file curvestate.hpp.
|
protected |
Definition at line 85 of file curvestate.hpp.
|
protected |
Definition at line 85 of file curvestate.hpp.