Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
LinearGaussMarkovModel Class Reference

Linear Gauss Morkov Model. More...

#include <qle/models/lgm.hpp>

+ Inheritance diagram for LinearGaussMarkovModel:
+ Collaboration diagram for LinearGaussMarkovModel:

Public Types

enum class  Discretization { Euler , Exact }
 
- Public Types inherited from IrModel
enum class  Measure { LGM , BA }
 

Public Member Functions

 LinearGaussMarkovModel (const QuantLib::ext::shared_ptr< IrLgm1fParametrization > &parametrization, const Measure measure=Measure::LGM, const Discretization=Discretization::Euler, const bool evaluateBankAccount=true, const QuantLib::ext::shared_ptr< Integrator > &integrator=QuantLib::ext::make_shared< SimpsonIntegral >(1.0E-8, 100))
 
Measure measure () const override
 IrModel interface. More...
 
const QuantLib::ext::shared_ptr< ParametrizationparametrizationBase () const override
 
Handle< YieldTermStructure > termStructure () const override
 
Size n () const override
 
Size m () const override
 
Size n_aux () const override
 
Size m_aux () const override
 
QuantLib::ext::shared_ptr< StochasticProcessstateProcess () const override
 
QuantLib::Real discountBond (const QuantLib::Time t, const QuantLib::Time T, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >()) const override
 
QuantLib::Real numeraire (const QuantLib::Time t, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const QuantLib::Array &aux=Array()) const override
 
QuantLib::Real shortRate (const QuantLib::Time t, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >()) const override
 
const QuantLib::ext::shared_ptr< IrLgm1fParametrizationparametrization () const
 LGM specific methods. More...
 
