21#ifndef quantlib_ctsmm_caplet_calibration_hpp
22#define quantlib_ctsmm_caplet_calibration_hpp
32 class PiecewiseConstantVariance;
40 ext::shared_ptr<PiecewiseConstantCorrelation> corr,
41 std::vector<ext::shared_ptr<PiecewiseConstantVariance> > displacedSwapVariances,
43 ext::shared_ptr<CurveState> cs,
51 Natural innerMaxIterations = 100,
52 Real innerTolerance = 1e-8);
76 const std::vector<ext::shared_ptr<
78 displacedSwapVariances,
82 const ext::shared_ptr<CurveState>&
curveState()
const;
88 Real innerTolerance) = 0;
91 ext::shared_ptr<PiecewiseConstantCorrelation>
corr_;
92 std::vector<ext::shared_ptr<PiecewiseConstantVariance> >
99 ext::shared_ptr<CurveState>
cs_;
115 inline const std::vector<Volatility>&
120 inline const std::vector<Volatility>&
126 inline const std::vector<Volatility>&
131 inline const std::vector<Volatility>&
167 inline const std::vector<Matrix>&
177 i <<
"is an invalid index, must be less than "
182 inline const ext::shared_ptr<CurveState>&
187 inline std::vector<Spread>
ext::shared_ptr< PiecewiseConstantCorrelation > corr_
Real swaptionMaxError() const
Real swaptionRmsError() const
Real deformationSize() const
std::vector< std::vector< Volatility > > timeDependentCalibratedSwaptionVols_
const std::vector< Volatility > & timeDependentCalibratedSwaptionVols(Size i) const
std::vector< Volatility > mktCapletVols_
ext::shared_ptr< CurveState > cs_
const ext::shared_ptr< CurveState > & curveState() const
std::vector< Volatility > mktSwaptionVols_
bool calibrate(Natural numberOfFactors, Natural maxIterations, Real tolerance, Natural innerMaxIterations=100, Real innerTolerance=1e-8)
static void performChecks(const EvolutionDescription &evolution, const PiecewiseConstantCorrelation &corr, const std::vector< ext::shared_ptr< PiecewiseConstantVariance > > &displacedSwapVariances, const std::vector< Volatility > &mktCapletVols, const CurveState &cs)
virtual ~CTSMMCapletCalibration()=default
std::vector< Spread > displacements() const
std::vector< Volatility > mdlSwaptionVols_
std::vector< ext::shared_ptr< PiecewiseConstantVariance > > displacedSwapVariances_
const std::vector< Volatility > & mdlSwaptionVols() const
virtual Natural calibrationImpl_(Natural numberOfFactors, Natural innerMaxIterations, Real innerTolerance)=0
const std::vector< Matrix > & swapPseudoRoots() const
const Matrix & swapPseudoRoot(Size i) const
std::vector< Volatility > usedCapletVols_
Real capletRmsError() const
EvolutionDescription evolution_
const std::vector< Volatility > & mktSwaptionVols() const
const std::vector< Volatility > & timeDependentUnCalibratedSwaptionVols(Size i) const
const std::vector< Volatility > & mktCapletVols() const
std::vector< Volatility > mdlCapletVols_
Real capletMaxError() const
const std::vector< Volatility > & mdlCapletVols() const
std::vector< Matrix > swapCovariancePseudoRoots_
Curve state for market-model simulations
Market-model evolution description.
Matrix used in linear algebra.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
unsigned QL_INTEGER Natural
positive integer
Real Spread
spreads on interest rates
std::size_t Size
size of a container
Maps shared_ptr to either the boost or std implementation.