QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Calibrated model class. More...
#include <model.hpp>
Classes | |
class | PrivateConstraint |
Public Member Functions | |
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 ¶ms, const std::vector< ext::shared_ptr< CalibrationHelper > > &) |
const 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) |
Integer | functionEvaluation () const |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~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 | update ()=0 |
virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Protected Member Functions | |
virtual void | generateArguments () |
Protected Attributes | |
std::vector< Parameter > | arguments_ |
ext::shared_ptr< Constraint > | constraint_ |
EndCriteria::Type | shortRateEndCriteria_ = EndCriteria::None |
Array | problemValues_ |
Integer | functionEvaluation_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
CalibratedModel | ( | Size | nArguments | ) |
|
overridevirtual |
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.
Reimplemented in Gsr, MarkovFunctional, and GridModelLocalVolSurface.
Definition at line 90 of file model.hpp.
|
virtual |
Calibrate to a set of market instruments (usually caps/swaptions)
An additional constraint can be passed which must be satisfied in addition to the constraints of the model.
Reimplemented in MarkovFunctional.
Definition at line 75 of file model.cpp.
Real value | ( | const Array & | params, |
const std::vector< ext::shared_ptr< CalibrationHelper > > & | instruments | ||
) |
const ext::shared_ptr< Constraint > & constraint | ( | ) | const |
EndCriteria::Type endCriteria | ( | ) | const |
const Array & problemValues | ( | ) | const |
Array params | ( | ) | const |
|
virtual |
Reimplemented in LiborForwardModel.
Definition at line 138 of file model.cpp.
|
protectedvirtual |
Reimplemented in GeneralizedHullWhite, VarianceGammaModel, BatesModel, GJRGARCHModel, HestonModel, ExtendedCoxIngersollRoss, Gsr, HullWhite, MarkovFunctional, G2, and GridModelLocalVolSurface.
Definition at line 125 of file model.hpp.
|
protected |
|
protected |