Cross Asset Model. More...
#include <qle/models/crossassetmodel.hpp>
Inheritance diagram for CrossAssetModel:
Collaboration diagram for CrossAssetModel:Classes | |
| struct | cache_hasher |
| struct | cache_key |
Public Types | |
| enum class | AssetType : Size { IR = 0 , FX = 1 , INF = 2 , CR = 3 , EQ = 4 , COM = 5 , CrState = 6 } |
| enum class | ModelType { LGM1F , HW , BS , DK , CIRPP , JY , GAB , GENERIC } |
| enum class | Discretization { Euler , Exact } |
Public Member Functions | |
| CrossAssetModel (const std::vector< QuantLib::ext::shared_ptr< Parametrization > > ¶metrizations, const Matrix &correlation=Matrix(), const SalvagingAlgorithm::Type salvaging=SalvagingAlgorithm::None, const IrModel::Measure measure=IrModel::Measure::LGM, const Discretization discretization=Discretization::Exact) | |
| CrossAssetModel (const std::vector< QuantLib::ext::shared_ptr< IrModel > > ¤cyModels, const std::vector< QuantLib::ext::shared_ptr< FxBsParametrization > > &fxParametrizations, const Matrix &correlation=Matrix(), const SalvagingAlgorithm::Type salvaging=SalvagingAlgorithm::None, const IrModel::Measure measure=IrModel::Measure::LGM, const Discretization discretization=Discretization::Exact) | |
| QuantLib::ext::shared_ptr< CrossAssetStateProcess > | stateProcess () const |
| Size | dimension () const |
| Size | brownians () const |
| Size | auxBrownians () const |
| Size | totalNumberOfParameters () const |
| Size | components (const AssetType t) const |
| Size | brownians (const AssetType t, const Size i) const |
| Size | auxBrownians (const AssetType t, const Size i) const |
| Size | stateVariables (const AssetType t, const Size i) const |
| ModelType | modelType (const AssetType t, const Size i) const |
| IrModel::Measure | measure () const |
| Size | ccyIndex (const Currency &ccy) const |
| Size | eqIndex (const std::string &eqName) const |
| Size | infIndex (const std::string &index) const |
| Size | crName (const std::string &name) const |
| Size | comIndex (const std::string &comName) const |
| void | update () override |
| void | generateArguments () override |
| const std::vector< QuantLib::ext::shared_ptr< Parametrization > > & | parametrizations () const |
| const QuantLib::ext::shared_ptr< Parametrization > | ir (const Size ccy) const |
| const QuantLib::ext::shared_ptr< Parametrization > | fx (const Size ccy) const |
| const QuantLib::ext::shared_ptr< Parametrization > | inf (const Size i) const |
| const QuantLib::ext::shared_ptr< Parametrization > | cr (const Size i) const |
| const QuantLib::ext::shared_ptr< Parametrization > | eq (const Size i) const |
| const QuantLib::ext::shared_ptr< Parametrization > | com (const Size i) const |
| const QuantLib::ext::shared_ptr< Parametrization > | crstate (const Size i) const |
| const QuantLib::ext::shared_ptr< IrModel > | irModel (const Size ccy) const |
| QuantLib::Real | numeraire (const Size ccy, const QuantLib::Time t, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const QuantLib::Array &aux=Array()) const |
| QuantLib::Real | discountBond (const Size ccy, const QuantLib::Time t, const QuantLib::Time T, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >()) const |
| const QuantLib::ext::shared_ptr< HwModel > | hw (const Size ccy) const |
| const QuantLib::ext::shared_ptr< IrHwParametrization > | irhw (const Size ccy) const |
| const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > | lgm (const Size ccy) const |
| const QuantLib::ext::shared_ptr< IrLgm1fParametrization > | irlgm1f (const Size ccy) const |
| Real | numeraire (const Size ccy, const Time t, const Real x, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const |
| Real | bankAccountNumeraire (const Size ccy, const Time t, const Real x, const Real y, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const |
| Real | discountBond (const Size ccy, const Time t, const Time T, const Real x, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const |
| Real | reducedDiscountBond (const Size ccy, const Time t, const Time T, const Real x, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const |
| Real | discountBondOption (const Size ccy, Option::Type type, const Real K, const Time t, const Time S, const Time T, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const |
| const QuantLib::ext::shared_ptr< FxModel > | fxModel (const Size ccy) const |
| const QuantLib::ext::shared_ptr< FxBsParametrization > | fxbs (const Size ccy) const |
| const QuantLib::ext::shared_ptr< InfDkParametrization > | infdk (const Size i) const |
| const QuantLib::ext::shared_ptr< InfJyParameterization > | infjy (const Size i) const |
| Inflation JY component. More... | |
| const QuantLib::ext::shared_ptr< CrLgm1fParametrization > | crlgm1f (const Size i) const |
| const QuantLib::ext::shared_ptr< CrCirpp > | crcirppModel (const Size i) const |
| const QuantLib::ext::shared_ptr< CrCirppParametrization > | crcirpp (const Size i) const |
| const QuantLib::ext::shared_ptr< EqBsParametrization > | eqbs (const Size ccy) const |
| const QuantLib::ext::shared_ptr< CommodityModel > | comModel (const Size com) const |
| const QuantLib::ext::shared_ptr< CommoditySchwartzParametrization > | combs (const Size ccy) const |
| const QuantLib::ext::shared_ptr< CrStateParametrization > | crstateParam (const Size index) const |
| const Matrix & | correlation () const |
| void | checkCorrelationMatrix () const |
| Size | idx (const AssetType t, const Size i) const |
| Size | cIdx (const AssetType t, const Size i, const Size offset=0) const |
| Size | wIdx (const AssetType t, const Size i, const Size offset=0) const |
| Size | pIdx (const AssetType t, const Size i, const Size offset=0) const |
| Real | correlation (const AssetType s, const Size i, const AssetType t, const Size j, const Size iOffset=0, const Size jOffset=0) const |
| void | setCorrelation (const AssetType s, const Size i, const AssetType t, const Size j, const Real value, const Size iOffset=0, const Size jOffset=0) |
| Discretization | discretization () const |
| SalvagingAlgorithm::Type | salvagingAlgorithm () const |
| void | setIntegrationPolicy (const QuantLib::ext::shared_ptr< Integrator > integrator, const bool usePiecewiseIntegration=true) const |
| const QuantLib::ext::shared_ptr< Integrator > | integrator () const |
| std::pair< Real, Real > | infdkV (const Size i, const Time t, const Time T) |
| std::pair< Real, Real > | infdkI (const Size i, const Time t, const Time T, const Real z, const Real y) |
| Real | infdkYY (const Size i, const Time t, const Time S, const Time T, const Real z, const Real y, const Real irz) |
| std::pair< Real, Real > | crlgm1fS (const Size i, const Size ccy, const Time t, const Time T, const Real z, const Real y) const |
| std::pair< Real, Real > | crcirppS (const Size i, const Time t, const Time T, const Real y, const Real s) const |
| virtual Handle< DefaultProbabilityTermStructure > | crTs (const Size i) const |
| virtual std::pair< Real, Real > | crS (const Size i, const Size ccy, const Time t, const Time T, const Real z, const Real y) const |
| void | calibrateIrLgm1fVolatilitiesIterative (const Size ccy, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateIrLgm1fReversionsIterative (const Size ccy, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateIrLgm1fGlobal (const Size ccy, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateBsVolatilitiesIterative (const AssetType &assetType, const Size aIdx, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateBsVolatilitiesGlobal (const AssetType &assetType, const Size aIdx, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateInfDkVolatilitiesIterative (const Size index, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateInfDkReversionsIterative (const Size index, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateInfDkVolatilitiesGlobal (const Size index, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateInfDkReversionsGlobal (const Size index, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateInfJyGlobal (QuantLib::Size index, const std::vector< QuantLib::ext::shared_ptr< QuantLib::CalibrationHelper > > &helpers, QuantLib::OptimizationMethod &method, const QuantLib::EndCriteria &endCriteria, const std::map< QuantLib::Size, bool > &toCalibrate, const QuantLib::Constraint &constraint=QuantLib::Constraint(), const std::vector< QuantLib::Real > &weights=std::vector< QuantLib::Real >()) |
| void | calibrateInfJyIterative (QuantLib::Size inflationModelIndex, QuantLib::Size parameterIndex, const std::vector< QuantLib::ext::shared_ptr< QuantLib::CalibrationHelper > > &helpers, QuantLib::OptimizationMethod &method, const QuantLib::EndCriteria &endCriteria, const QuantLib::Constraint &constraint=QuantLib::Constraint(), const std::vector< QuantLib::Real > &weights=std::vector< QuantLib::Real >()) |
| void | calibrateCrLgm1fVolatilitiesIterative (const Size index, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| void | calibrateCrLgm1fReversionsIterative (const Size index, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >()) |
| std::vector< bool > | MoveParameter (const AssetType t, const Size param, const Size index, const Size i) |
Public Member Functions inherited from LinkableCalibratedModel | |
| LinkableCalibratedModel () | |
| void | update () override |
| virtual void | calibrate (const std::vector< QuantLib::ext::shared_ptr< CalibrationHelper > > &, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >(), const std::vector< bool > &fixParameters=std::vector< bool >()) |
| Calibrate to a set of market instruments (usually caps/swaptions) More... | |
| virtual void | calibrate (const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >(), const std::vector< bool > &fixParameters=std::vector< bool >()) |
| for backward compatibility More... | |
| Real | value (const Array ¶ms, const std::vector< QuantLib::ext::shared_ptr< CalibrationHelper > > &) |
| Real | value (const Array ¶ms, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &) |
| for backward compatibility More... | |
| const QuantLib::ext::shared_ptr< Constraint > & | constraint () const |
| EndCriteria::Type | endCriteria () const |
| Returns end criteria result. More... | |
| const Array & | problemValues () const |
| Returns the problem values. More... | |
| Array | params () const |
| Returns array of arguments on which calibration is done. More... | |
| virtual void | setParams (const Array ¶ms) |
| virtual void | setParam (Size idx, const Real value) |
Static Public Attributes | |
| static constexpr Size | numberOfAssetTypes = 7 |
Protected Member Functions | |
| CrossAssetModel (const std::vector< QuantLib::ext::shared_ptr< Parametrization > > ¶metrizations, const Matrix &correlation, SalvagingAlgorithm::Type salvaging, IrModel::Measure measure, const Discretization discretization, const bool) | |
| Size | arguments (const AssetType t, const Size i) const |
| Size | aIdx (const AssetType t, const Size i, const Size offset=0) const |
| virtual std::pair< AssetType, ModelType > | getComponentType (const Size i) const |
| virtual Size | getNumberOfParameters (const Size i) const |
| virtual Size | getNumberOfBrownians (const Size i) const |
| virtual Size | getNumberOfAuxBrownians (const Size i) const |
| virtual Size | getNumberOfStateVariables (const Size i) const |
| void | updateIndices (const AssetType &t, const Size i, const Size cIdx, const Size wIdx, const Size pIdx, const Size aIdx) |
| virtual void | initialize () |
| virtual void | initializeParametrizations () |
| virtual void | initializeCorrelation () |
| virtual void | initializeArguments () |
| virtual void | finalizeArguments () |
| virtual void | checkModelConsistency () const |
| virtual void | initDefaultIntegrator () |
| Real | infV (const Size idx, const Size ccy, const Time t, const Time T) const |
| Real | crV (const Size idx, const Size ccy, const Time t, const Time T) const |
| void | appendToFixedParameterVector (const AssetType t, const AssetType v, const Size param, const Size index, const Size i, std::vector< bool > &res) |
| virtual void | generateArguments () |
Protected Attributes | |
| boost::unordered_map< cache_key, std::pair< Real, Real >, cache_hasher > | cache_crlgm1fS_ |
| boost::unordered_map< cache_key, std::pair< Real, Real >, cache_hasher > | cache_infdkI_ |
| std::vector< Size > | components_ |
| std::vector< std::vector< Size > > | idx_ |
| std::vector< std::vector< Size > > | cIdx_ |
| std::vector< std::vector< Size > > | wIdx_ |
| std::vector< std::vector< Size > > | pIdx_ |
| std::vector< std::vector< Size > > | aIdx_ |
| std::vector< std::vector< Size > > | brownians_ |
| std::vector< std::vector< Size > > | auxBrownians_ |
| std::vector< std::vector< Size > > | stateVariables_ |
| std::vector< std::vector< Size > > | numArguments_ |
| Size | totalDimension_ |
| Size | totalNumberOfBrownians_ |
| Size | totalNumberOfAuxBrownians_ |
| Size | totalNumberOfParameters_ |
| std::vector< std::vector< ModelType > > | modelType_ |
| std::vector< QuantLib::ext::shared_ptr< Parametrization > > | p_ |
| std::vector< QuantLib::ext::shared_ptr< IrModel > > | irModels_ |
| std::vector< QuantLib::ext::shared_ptr< FxModel > > | fxModels_ |
| std::vector< QuantLib::ext::shared_ptr< CrCirpp > > | crcirppModel_ |
| std::vector< QuantLib::ext::shared_ptr< CommodityModel > > | comModels_ |
| Matrix | rho_ |
| SalvagingAlgorithm::Type | salvaging_ |
| IrModel::Measure | measure_ |
| Discretization | discretization_ |
| QuantLib::ext::shared_ptr< Integrator > | integrator_ |
| QuantLib::ext::shared_ptr< CrossAssetStateProcess > | stateProcess_ |
Protected Attributes inherited from LinkableCalibratedModel | |
| std::vector< QuantLib::ext::shared_ptr< Parameter > > | arguments_ |
| QuantLib::ext::shared_ptr< Constraint > | constraint_ |
| EndCriteria::Type | endCriteria_ |
| Array | problemValues_ |
Cross Asset Model.
Definition at line 58 of file crossassetmodel.hpp.
|
strong |
|
strong |
|
strong |
| Enumerator | |
|---|---|
| Euler | |
| Exact | |
Definition at line 62 of file crossassetmodel.hpp.
| CrossAssetModel | ( | const std::vector< QuantLib::ext::shared_ptr< Parametrization > > & | parametrizations, |
| const Matrix & | correlation = Matrix(), |
||
| const SalvagingAlgorithm::Type | salvaging = SalvagingAlgorithm::None, |
||
| const IrModel::Measure | measure = IrModel::Measure::LGM, |
||
| const Discretization | discretization = Discretization::Exact |
||
| ) |
Parametrizations must be given in the following order
All IR components must be of type HW or LGM1F, i.e. you can't mix the two types.
Definition at line 87 of file crossassetmodel.cpp.
Here is the call graph for this function:| CrossAssetModel | ( | const std::vector< QuantLib::ext::shared_ptr< IrModel > > & | currencyModels, |
| const std::vector< QuantLib::ext::shared_ptr< FxBsParametrization > > & | fxParametrizations, | ||
| const Matrix & | correlation = Matrix(), |
||
| const SalvagingAlgorithm::Type | salvaging = SalvagingAlgorithm::None, |
||
| const IrModel::Measure | measure = IrModel::Measure::LGM, |
||
| const Discretization | discretization = Discretization::Exact |
||
| ) |
IR-FX model based constructor
Definition at line 95 of file crossassetmodel.cpp.
Here is the call graph for this function:
|
protected |
Definition at line 422 of file crossassetmodel.hpp.
| QuantLib::ext::shared_ptr< CrossAssetStateProcess > stateProcess | ( | ) | const |
returns the state process with a given discretization
Definition at line 110 of file crossassetmodel.cpp.
Here is the caller graph for this function:| Size dimension | ( | ) | const |
total dimension of model (sum of number of state variables)
Definition at line 513 of file crossassetmodel.hpp.
Here is the caller graph for this function:| Size brownians | ( | ) | const |
total number of Brownian motions (excluding aux brownians)
Definition at line 515 of file crossassetmodel.hpp.
Here is the caller graph for this function:| Size auxBrownians | ( | ) | const |
total number of aux Brownian motions
Definition at line 517 of file crossassetmodel.hpp.
Here is the caller graph for this function:| Size totalNumberOfParameters | ( | ) | const |
total number of parameters that can be calibrated
Definition at line 519 of file crossassetmodel.hpp.
| Size components | ( | const AssetType | t | ) | const |
number of components for an asset class
Definition at line 117 of file crossassetmodel.cpp.
Here is the caller graph for this function:| Size brownians | ( | const AssetType | t, |
| const Size | i | ||
| ) | const |
number of brownian motions for a component excluding aux Brownians
Definition at line 176 of file crossassetmodel.cpp.
| Size auxBrownians | ( | const AssetType | t, |
| const Size | i | ||
| ) | const |
number of aux brownian motions for a component
Definition at line 182 of file crossassetmodel.cpp.
| Size stateVariables | ( | const AssetType | t, |
| const Size | i | ||
| ) | const |
number of state variables for a component
Definition at line 188 of file crossassetmodel.cpp.
Here is the caller graph for this function:| CrossAssetModel::ModelType modelType | ( | const AssetType | t, |
| const Size | i | ||
| ) | const |
model type of a component
Definition at line 200 of file crossassetmodel.cpp.
Here is the caller graph for this function:| IrModel::Measure measure | ( | ) | const |
Choice of probability measure
Definition at line 122 of file crossassetmodel.hpp.
Here is the caller graph for this function:| Size ccyIndex | ( | const Currency & | ccy | ) | const |
return index for currency (0 = domestic, 1 = first foreign currency and so on)
Definition at line 119 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Size eqIndex | ( | const std::string & | eqName | ) | const |
return index for equity (0 = first equity)
Definition at line 128 of file crossassetmodel.cpp.
Here is the call graph for this function:| Size infIndex | ( | const std::string & | index | ) | const |
return index for inflation (0 = first inflation index)
Definition at line 146 of file crossassetmodel.cpp.
Here is the call graph for this function:| Size crName | ( | const std::string & | name | ) | const |
return index for credit (0 = first credit name)
Definition at line 155 of file crossassetmodel.cpp.
Here is the call graph for this function:| Size comIndex | ( | const std::string & | comName | ) | const |
return index for commodity (0 = first equity)
Definition at line 137 of file crossassetmodel.cpp.
Here is the call graph for this function:
|
override |
observer and linked calibrated model interface
Definition at line 164 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Reimplemented from LinkableCalibratedModel.
Definition at line 174 of file crossassetmodel.cpp.
Here is the call graph for this function:| const std::vector< QuantLib::ext::shared_ptr< Parametrization > > & parametrizations | ( | ) | const |
| const QuantLib::ext::shared_ptr< Parametrization > ir | ( | const Size | ccy | ) | const |
components per asset class, see below for specific model type inspectors
Definition at line 521 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Parametrization > fx | ( | const Size | ccy | ) | const |
Definition at line 525 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Parametrization > inf | ( | const Size | i | ) | const |
Definition at line 529 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Parametrization > cr | ( | const Size | i | ) | const |
Definition at line 533 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Parametrization > eq | ( | const Size | i | ) | const |
Definition at line 537 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Parametrization > com | ( | const Size | i | ) | const |
Definition at line 541 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Parametrization > crstate | ( | const Size | i | ) | const |
| const QuantLib::ext::shared_ptr< IrModel > irModel | ( | const Size | ccy | ) | const |
| QuantLib::Real numeraire | ( | const Size | ccy, |
| const QuantLib::Time | t, | ||
| const QuantLib::Array & | x, | ||
| const QuantLib::Handle< QuantLib::YieldTermStructure > & | discountCurve = Handle<YieldTermStructure>(), |
||
| const QuantLib::Array & | aux = Array() |
||
| ) | const |
numeraire
Definition at line 628 of file crossassetmodel.hpp.
Here is the call graph for this function:| QuantLib::Real discountBond | ( | const Size | ccy, |
| const QuantLib::Time | t, | ||
| const QuantLib::Time | T, | ||
| const QuantLib::Array & | x, | ||
| const QuantLib::Handle< QuantLib::YieldTermStructure > & | discountCurve = Handle< YieldTermStructure >() |
||
| ) | const |
discount bond
| const QuantLib::ext::shared_ptr< HwModel > hw | ( | const Size | ccy | ) | const |
HW components, ccy=0 refers to the domestic currency
Definition at line 557 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< IrHwParametrization > irhw | ( | const Size | ccy | ) | const |
Definition at line 563 of file crossassetmodel.hpp.
Here is the call graph for this function:| const QuantLib::ext::shared_ptr< LinearGaussMarkovModel > lgm | ( | const Size | ccy | ) | const |
LGM1F components, ccy=0 refers to the domestic currency
Definition at line 567 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< IrLgm1fParametrization > irlgm1f | ( | const Size | ccy | ) | const |
Definition at line 573 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Real numeraire | ( | const Size | ccy, |
| const Time | t, | ||
| const Real | x, | ||
| Handle< YieldTermStructure > | discountCurve = Handle<YieldTermStructure>() |
||
| ) | const |
DEPRECATED LGM measure numeraire
Definition at line 634 of file crossassetmodel.hpp.
Here is the call graph for this function:| Real bankAccountNumeraire | ( | const Size | ccy, |
| const Time | t, | ||
| const Real | x, | ||
| const Real | y, | ||
| Handle< YieldTermStructure > | discountCurve = Handle<YieldTermStructure>() |
||
| ) | const |
DEPRECATED LGM - Bank account measure numeraire B(t) as a function of drifted LGM state variable x and drift-free auxiliary state variable y
Definition at line 639 of file crossassetmodel.hpp.
Here is the call graph for this function:| Real discountBond | ( | const Size | ccy, |
| const Time | t, | ||
| const Time | T, | ||
| const Real | x, | ||
| Handle< YieldTermStructure > | discountCurve = Handle<YieldTermStructure>() |
||
| ) | const |
DEPRECATED LGM specific discountBond
Definition at line 644 of file crossassetmodel.hpp.
Here is the call graph for this function:| Real reducedDiscountBond | ( | const Size | ccy, |
| const Time | t, | ||
| const Time | T, | ||
| const Real | x, | ||
| Handle< YieldTermStructure > | discountCurve = Handle<YieldTermStructure>() |
||
| ) | const |
DEPRECATED LGM specific discountBond
Definition at line 649 of file crossassetmodel.hpp.
Here is the call graph for this function:| Real discountBondOption | ( | const Size | ccy, |
| Option::Type | type, | ||
| const Real | K, | ||
| const Time | t, | ||
| const Time | S, | ||
| const Time | T, | ||
| Handle< YieldTermStructure > | discountCurve = Handle<YieldTermStructure>() |
||
| ) | const |
DEPRECATED LGM specific discountBond
Definition at line 654 of file crossassetmodel.hpp.
Here is the call graph for this function:| const QuantLib::ext::shared_ptr< FxModel > fxModel | ( | const Size | ccy | ) | const |
Definition at line 549 of file crossassetmodel.hpp.
| const QuantLib::ext::shared_ptr< FxBsParametrization > fxbs | ( | const Size | ccy | ) | const |
FXBS components, ccy=0 referes to the first foreign currency, so it corresponds to ccy+1 if you want to get the corresponding irmgl1f component
Definition at line 660 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< InfDkParametrization > infdk | ( | const Size | i | ) | const |
INF DK components
Definition at line 577 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< InfJyParameterization > infjy | ( | const Size | i | ) | const |
Inflation JY component.
Definition at line 584 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< CrLgm1fParametrization > crlgm1f | ( | const Size | i | ) | const |
CR LGM 1F components
Definition at line 590 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< CrCirpp > crcirppModel | ( | const Size | i | ) | const |
CR CIR++ components
Definition at line 597 of file crossassetmodel.hpp.
| const QuantLib::ext::shared_ptr< CrCirppParametrization > crcirpp | ( | const Size | i | ) | const |
Definition at line 603 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< EqBsParametrization > eqbs | ( | const Size | ccy | ) | const |
EQBS components
Definition at line 610 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< CommodityModel > comModel | ( | const Size | com | ) | const |
Definition at line 553 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< CommoditySchwartzParametrization > combs | ( | const Size | ccy | ) | const |
COMBS components
Definition at line 617 of file crossassetmodel.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< CrStateParametrization > crstateParam | ( | const Size | index | ) | const |
CreditState components
Definition at line 624 of file crossassetmodel.hpp.
Here is the call graph for this function:| const Matrix & correlation | ( | ) | const |
correlation linking the different marginal models, note that the use of asset class pairs specific inspectors is recommended instead of the global matrix directly
Definition at line 667 of file crossassetmodel.hpp.
Here is the caller graph for this function:| void checkCorrelationMatrix | ( | ) | const |
check if correlation matrix is valid
Definition at line 663 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Size idx | ( | const AssetType | t, |
| const Size | i | ||
| ) | const |
index of component in the parametrization vector
Definition at line 206 of file crossassetmodel.cpp.
Here is the caller graph for this function:| Size cIdx | ( | const AssetType | t, |
| const Size | i, | ||
| const Size | offset = 0 |
||
| ) | const |
index of component in the correlation matrix, by offset
Definition at line 212 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Size wIdx | ( | const AssetType | t, |
| const Size | i, | ||
| const Size | offset = 0 |
||
| ) | const |
index of component in the Brownian vector (including aux brownians), by offset this is checked to be equal to cIdx for Euler discretization and pIdx for exact discretization as an internal assertion
Definition at line 220 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Size pIdx | ( | const AssetType | t, |
| const Size | i, | ||
| const Size | offset = 0 |
||
| ) | const |
index of component in the stochastic process array, by offset
Definition at line 229 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Real correlation | ( | const AssetType | s, |
| const Size | i, | ||
| const AssetType | t, | ||
| const Size | j, | ||
| const Size | iOffset = 0, |
||
| const Size | jOffset = 0 |
||
| ) | const |
correlation between two components
Definition at line 245 of file crossassetmodel.cpp.
Here is the call graph for this function:| void setCorrelation | ( | const AssetType | s, |
| const Size | i, | ||
| const AssetType | t, | ||
| const Size | j, | ||
| const Real | value, | ||
| const Size | iOffset = 0, |
||
| const Size | jOffset = 0 |
||
| ) |
set correlation
Definition at line 250 of file crossassetmodel.cpp.
Here is the call graph for this function:| Discretization discretization | ( | ) | const |
| SalvagingAlgorithm::Type salvagingAlgorithm | ( | ) | const |
| void setIntegrationPolicy | ( | const QuantLib::ext::shared_ptr< Integrator > | integrator, |
| const bool | usePiecewiseIntegration = true |
||
| ) | const |
analytical moments require numerical integration, which can be customized here
Definition at line 277 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| const QuantLib::ext::shared_ptr< Integrator > integrator | ( | ) | const |
| std::pair< Real, Real > infdkV | ( | const Size | i, |
| const Time | t, | ||
| const Time | T | ||
| ) |
return (V(t), V^tilde(t,T)) in the notation of the book
Definition at line 868 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::pair< Real, Real > infdkI | ( | const Size | i, |
| const Time | t, | ||
| const Time | T, | ||
| const Real | z, | ||
| const Real | y | ||
| ) |
return (I(t), I^tilde(t,T)) in the notation of the book, note that I(0) is normalized to 1 here, i.e. you have to multiply the result with the index value (as of the base date of the inflation ts)
Definition at line 886 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Real infdkYY | ( | const Size | i, |
| const Time | t, | ||
| const Time | S, | ||
| const Time | T, | ||
| const Real | z, | ||
| const Real | y, | ||
| const Real | irz | ||
| ) |
return YoYIIS(t) in the notation of the book, the year on year swaplet price from S to T, at time t
Definition at line 911 of file crossassetmodel.cpp.
Here is the call graph for this function:| std::pair< Real, Real > crlgm1fS | ( | const Size | i, |
| const Size | ccy, | ||
| const Time | t, | ||
| const Time | T, | ||
| const Real | z, | ||
| const Real | y | ||
| ) | const |
returns (S(t), S^tilde(t,T)) in the notation of the book
Definition at line 928 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::pair< Real, Real > crcirppS | ( | const Size | i, |
| const Time | t, | ||
| const Time | T, | ||
| const Real | y, | ||
| const Real | s | ||
| ) | const |
returns (S(t), S^tilde(t,T)) in the notation of the book
Definition at line 975 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
tentative: more generic interface that is agnostic of the model type - so far only for CR
Definition at line 671 of file crossassetmodel.hpp.
Here is the call graph for this function:
|
virtual |
Definition at line 679 of file crossassetmodel.hpp.
Here is the call graph for this function:| void calibrateIrLgm1fVolatilitiesIterative | ( | const Size | ccy, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibration procedures
calibrate irlgm1f volatilities to a sequence of ir options with expiry times equal to step times in the parametrization
Definition at line 725 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateIrLgm1fReversionsIterative | ( | const Size | ccy, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate irlgm1f reversion to a sequence of ir options with maturities equal to step times in the parametrization
Definition at line 732 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateIrLgm1fGlobal | ( | const Size | ccy, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate irlgm1f parameters for one ccy globally to a set of ir options
Definition at line 739 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateBsVolatilitiesIterative | ( | const AssetType & | assetType, |
| const Size | aIdx, | ||
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate eq or fx volatilities to a sequence of options with expiry times equal to step times in the parametrization
Definition at line 747 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateBsVolatilitiesGlobal | ( | const AssetType & | assetType, |
| const Size | aIdx, | ||
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate eq/fx/com volatilities globally to a set of eq/fx/com options
Definition at line 760 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateInfDkVolatilitiesIterative | ( | const Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate infdk volatilities to a sequence of cpi options with expiry times equal to step times in the parametrization
Definition at line 770 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateInfDkReversionsIterative | ( | const Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate infdk reversions to a sequence of cpi options with maturity times equal to step times in the parametrization
Definition at line 781 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateInfDkVolatilitiesGlobal | ( | const Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate infdk volatilities globally to a sequence of cpi cap/floors
Definition at line 792 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateInfDkReversionsGlobal | ( | const Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate infdk reversions globally to a sequence of cpi cap/floors
Definition at line 800 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateInfJyGlobal | ( | QuantLib::Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< QuantLib::CalibrationHelper > > & | helpers, | ||
| QuantLib::OptimizationMethod & | method, | ||
| const QuantLib::EndCriteria & | endCriteria, | ||
| const std::map< QuantLib::Size, bool > & | toCalibrate, | ||
| const QuantLib::Constraint & | constraint = QuantLib::Constraint(), |
||
| const std::vector< QuantLib::Real > & | weights = std::vector<QuantLib::Real>() |
||
| ) |
Calibrate JY inflation parameters globally.
The parameter toCalibrate indicates which parameters of the JY inflation model that we want to calibrate. The map key should be in {0, 1, 2} where 0 indicates the real rate volatility, 1 indicates the real rate reversion and 2 indicates the inflation index volatility. The value is true if we wish to calibrate the parameter and false if we do not want to calibrate it.
Definition at line 808 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateInfJyIterative | ( | QuantLib::Size | inflationModelIndex, |
| QuantLib::Size | parameterIndex, | ||
| const std::vector< QuantLib::ext::shared_ptr< QuantLib::CalibrationHelper > > & | helpers, | ||
| QuantLib::OptimizationMethod & | method, | ||
| const QuantLib::EndCriteria & | endCriteria, | ||
| const QuantLib::Constraint & | constraint = QuantLib::Constraint(), |
||
| const std::vector< QuantLib::Real > & | weights = std::vector<QuantLib::Real>() |
||
| ) |
Calibrate a single JY inflation parameter iteratively.
Calibrate one of real rate volatility, real rate reversion or inflation index volatility. The parameterIndex indicates the parameter that should be calibrated where 0 indicates the real rate volatility, 1 indicates the real rate reversion and 2 indicates the inflation index volatility.
Definition at line 832 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateCrLgm1fVolatilitiesIterative | ( | const Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate crlgm1f volatilities to a sequence of cds options with expiry times equal to step times in the parametrization
Definition at line 846 of file crossassetmodel.cpp.
Here is the call graph for this function:| void calibrateCrLgm1fReversionsIterative | ( | const Size | index, |
| const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > & | helpers, | ||
| OptimizationMethod & | method, | ||
| const EndCriteria & | endCriteria, | ||
| const Constraint & | constraint = Constraint(), |
||
| const std::vector< Real > & | weights = std::vector<Real>() |
||
| ) |
calibrate crlgm1f reversions to a sequence of cds options with maturity times equal to step times in the parametrization
Definition at line 857 of file crossassetmodel.cpp.
Here is the call graph for this function:| std::vector< bool > MoveParameter | ( | const AssetType | t, |
| const Size | param, | ||
| const Size | index, | ||
| const Size | i | ||
| ) |
Definition at line 1062 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
number of arguments for a component
Definition at line 194 of file crossassetmodel.cpp.
Here is the caller graph for this function:
|
protected |
index of component in the arguments vector, by offset
Definition at line 237 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
asset and model type for given parametrization
Definition at line 299 of file crossassetmodel.cpp.
Here is the caller graph for this function:
|
protectedvirtual |
number of parameters for given parametrization
Definition at line 323 of file crossassetmodel.cpp.
Here is the caller graph for this function:
|
protectedvirtual |
number of brownians (excluding aux brownians) for given parametrization
Definition at line 325 of file crossassetmodel.cpp.
Here is the caller graph for this function:
|
protectedvirtual |
number of aux brownians for given parametrization
Definition at line 351 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
number of state variables for given parametrization
Definition at line 377 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
helper function to init component indices
Definition at line 405 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 264 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 430 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 649 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 691 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 699 of file crossassetmodel.cpp.
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 707 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protectedvirtual |
Definition at line 273 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 985 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 1015 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 1045 of file crossassetmodel.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticconstexpr |
Definition at line 64 of file crossassetmodel.hpp.
|
mutableprotected |
Definition at line 477 of file crossassetmodel.hpp.
|
protected |
Definition at line 477 of file crossassetmodel.hpp.
|
protected |
Definition at line 482 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 484 of file crossassetmodel.hpp.
|
protected |
Definition at line 485 of file crossassetmodel.hpp.
|
protected |
Definition at line 487 of file crossassetmodel.hpp.
|
protected |
Definition at line 487 of file crossassetmodel.hpp.
|
protected |
Definition at line 487 of file crossassetmodel.hpp.
|
protected |
Definition at line 487 of file crossassetmodel.hpp.
|
protected |
Definition at line 489 of file crossassetmodel.hpp.
|
protected |
Definition at line 491 of file crossassetmodel.hpp.
|
protected |
Definition at line 492 of file crossassetmodel.hpp.
|
protected |
Definition at line 493 of file crossassetmodel.hpp.
|
protected |
Definition at line 494 of file crossassetmodel.hpp.
|
protected |
Definition at line 495 of file crossassetmodel.hpp.
|
protected |
Definition at line 496 of file crossassetmodel.hpp.
|
protected |
Definition at line 497 of file crossassetmodel.hpp.
|
protected |
Definition at line 498 of file crossassetmodel.hpp.
|
protected |
Definition at line 499 of file crossassetmodel.hpp.
|
mutableprotected |
Definition at line 500 of file crossassetmodel.hpp.
|
mutableprotected |
Definition at line 501 of file crossassetmodel.hpp.