- QuantLib
- FittedBondDiscountCurve
Discount curve fitted to a set of fixed-coupon bonds. More...
#include <ql/termstructures/yield/fittedbonddiscountcurve.hpp>
Classes | |
class | FittingMethod |
Base fitting method used to construct a fitted bond discount curve. More... | |
Public Member Functions | |
Constructors | |
FittedBondDiscountCurve (Natural settlementDays, const Calendar &calendar, const std::vector< boost::shared_ptr< BondHelper > > &bonds, const DayCounter &dayCounter, const FittingMethod &fittingMethod, Real accuracy=1.0e-10, Size maxEvaluations=10000, const Array &guess=Array(), Real simplexLambda=1.0) | |
reference date based on current evaluation date | |
FittedBondDiscountCurve (const Date &referenceDate, const std::vector< boost::shared_ptr< BondHelper > > &bonds, const DayCounter &dayCounter, const FittingMethod &fittingMethod, Real accuracy=1.0e-10, Size maxEvaluations=10000, const Array &guess=Array(), Real simplexLambda=1.0) | |
curve reference date fixed for life of curve | |
FittedBondDiscountCurve (Natural settlementDays, const Calendar &calendar, const std::vector< boost::shared_ptr< FixedRateBondHelper > > &bonds, const DayCounter &dayCounter, const FittingMethod &fittingMethod, Real accuracy=1.0e-10, Size maxEvaluations=10000, const Array &guess=Array(), Real simplexLambda=1.0) | |
reference date based on current evaluation date | |
FittedBondDiscountCurve (const Date &referenceDate, const std::vector< boost::shared_ptr< FixedRateBondHelper > > &bonds, const DayCounter &dayCounter, const FittingMethod &fittingMethod, Real accuracy=1.0e-10, Size maxEvaluations=10000, const Array &guess=Array(), Real simplexLambda=1.0) | |
curve reference date fixed for life of curve | |
Inspectors | |
Size | numberOfBonds () const |
total number of bonds used to fit the yield curve | |
Date | maxDate () const |
the latest date for which the curve can return values | |
const FittingMethod & | fitResults () const |
class holding the results of the fit | |
Observer interface | |
void | update () |
Friends | |
class | FittingMethod |
Discount curve fitted to a set of fixed-coupon bonds.
This class fits a discount function over a set of bonds, using a user defined fitting method. The discount function is fit in such a way so that all cashflows of all input bonds, when discounted using
, will reproduce the set of input bond prices in an optimized sense. Minimized price errors are weighted by the inverse of their respective bond duration.
The FittedBondDiscountCurve class acts as a generic wrapper, while its inner class FittingMethod provides the implementation details. Developers thus need only derive new fitting methods from the latter.
Example: compares various bond discount curve fitting methodologies
void update | ( | ) | [virtual] |
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.
Reimplemented from LazyObject.