QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Global boostrapper, with additional restrictions. More...
#include <globalbootstrap.hpp>
Public Member Functions | |
GlobalBootstrap (Real accuracy=Null< Real >()) | |
GlobalBootstrap (std::vector< ext::shared_ptr< typename Traits::helper > > additionalHelpers, ext::function< std::vector< Date >()> additionalDates, ext::function< Array()> additionalErrors, Real accuracy=Null< Real >()) | |
void | setup (Curve *ts) |
void | calculate () const |
Private Types | |
typedef Curve::traits_type | Traits |
typedef Curve::interpolator_type | Interpolator |
Private Member Functions | |
void | initialize () const |
Private Attributes | |
Curve * | ts_ |
Real | accuracy_ |
std::vector< ext::shared_ptr< typename Traits::helper > > | additionalHelpers_ |
ext::function< std::vector< Date >()> | additionalDates_ |
ext::function< Array()> | additionalErrors_ |
bool | initialized_ = false |
bool | validCurve_ = false |
Size | firstHelper_ |
Size | numberHelpers_ |
Size | firstAdditionalHelper_ |
Size | numberAdditionalHelpers_ |
Global boostrapper, with additional restrictions.
Definition at line 39 of file globalbootstrap.hpp.
|
private |
Definition at line 40 of file globalbootstrap.hpp.
|
private |
Definition at line 41 of file globalbootstrap.hpp.
GlobalBootstrap | ( | Real | accuracy = Null<Real>() | ) |
Definition at line 83 of file globalbootstrap.hpp.
GlobalBootstrap | ( | std::vector< ext::shared_ptr< typename Traits::helper > > | additionalHelpers, |
ext::function< std::vector< Date >()> | additionalDates, | ||
ext::function< Array()> | additionalErrors, | ||
Real | accuracy = Null<Real>() |
||
) |
The set of (alive) additional dates is added to the interpolation grid. The set of additional dates must only depend on the current global evaluation date. The additionalErrors functor must yield at least as many values such that
number of (usual, alive) rate helpers + number of (alive) additional values >= number of data points - 1
(note that the data points contain t=0). These values are treated as additional error terms in the optimization, the usual rate helpers return marketQuote - impliedQuote here. All error terms are equally weighted in the optimisation.
The additional helpers are treated like the usual rate helpers, but no standard pillar dates are added for them.
WARNING: This class is known to work with Traits Discount, ZeroYield, Forward (i.e. the usual traits for IR curves in QL), it might fail for other traits - check the usage of Traits::updateGuess(), Traits::guess(), Traits::minValueAfter(), Traits::maxValueAfter() in this class against them.
Definition at line 86 of file globalbootstrap.hpp.
void setup | ( | Curve * | ts | ) |
Definition at line 94 of file globalbootstrap.hpp.
void calculate |
|
private |
Definition at line 105 of file globalbootstrap.hpp.
|
private |
Definition at line 70 of file globalbootstrap.hpp.
|
private |
Definition at line 71 of file globalbootstrap.hpp.
|
mutableprivate |
Definition at line 72 of file globalbootstrap.hpp.
|
private |
Definition at line 73 of file globalbootstrap.hpp.
|
private |
Definition at line 74 of file globalbootstrap.hpp.
|
mutableprivate |
Definition at line 75 of file globalbootstrap.hpp.
|
private |
Definition at line 75 of file globalbootstrap.hpp.
|
mutableprivate |
Definition at line 76 of file globalbootstrap.hpp.
|
private |
Definition at line 76 of file globalbootstrap.hpp.
|
mutableprivate |
Definition at line 77 of file globalbootstrap.hpp.
|
private |
Definition at line 77 of file globalbootstrap.hpp.