#include <ored/model/inflation/infjybuilder.hpp>
Public Types | |
using | Helpers = std::vector< QuantLib::ext::shared_ptr< QuantLib::CalibrationHelper > > |
Public Member Functions | |
InfJyBuilder (const QuantLib::ext::shared_ptr< Market > &market, const QuantLib::ext::shared_ptr< InfJyData > &data, const std::string &configuration=Market::defaultConfiguration, const std::string &referenceCalibrationGrid="", const bool donCalibrate=false) | |
Inspectors | |
std::string | inflationIndex () const |
QuantLib::ext::shared_ptr< QuantExt::InfJyParameterization > | parameterization () const |
Helpers | realRateBasket () const |
Helpers | indexBasket () const |
Public Member Functions inherited from ModelBuilder | |
void | recalibrate () const |
virtual void | forceRecalculate () |
virtual bool | requiresRecalibration () const=0 |
Private Member Functions | |
LazyObject interface | |
void | performCalculations () const override |
void | buildCalibrationBaskets () const |
Build any calibration baskets requested by the configuration i.e. via the data_ member. More... | |
Helpers | buildCalibrationBasket (const CalibrationBasket &cb, std::vector< bool > &active, QuantLib::Array &expiries, bool forRealRateReversion=false) const |
Build the calibration basket. More... | |
Helpers | buildCpiCapFloorBasket (const CalibrationBasket &cb, std::vector< bool > &active, QuantLib::Array &expiries) const |
Build a CPI cap floor calibration basket. More... | |
Helpers | buildYoYCapFloorBasket (const CalibrationBasket &cb, std::vector< bool > &active, QuantLib::Array &expiries) const |
Build a YoY cap floor calibration basket. More... | |
Helpers | buildYoYSwapBasket (const CalibrationBasket &cb, std::vector< bool > &active, QuantLib::Array &expiries, bool forRealRateReversion=false) const |
Build a YoY swap calibration basket. More... | |
const CalibrationBasket & | calibrationBasket (const std::string ¶meter) const |
Find calibration basket with parameter value equal to parameter . More... | |
QuantLib::ext::shared_ptr< QuantExt::Lgm1fParametrization< ZeroInflationTermStructure > > | createRealRateParam () const |
Create the real rate parameterisation. More... | |
QuantLib::ext::shared_ptr< QuantExt::FxBsParametrization > | createIndexParam () const |
Create the inflation index parameterisation. More... | |
void | setupParams (const ModelParameter ¶m, QuantLib::Array ×, QuantLib::Array &values, const QuantLib::Array &expiries, const std::string ¶mName) const |
std::vector< QuantLib::Date > | referenceCalibrationDates () const |
Create the reference calibration dates. More... | |
void | initialiseMarket () |
Attempt to initialise market data members that may be needed for building calibration instruments. More... | |
bool | pricesChanged (bool updateCache) const |
QuantLib::Real | marketPrice (const QuantLib::ext::shared_ptr< QuantLib::CalibrationHelper > &helper) const |
Return the market value of the given calibration helper. More... | |
ModelBuilder interface | |
QuantLib::ext::shared_ptr< Market > | market_ |
std::string | configuration_ |
QuantLib::ext::shared_ptr< InfJyData > | data_ |
std::string | referenceCalibrationGrid_ |
bool | dontCalibrate_ |
QuantLib::ext::shared_ptr< QuantExt::InfJyParameterization > | parameterization_ |
QuantLib::ext::shared_ptr< QuantExt::MarketObserver > | marketObserver_ |
Handle< YieldTermStructure > | rateCurve_ |
QuantLib::ext::shared_ptr< QuantLib::ZeroInflationIndex > | zeroInflationIndex_ |
QuantLib::Handle< QuantLib::CPIVolatilitySurface > | cpiVolatility_ |
QuantLib::ext::shared_ptr< QuantLib::YoYInflationIndex > | yoyInflationIndex_ |
QuantLib::Handle< QuantLib::YoYOptionletVolatilitySurface > | yoyVolatility_ |
bool | forceCalibration_ = false |
Helpers | realRateBasket_ |
std::vector< bool > | rrInstActive_ |
QuantLib::Array | rrInstExpiries_ |
Helpers | indexBasket_ |
std::vector< bool > | indexInstActive_ |
QuantLib::Array | indexInstExpiries_ |
std::vector< QuantLib::Real > | priceCache_ |
Cache the prices of all of the active calibration helper instruments. More... | |
void | forceRecalculate () override |
bool | requiresRecalibration () const override |
void | setCalibrationDone () const |
Builder for a Jarrow Yildrim inflation model component
This class is a utility to turn a Jarrow Yildrim inflation model component description into an inflation model parameterization which can be used to instantiate a CrossAssetModel.
Definition at line 42 of file infjybuilder.hpp.
using Helpers = std::vector<QuantLib::ext::shared_ptr<QuantLib::CalibrationHelper> > |
Definition at line 54 of file infjybuilder.hpp.
InfJyBuilder | ( | const QuantLib::ext::shared_ptr< Market > & | market, |
const QuantLib::ext::shared_ptr< InfJyData > & | data, | ||
const std::string & | configuration = Market::defaultConfiguration , |
||
const std::string & | referenceCalibrationGrid = "" , |
||
const bool | donCalibrate = false |
||
) |
Constructor
market | Market object |
data | Jarrow Yildrim inflation model description |
configuration | Market configuration to use |
referenceCalibrationGrid | The reference calibration grid |
Definition at line 77 of file infjybuilder.cpp.
string inflationIndex | ( | ) | const |
QuantLib::ext::shared_ptr< QuantExt::InfJyParameterization > parameterization | ( | ) | const |
Definition at line 112 of file infjybuilder.cpp.
Helpers realRateBasket | ( | ) | const |
Definition at line 117 of file infjybuilder.cpp.
Helpers indexBasket | ( | ) | const |
Definition at line 122 of file infjybuilder.cpp.
|
overridevirtual |
Reimplemented from ModelBuilder.
Definition at line 144 of file infjybuilder.cpp.
|
overridevirtual |
Implements ModelBuilder.
Definition at line 127 of file infjybuilder.cpp.
void setCalibrationDone | ( | ) | const |
|
overrideprivate |
Definition at line 133 of file infjybuilder.cpp.
|
private |
Build any calibration baskets requested by the configuration i.e. via the data_
member.
Definition at line 150 of file infjybuilder.cpp.
|
private |
Build the calibration basket.
Definition at line 239 of file infjybuilder.cpp.
|
private |
Build a CPI cap floor calibration basket.
Definition at line 260 of file infjybuilder.cpp.
|
private |
Build a YoY cap floor calibration basket.
Definition at line 387 of file infjybuilder.cpp.
|
private |
Build a YoY swap calibration basket.
Definition at line 509 of file infjybuilder.cpp.
|
private |
Find calibration basket with parameter value equal to parameter
.
Definition at line 625 of file infjybuilder.cpp.
|
private |
Create the real rate parameterisation.
Definition at line 636 of file infjybuilder.cpp.
|
private |
Create the inflation index parameterisation.
Definition at line 711 of file infjybuilder.cpp.
|
private |
Perform checks and possibly adjust the times
and values
array depending on calibration configuration.
Definition at line 753 of file infjybuilder.cpp.
|
private |
Create the reference calibration dates.
Definition at line 783 of file infjybuilder.cpp.
|
private |
Attempt to initialise market data members that may be needed for building calibration instruments.
Definition at line 796 of file infjybuilder.cpp.
Returns true
if the market value of any of the calibration helpers has changed. If updateCache
is true
, the cached prices are updated if they have changed.
Definition at line 824 of file infjybuilder.cpp.
|
private |
Return the market value of the given calibration helper.
Definition at line 855 of file infjybuilder.cpp.
|
private |
Definition at line 73 of file infjybuilder.hpp.
|
private |
Definition at line 74 of file infjybuilder.hpp.
|
private |
Definition at line 75 of file infjybuilder.hpp.
|
private |
Definition at line 76 of file infjybuilder.hpp.
|
private |
Definition at line 77 of file infjybuilder.hpp.
|
private |
Definition at line 79 of file infjybuilder.hpp.
|
private |
Definition at line 80 of file infjybuilder.hpp.
|
private |
Definition at line 83 of file infjybuilder.hpp.
|
private |
Definition at line 86 of file infjybuilder.hpp.
|
private |
Definition at line 89 of file infjybuilder.hpp.
|
private |
Definition at line 90 of file infjybuilder.hpp.
|
private |
Definition at line 91 of file infjybuilder.hpp.
|
private |
Definition at line 94 of file infjybuilder.hpp.
|
mutableprivate |
Calibration instruments to use for calibrating the real rate portion of the JY model. The basket is empty if we are not calibrating the real rate portion of the JY model. Depending on the calibration configuration, either the real rate reversion parameter or the real rate volatility parameter will be adjusted in order to match these instruments.
Definition at line 101 of file infjybuilder.hpp.
|
mutableprivate |
Definition at line 102 of file infjybuilder.hpp.
|
mutableprivate |
Definition at line 103 of file infjybuilder.hpp.
|
mutableprivate |
Calibration instruments to use for calibrating the inflation index portion of the JY model. The basket is empty if we are not calibrating the inflation index portion of the JY model.
Definition at line 108 of file infjybuilder.hpp.
|
mutableprivate |
Definition at line 109 of file infjybuilder.hpp.
|
mutableprivate |
Definition at line 110 of file infjybuilder.hpp.
|
mutableprivate |
Cache the prices of all of the active calibration helper instruments.
Definition at line 113 of file infjybuilder.hpp.