QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
Gsr Class Reference

One factor gsr model, formulation is in forward measure. More...

#include <ql/models/shortrate/onefactormodels/gsr.hpp>

Inheritance diagram for Gsr:

Public Member Functions

 Gsr (const Handle< YieldTermStructure > &termStructure, std::vector< Date > volstepdates, const std::vector< Real > &volatilities, Real reversion, Real T=60.0)
 Gsr (const Handle< YieldTermStructure > &termStructure, std::vector< Date > volstepdates, const std::vector< Real > &volatilities, const std::vector< Real > &reversions, Real T=60.0)
 Gsr (const Handle< YieldTermStructure > &termStructure, std::vector< Date > volstepdates, std::vector< Handle< Quote > > volatilities, const Handle< Quote > &reversion, Real T=60.0)
 Gsr (const Handle< YieldTermStructure > &termStructure, std::vector< Date > volstepdates, std::vector< Handle< Quote > > volatilities, std::vector< Handle< Quote > > reversions, Real T=60.0)
Real numeraireTime () const
void numeraireTime (Real T)
const Arrayreversion () const
const Arrayvolatility () const
std::vector< bool > FixedReversions ()
std::vector< bool > FixedVolatilities ()
std::vector< bool > MoveVolatility (Size i)
std::vector< bool > MoveReversion (Size i)
void calibrateVolatilitiesIterative (const std::vector< 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< ext::shared_ptr< BlackCalibrationHelper > > &helpers, OptimizationMethod &method, const EndCriteria &endCriteria, const Constraint &constraint=Constraint(), const std::vector< Real > &weights=std::vector< Real >())
Public Member Functions inherited from Gaussian1dModel
ext::shared_ptr< StochasticProcess1DstateProcess () const
Real numeraire (Time t, Real y=0.0, const Handle< YieldTermStructure > &yts=Handle< YieldTermStructure >()) const
Real zerobond (Time T, Time t=0.0, Real y=0.0, const Handle< YieldTermStructure > &yts=Handle< YieldTermStructure >()) const
Real numeraire (const Date &referenceDate, Real y=0.0, const Handle< YieldTermStructure > &yts=Handle< YieldTermStructure >()) const
Real zerobond (const Date &maturity, const Date &referenceDate=Date(), Real y=0.0, const Handle< YieldTermStructure > &yts=Handle< YieldTermStructure >()) const
Real zerobondOption (const Option::Type &type, const Date &expiry, const Date &valueDate, const Date &maturity, Rate strike, const Date &referenceDate=Date(), Real y=0.0, const Handle< YieldTermStructure > &yts=Handle< YieldTermStructure >(), Real yStdDevs=7.0, Size yGridPoints=64, bool extrapolatePayoff=true, bool flatPayoffExtrapolation=false) const
Real forwardRate (const Date &fixing, const Date &referenceDate=Date(), Real y=0.0, const ext::shared_ptr< IborIndex > &iborIdx=ext::shared_ptr< IborIndex >()) const
Real swapRate (const Date &fixing, const Period &tenor, const Date &referenceDate=Date(), Real y=0.0, const ext::shared_ptr< SwapIndex > &swapIdx=ext::shared_ptr< SwapIndex >()) const
Real swapAnnuity (const Date &fixing, const Period &tenor, const Date &referenceDate=Date(), Real y=0.0, const ext::shared_ptr< SwapIndex > &swapIdx=ext::shared_ptr< SwapIndex >()) const
Array yGrid (Real yStdDevs, int gridPoints, Real T=1.0, Real t=0, Real y=0) const
Public Member Functions inherited from TermStructureConsistentModel
 TermStructureConsistentModel (Handle< YieldTermStructure > termStructure)
const Handle< YieldTermStructure > & termStructure () const
Public Member Functions inherited from Observable
 Observable (const Observable &)
Observableoperator= (const Observable &)
 Observable (Observable &&)=delete
Observableoperator= (Observable &&)=delete
void notifyObservers ()
Public Member Functions inherited from LazyObject
void update () override
bool isCalculated () const
void forwardFirstNotificationOnly ()
void alwaysForwardNotifications ()
void recalculate ()
void freeze ()
void unfreeze ()
Public Member Functions inherited from Observer
 Observer (const Observer &)
Observeroperator= (const Observer &)
std::pair< iterator, bool > registerWith (const ext::shared_ptr< Observable > &)
void registerWithObservables (const ext::shared_ptr< Observer > &)
Size unregisterWith (const ext::shared_ptr< Observable > &)
void unregisterWithAll ()
virtual void deepUpdate ()
Public Member Functions inherited from CalibratedModel
 CalibratedModel (Size nArguments)
virtual void calibrate (const std::vector< 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)
Real value (const Array &params, const std::vector< ext::shared_ptr< CalibrationHelper > > &)
const ext::shared_ptr< Constraint > & constraint () const
EndCriteria::Type endCriteria () const
 Returns end criteria result.
const ArrayproblemValues () const
 Returns the problem values.
Array params () const
 Returns array of arguments on which calibration is done.
virtual void setParams (const Array &params)
Integer functionEvaluation () const

Protected Member Functions

Real numeraireImpl (Time t, Real y, const Handle< YieldTermStructure > &yts) const override
Real zerobondImpl (Time T, Time t, Real y, const Handle< YieldTermStructure > &yts) const override
void generateArguments () override
void update () override
void performCalculations () const override
Protected Member Functions inherited from Gaussian1dModel
 Gaussian1dModel (const Handle< YieldTermStructure > &yieldTermStructure)
void generateArguments ()
ext::shared_ptr< VanillaSwapunderlyingSwap (const ext::shared_ptr< SwapIndex > &index, const Date &expiry, const Period &tenor) const
virtual void calculate () const

Additional Inherited Members

Public Types inherited from Observer
typedef set_type::iterator iterator
Static Public Member Functions inherited from Gaussian1dModel
static Real gaussianPolynomialIntegral (Real a, Real b, Real c, Real d, Real e, Real x0, Real x1)
static Real gaussianShiftedPolynomialIntegral (Real a, Real b, Real c, Real d, Real e, Real h, Real x0, Real x1)
Protected Attributes inherited from Gaussian1dModel
ext::shared_ptr< StochasticProcess1DstateProcess_
Date evaluationDate_
bool enforcesTodaysHistoricFixings_
bool calculated_ = false
bool frozen_ = false
bool alwaysForward_
Protected Attributes inherited from CalibratedModel
std::vector< Parameterarguments_
ext::shared_ptr< Constraintconstraint_
EndCriteria::Type shortRateEndCriteria_ = EndCriteria::None
Array problemValues_
Integer functionEvaluation_

Detailed Description

One factor gsr model, formulation is in forward measure.

Member Function Documentation

◆ numeraireImpl()

Real numeraireImpl ( Time t,
Real y,
const Handle< YieldTermStructure > & yts ) const
overrideprotectedvirtual

Implements Gaussian1dModel.

◆ zerobondImpl()

Real zerobondImpl ( Time T,
Time t,
Real y,
const Handle< YieldTermStructure > & yts ) const
overrideprotectedvirtual

Implements Gaussian1dModel.

◆ generateArguments()

void generateArguments ( )
overrideprotectedvirtual

Reimplemented from CalibratedModel.

◆ update()

void update ( )
overrideprotectedvirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

◆ performCalculations()

void performCalculations ( ) const
overrideprotectedvirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Reimplemented from Gaussian1dModel.