Real numeraire (const Time t, const Real x, const Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
 
Real bankAccountNumeraire (const Time t, const Real x, const Real y, const Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
 
Real discountBond (const Time t, const Time T, const Real x, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
 
Real reducedDiscountBond (const Time t, const Time T, const Real x, const Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
 
Real discountBondOption (Option::Type type, const Real K, const Time t, const Time S, const Time T, Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
 
void calibrateVolatilitiesIterative (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 calibrateReversionsIterative (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 calibrateVolatilities (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 calibrateReversions (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 update () override
 
void generateArguments () override
 
std::vector< boolMoveVolatility (const Size i)
 
std::vector< boolMoveReversion (const Size i)
 
void setCalibrationInfo (const LgmCalibrationInfo &calibrationInfo)
 
const LgmCalibrationInfogetCalibrationInfo () const
 
virtual Measure measure () const =0
 
virtual const QuantLib::ext::shared_ptr< ParametrizationparametrizationBase () const =0
 
virtual Handle< YieldTermStructure > termStructure () const =0
 
virtual Size n () const =0
 
virtual Size m () const =0
 
virtual Size n_aux () const =0
 
virtual Size m_aux () const =0
 
virtual QuantLib::ext::shared_ptr< StochasticProcessstateProcess () const =0
 
virtual QuantLib::Real discountBond (const QuantLib::Time t, const QuantLib::Time T, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >()) const =0
 
virtual QuantLib::Real numeraire (const QuantLib::Time t, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const QuantLib::Array &aux=Array()) const =0
 
virtual QuantLib::Real shortRate (const QuantLib::Time t, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >()) const =0
 
- 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 &params, const std::vector< QuantLib::ext::shared_ptr< CalibrationHelper > > &)
 
Real value (const Array &params, 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 &params)
 
virtual void setParam (Size idx, const Real value)
 

Private Attributes

QuantLib::ext::shared_ptr< IrLgm1fParametrizationparametrization_
 
QuantLib::ext::shared_ptr< Integrator > integrator_
 
Measure measure_
 
Discretization discretization_
 
bool evaluateBankAccount_
 
QuantLib::ext::shared_ptr< StochasticProcess1DstateProcess_
 
LgmCalibrationInfo calibrationInfo_
 

Additional Inherited Members

virtual void generateArguments ()
 
- Protected Attributes inherited from LinkableCalibratedModel
std::vector< QuantLib::ext::shared_ptr< Parameter > > arguments_
 
QuantLib::ext::shared_ptr< Constraintconstraint_
 
EndCriteria::Type endCriteria_
 
Array problemValues_
 

Detailed Description

Linear Gauss Morkov Model.

LGM 1f interest rate model Basically the same remarks as for CrossAssetModel hold

Definition at line 46 of file lgm.hpp.

Member Enumeration Documentation

◆ Discretization

enum class Discretization
strong

Constructor & Destructor Documentation

◆ LinearGaussMarkovModel()

LinearGaussMarkovModel ( const QuantLib::ext::shared_ptr< IrLgm1fParametrization > &  parametrization,
const Measure  measure = Measure::LGM,
const Discretization  discretization = Discretization::Euler,
const bool  evaluateBankAccount = true,
const QuantLib::ext::shared_ptr< Integrator > &  integrator = QuantLib::ext::make_shared<SimpsonIntegral>(1.0E-8,                                                                                                                 100) 
)

Definition at line 26 of file lgm.cpp.

31 evaluateBankAccount_(evaluateBankAccount) {
32 QL_REQUIRE(parametrization_ != nullptr, "HwModel: parametrization is null");
33 stateProcess_ = QuantLib::ext::make_shared<IrLgm1fStateProcess>(parametrization_);
34 arguments_.resize(2);
35 arguments_[0] = parametrization_->parameter(0);
36 arguments_[1] = parametrization_->parameter(1);
37 registerWith(parametrization_->termStructure());
38
39 std::vector<Time> allTimes;
40 for (Size i = 0; i < 2; ++i)
41 allTimes.insert(allTimes.end(), parametrization_->parameterTimes(i).begin(),
42 parametrization_->parameterTimes(i).end());
43
44 integrator_ = QuantLib::ext::make_shared<PiecewiseIntegral>(integrator, allTimes, true);
45}
const QuantLib::ext::shared_ptr< IrLgm1fParametrization > parametrization() const
LGM specific methods.
Definition: lgm.hpp:201
Measure measure() const override
IrModel interface.
Definition: lgm.hpp:58
QuantLib::ext::shared_ptr< IrLgm1fParametrization > parametrization_
Definition: lgm.hpp:155
QuantLib::ext::shared_ptr< StochasticProcess1D > stateProcess_
Definition: lgm.hpp:160
Discretization discretization_
Definition: lgm.hpp:158
QuantLib::ext::shared_ptr< Integrator > integrator_
Definition: lgm.hpp:156
std::vector< QuantLib::ext::shared_ptr< Parameter > > arguments_

Member Function Documentation

◆ measure()

Measure measure ( ) const
overridevirtual

IrModel interface.

Implements IrModel.

Definition at line 58 of file lgm.hpp.

58{ return measure_; }
+ Here is the caller graph for this function:

◆ parametrizationBase()

const QuantLib::ext::shared_ptr< Parametrization > parametrizationBase ( ) const
overridevirtual

parametrization (as base class)

Implements IrModel.

Definition at line 59 of file lgm.hpp.

59{ return parametrization_; }

◆ termStructure()

Handle< YieldTermStructure > termStructure ( ) const
overridevirtual

yield term structure to which the IrModel is (initially) calibrated

Implements IrModel.

Definition at line 60 of file lgm.hpp.

60{ return parametrization_->termStructure(); }

◆ n()

Size n ( ) const
overridevirtual

dimension of model state, excluding auxilliary states

Implements IrModel.

Definition at line 58 of file lgm.cpp.

58{ return 1; }
+ Here is the caller graph for this function:

◆ m()

Size m ( ) const
overridevirtual

number of Brownians to evolve the state

Implements IrModel.

Definition at line 59 of file lgm.cpp.

59{ return 1; }

◆ n_aux()

Size n_aux ( ) const
overridevirtual

(effective) dimension of auxilliary state, typically to evaluate the numeraire in the BA-measure

Implements IrModel.

Definition at line 60 of file lgm.cpp.

+ Here is the caller graph for this function:

◆ m_aux()

Size m_aux ( ) const
overridevirtual

(effective) number of Brownians required to evolve the auxilliary state, typcially for exact discretization schemes

Implements IrModel.

Definition at line 61 of file lgm.cpp.

+ Here is the caller graph for this function:

◆ stateProcess()

QuantLib::ext::shared_ptr< StochasticProcess > stateProcess ( ) const
overridevirtual

stochastic process, this has dimension n() + n_aux() and m() + m_aux() Brownian drivers

Implements IrModel.

Definition at line 175 of file lgm.hpp.

175 {
176 QL_REQUIRE(measure_ == Measure::LGM, "LinearGaussMarkovModel::stateProcess() only supports measure = LGM");
177 return stateProcess_;
178}

◆ discountBond() [1/2]

QuantLib::Real discountBond ( const QuantLib::Time  t,
const QuantLib::Time  T,
const QuantLib::Array &  x,
const QuantLib::Handle< QuantLib::YieldTermStructure > &  discountCurve = Handle< YieldTermStructure >() 
) const
overridevirtual

discount bond depending on state (of dimension n())

Implements IrModel.

Definition at line 181 of file lgm.hpp.

182 {
183 QL_REQUIRE(x.size() == n(), "LinearGaussMarkovModel::discountBond() requires input state of dimension " << n());
184 return discountBond(t, T, x[0], discountCurve);
185}
Size n() const override
Definition: lgm.cpp:58
QuantLib::Real discountBond(const QuantLib::Time t, const QuantLib::Time T, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >()) const override
Definition: lgm.hpp:181
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ numeraire() [1/2]

QuantLib::Real numeraire ( const QuantLib::Time  t,
const QuantLib::Array &  x,
const QuantLib::Handle< QuantLib::YieldTermStructure > &  discountCurve = Handle< YieldTermStructure >(),
const QuantLib::Array &  aux = Array() 
) const
overridevirtual

numeraire depending on state and aux state (of dimensions n(), n_aux()

Implements IrModel.

Definition at line 188 of file lgm.hpp.

190 {
191 QL_REQUIRE(x.size() == n(), "LinearGaussMarkovModel::numeraire() requires input state of dimension " << n());
192 QL_REQUIRE(aux.size() == n_aux(),
193 "LinearGaussMarkovModel::numeraire() requires aux input state of dimension " << n_aux());
194 if (measure() == Measure::LGM) {
195 return numeraire(t, x[0], discountCurve);
196 } else {
197 return bankAccountNumeraire(t, x[0], aux[0], discountCurve);
198 }
199}
Size n_aux() const override
Definition: lgm.cpp:60
Real bankAccountNumeraire(const Time t, const Real x, const Real y, const Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >()) const
Definition: lgm.cpp:47
QuantLib::Real numeraire(const QuantLib::Time t, const QuantLib::Array &x, const QuantLib::Handle< QuantLib::YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const QuantLib::Array &aux=Array()) const override
Definition: lgm.hpp:188
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shortRate()

QuantLib::Real shortRate ( const QuantLib::Time  t,
const QuantLib::Array &  x,
const QuantLib::Handle< QuantLib::YieldTermStructure > &  discountCurve = Handle< YieldTermStructure >() 
) const
overridevirtual

short rate at t

Implements IrModel.

Definition at line 227 of file lgm.hpp.

228 {
229 QL_FAIL("LGM does not provide short rate.");
230}

◆ parametrization()

const QuantLib::ext::shared_ptr< IrLgm1fParametrization > parametrization ( ) const

LGM specific methods.

Definition at line 201 of file lgm.hpp.

201 {
202 return parametrization_;
203}

◆ numeraire() [2/2]

Real numeraire ( const Time  t,
const Real  x,
const Handle< YieldTermStructure >  discountCurve = Handle<YieldTermStructure>() 
) const

Definition at line 205 of file lgm.hpp.

206 {
207 QL_REQUIRE(t >= 0.0, "t (" << t << ") >= 0 required in LGM::numeraire");
208 Real Ht = parametrization_->H(t);
209 return std::exp(Ht * x + 0.5 * Ht * Ht * parametrization_->zeta(t)) /
210 (discountCurve.empty() ? parametrization_->termStructure()->discount(t) : discountCurve->discount(t));
211}

◆ bankAccountNumeraire()

Real bankAccountNumeraire ( const Time  t,
const Real  x,
const Real  y,
const Handle< YieldTermStructure >  discountCurve = Handle<YieldTermStructure>() 
) const

Bank account measure numeraire B(t) as a function of LGM state variable x (with drift) and auxiliary state variable y

Definition at line 47 of file lgm.cpp.

48 {
49 QL_REQUIRE(t >= 0.0, "t (" << t << ") >= 0 required in LGM::bankAccountNumeraire");
50 Real Ht = parametrization_->H(t);
51 Real zeta0 = parametrization_->zeta(t);
52 Real zeta2 = parametrization_->zetan(2, t, integrator_);
53 Real Vt = 0.5 * (Ht * Ht * zeta0 + zeta2);
54 return std::exp(Ht * x - y + Vt) /
55 (discountCurve.empty() ? parametrization_->termStructure()->discount(t) : discountCurve->discount(t));
56}
+ Here is the caller graph for this function:

◆ discountBond() [2/2]

Real discountBond ( const Time  t,
const Time  T,
const Real  x,
Handle< YieldTermStructure >  discountCurve = Handle<YieldTermStructure>() 
) const

Definition at line 213 of file lgm.hpp.

214 {
215 if (QuantLib::close_enough(t, T))
216 return 1.0;
217 QL_REQUIRE(T >= t && t >= 0.0, "T(" << T << ") >= t(" << t << ") >= 0 required in LGM::discountBond");
218 Real Ht = parametrization_->H(t);
219 Real HT = parametrization_->H(T);
220 return (discountCurve.empty()
221 ? parametrization_->termStructure()->discount(T) / parametrization_->termStructure()->discount(t)
222 : discountCurve->discount(T) / discountCurve->discount(t)) *
223 std::exp(-(HT - Ht) * x - 0.5 * (HT * HT - Ht * Ht) * parametrization_->zeta(t));
224}

◆ reducedDiscountBond()

Real reducedDiscountBond ( const Time  t,
const Time  T,
const Real  x,
const Handle< YieldTermStructure >  discountCurve = Handle<YieldTermStructure>() 
) const

Definition at line 232 of file lgm.hpp.

233 {
234 if (QuantLib::close_enough(t, T))
235 return 1.0 / numeraire(t, x, discountCurve);
236 QL_REQUIRE(T >= t && t >= 0.0, "T(" << T << ") >= t(" << t << ") >= 0 required in LGM::reducedDiscountBond");
237 Real HT = parametrization_->H(T);
238 return (discountCurve.empty() ? parametrization_->termStructure()->discount(T) : discountCurve->discount(T)) *
239 std::exp(-HT * x - 0.5 * HT * HT * parametrization_->zeta(t));
240}
+ Here is the call graph for this function:

◆ discountBondOption()

Real discountBondOption ( Option::Type  type,
const Real  K,
const Time  t,
const Time  S,
const Time  T,
Handle< YieldTermStructure >  discountCurve = Handle<YieldTermStructure>() 
) const

Definition at line 242 of file lgm.hpp.

244 {
245 QL_REQUIRE(T > S && S >= t && t >= 0.0,
246 "T(" << T << ") > S(" << S << ") >= t(" << t << ") >= 0 required in LGM::discountBondOption");
247 Real w = (type == Option::Call ? 1.0 : -1.0);
248 Real pS = discountCurve.empty() ? parametrization_->termStructure()->discount(S) : discountCurve->discount(S);
249 Real pT = discountCurve.empty() ? parametrization_->termStructure()->discount(T) : discountCurve->discount(T);
250 // slight generalization of Lichters, Stamm, Gallagher 11.2.1
251 // with t < S, SSRN: https://ssrn.com/abstract=2246054
252 Real sigma = std::sqrt(parametrization_->zeta(t)) * (parametrization_->H(T) - parametrization_->H(S));
253 Real dp = std::log(pT / (K * pS)) / sigma + 0.5 * sigma * sigma;
254 Real dm = dp - sigma;
255 CumulativeNormalDistribution N;
256 return w * (pT * N(w * dp) - pS * K * N(w * dm));
257}

◆ calibrateVolatilitiesIterative()

void calibrateVolatilitiesIterative ( 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 volatilities to a sequence of ir options with expiry times equal to step times in the parametrization

Definition at line 259 of file lgm.hpp.

261 {
262 for (Size i = 0; i < helpers.size(); ++i) {
263 std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>> h(1, helpers[i]);
264 calibrate(h, method, endCriteria, constraint, weights, MoveVolatility(i));
265 }
266 update();
267}
void update() override
Definition: lgm.hpp:168
std::vector< bool > MoveVolatility(const Size i)
Definition: lgm.hpp:133
const QuantLib::ext::shared_ptr< Constraint > & constraint() const
EndCriteria::Type endCriteria() const
Returns end criteria result.
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)
+ Here is the call graph for this function:

◆ calibrateReversionsIterative()

void calibrateReversionsIterative ( 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 reversion to a sequence of ir options with maturities equal to step times in the parametrization

Definition at line 269 of file lgm.hpp.

271 {
272 for (Size i = 0; i < helpers.size(); ++i) {
273 std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>> h(1, helpers[i]);
274 calibrate(h, method, endCriteria, constraint, weights, MoveReversion(i));
275 }
276 update();
277}
std::vector< bool > MoveReversion(const Size i)
Definition: lgm.hpp:141
+ Here is the call graph for this function:

◆ calibrateVolatilities()

void calibrateVolatilities ( 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 volatilities globally

Definition at line 280 of file lgm.hpp.

282 {
283 std::vector<bool> moveVols(parametrization_->parameter(0)->size() + parametrization_->parameter(1)->size(), true);
284 for (Size i = 0; i < parametrization_->parameter(0)->size(); ++i)
285 moveVols[i] = false;
286 calibrate(helpers, method, endCriteria, constraint, weights, moveVols);
287 update();
288}
+ Here is the call graph for this function:

◆ calibrateReversions()

void calibrateReversions ( 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 volatilities globally

Definition at line 291 of file lgm.hpp.

293 {
294 std::vector<bool> moveRevs(parametrization_->parameter(0)->size() + parametrization_->parameter(1)->size(), true);
295 for (Size i = 0; i < parametrization_->parameter(1)->size(); ++i)
296 moveRevs[parametrization_->parameter(0)->size() + i] = false;
297 calibrate(helpers, method, endCriteria, constraint, weights, moveRevs);
298 update();
299}
+ Here is the call graph for this function:

◆ update()

void update ( )
override

observer and linked calibrated model interface

Definition at line 168 of file lgm.hpp.

168 {
169 parametrization_->update();
170 notifyObservers();
171}
+ Here is the caller graph for this function:

◆ generateArguments()

void generateArguments ( )
overridevirtual

Reimplemented from LinkableCalibratedModel.

Definition at line 173 of file lgm.hpp.

173{ update(); }
+ Here is the call graph for this function:

◆ MoveVolatility()

std::vector< bool > MoveVolatility ( const Size  i)

calibration constraints, these can be used directly, or through the customized calibrate methods above

Definition at line 133 of file lgm.hpp.

133 {
134 QL_REQUIRE(i < parametrization_->parameter(0)->size(),
135 "volatility index (" << i << ") out of range 0..." << parametrization_->parameter(0)->size() - 1);
136 std::vector<bool> res(parametrization_->parameter(0)->size() + parametrization_->parameter(1)->size(), true);
137 res[i] = false;
138 return res;
139 }
+ Here is the caller graph for this function:

◆ MoveReversion()

std::vector< bool > MoveReversion ( const Size  i)

Definition at line 141 of file lgm.hpp.

141 {
142 QL_REQUIRE(i < parametrization_->parameter(1)->size(),
143 "reversion index (" << i << ") out of range 0..." << parametrization_->parameter(1)->size() - 1);
144 std::vector<bool> res(parametrization_->parameter(0)->size() + parametrization_->parameter(1)->size(), true);
145 res[parametrization_->parameter(0)->size() + i] = false;
146 return res;
147 }
+ Here is the caller graph for this function:

◆ setCalibrationInfo()

void setCalibrationInfo ( const LgmCalibrationInfo calibrationInfo)

set info on how the model was calibrated

Definition at line 150 of file lgm.hpp.

150{ calibrationInfo_ = calibrationInfo; }
LgmCalibrationInfo calibrationInfo_
Definition: lgm.hpp:161

◆ getCalibrationInfo()

const LgmCalibrationInfo & getCalibrationInfo ( ) const

get info on how the model was calibrated

Definition at line 152 of file lgm.hpp.

152{ return calibrationInfo_; }

Member Data Documentation

◆ parametrization_

QuantLib::ext::shared_ptr<IrLgm1fParametrization> parametrization_
private

Definition at line 155 of file lgm.hpp.

◆ integrator_

QuantLib::ext::shared_ptr<Integrator> integrator_
private

Definition at line 156 of file lgm.hpp.

◆ measure_

Measure measure_
private

Definition at line 157 of file lgm.hpp.

◆ discretization_

Discretization discretization_
private

Definition at line 158 of file lgm.hpp.

◆ evaluateBankAccount_

bool evaluateBankAccount_
private

Definition at line 159 of file lgm.hpp.

◆ stateProcess_

QuantLib::ext::shared_ptr<StochasticProcess1D> stateProcess_
private

Definition at line 160 of file lgm.hpp.

◆ calibrationInfo_

LgmCalibrationInfo calibrationInfo_
private

Definition at line 161 of file lgm.hpp.