QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LiborForwardModel Class Reference

Libor forward model More...

#include <liborforwardmodel.hpp>

+ Inheritance diagram for LiborForwardModel:
+ Collaboration diagram for LiborForwardModel:

Public Member Functions

 LiborForwardModel (const ext::shared_ptr< LiborForwardModelProcess > &process, const ext::shared_ptr< LmVolatilityModel > &volaModel, const ext::shared_ptr< LmCorrelationModel > &corrModel)
 
Rate S_0 (Size alpha, Size beta) const
 
virtual ext::shared_ptr< SwaptionVolatilityMatrixgetSwaptionVolatilityMatrix () const
 
DiscountFactor discount (Time t) const override
 Implied discount curve. More...
 
Real discountBond (Time now, Time maturity, Array factors) const override
 
Real discountBondOption (Option::Type type, Real strike, Time maturity, Time bondMaturity) const override
 
void setParams (const Array &params) override
 
- Public Member Functions inherited from CalibratedModel
 CalibratedModel (Size nArguments)
 
void update () override
 
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) More...
 
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. More...
 
const ArrayproblemValues () 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)
 
Integer functionEvaluation () const
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from AffineModel
virtual DiscountFactor discount (Time t) const =0
 Implied discount curve. More...
 
virtual Real discountBond (Time now, Time maturity, Array factors) const =0
 
virtual Real discountBondOption (Option::Type type, Real strike, Time maturity, Time bondMaturity) const =0
 
virtual Real discountBondOption (Option::Type type, Real strike, Time maturity, Time bondStart, Time bondMaturity) const
 

Protected Member Functions

Array w_0 (Size alpha, Size beta) const
 
- Protected Member Functions inherited from CalibratedModel
virtual void generateArguments ()
 

Protected Attributes

std::vector< Realf_
 
std::vector< TimeaccrualPeriod_
 
const ext::shared_ptr< LfmCovarianceProxycovarProxy_
 
const ext::shared_ptr< LiborForwardModelProcessprocess_
 
ext::shared_ptr< SwaptionVolatilityMatrixswaptionVola
 
- Protected Attributes inherited from CalibratedModel
std::vector< Parameterarguments_
 
ext::shared_ptr< Constraintconstraint_
 
EndCriteria::Type shortRateEndCriteria_ = EndCriteria::None
 
Array problemValues_
 
Integer functionEvaluation_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

Libor forward model

References:

Stefan Weber, 2005, Efficient Calibration for Libor Market Models, (http://workshop.mathfinance.de/2005/papers/weber/slides.pdf)

Damiano Brigo, Fabio Mercurio, Massimo Morini, 2003, Different Covariance Parameterizations of Libor Market Model and Joint Caps/Swaptions Calibration, (http://www.business.uts.edu.au/qfrc/conferences/qmf2001/Brigo_D.pdf

Tests:
the correctness is tested using Monte-Carlo Simulation to reproduce swaption npvs, model calibration and exact cap pricing

Definition at line 51 of file liborforwardmodel.hpp.

Constructor & Destructor Documentation

◆ LiborForwardModel()

LiborForwardModel ( const ext::shared_ptr< LiborForwardModelProcess > &  process,
const ext::shared_ptr< LmVolatilityModel > &  volaModel,
const ext::shared_ptr< LmCorrelationModel > &  corrModel 
)

Definition at line 27 of file liborforwardmodel.cpp.

Member Function Documentation

◆ S_0()

Rate S_0 ( Size  alpha,
Size  beta 
) const

Definition at line 130 of file liborforwardmodel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSwaptionVolatilityMatrix()

ext::shared_ptr< SwaptionVolatilityMatrix > getSwaptionVolatilityMatrix ( ) const
virtual

Definition at line 148 of file liborforwardmodel.cpp.

+ Here is the call graph for this function:

◆ discount()

DiscountFactor discount ( Time  t) const
overridevirtual

Implied discount curve.

Implements AffineModel.

Definition at line 203 of file liborforwardmodel.cpp.

+ Here is the caller graph for this function:

◆ discountBond()

Real discountBond ( Time  now,
Time  maturity,
Array  factors 
) const
overridevirtual

Implements AffineModel.

Definition at line 207 of file liborforwardmodel.cpp.

+ Here is the call graph for this function:

◆ discountBondOption()

Real discountBondOption ( Option::Type  type,
Real  strike,
Time  maturity,
Time  bondMaturity 
) const
overridevirtual

Implements AffineModel.

Definition at line 64 of file liborforwardmodel.cpp.

+ Here is the call graph for this function:

◆ setParams()

void setParams ( const Array params)
overridevirtual

Reimplemented from CalibratedModel.

Definition at line 51 of file liborforwardmodel.cpp.

+ Here is the call graph for this function:

◆ w_0()

Array w_0 ( Size  alpha,
Size  beta 
) const
protected

Definition at line 105 of file liborforwardmodel.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ f_

std::vector<Real> f_
protected

Definition at line 76 of file liborforwardmodel.hpp.

◆ accrualPeriod_

std::vector<Time> accrualPeriod_
protected

Definition at line 77 of file liborforwardmodel.hpp.

◆ covarProxy_

const ext::shared_ptr<LfmCovarianceProxy> covarProxy_
protected

Definition at line 79 of file liborforwardmodel.hpp.

◆ process_

const ext::shared_ptr<LiborForwardModelProcess> process_
protected

Definition at line 80 of file liborforwardmodel.hpp.

◆ swaptionVola

ext::shared_ptr<SwaptionVolatilityMatrix> swaptionVola
mutableprotected

Definition at line 82 of file liborforwardmodel.hpp.