QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | List of all members
BootstrapHelper< TS > Class Template Referenceabstract

Base helper class for bootstrapping. More...

#include <ql/termstructures/bootstraphelper.hpp>

+ Inheritance diagram for BootstrapHelper< TS >:
+ Collaboration diagram for BootstrapHelper< TS >:

Public Member Functions

 BootstrapHelper (Handle< Quote > quote)
 
 BootstrapHelper (Real quote)
 
 ~BootstrapHelper () override=default
 
BootstrapHelper interface
const Handle< Quote > & quote () const
 
virtual Real impliedQuote () const =0
 
Real quoteError () const
 
virtual void setTermStructure (TS *)
 sets the term structure to be used for pricing More...
 
virtual Date earliestDate () const
 earliest relevant date More...
 
virtual Date maturityDate () const
 instrument's maturity date More...
 
virtual Date latestRelevantDate () const
 latest relevant date More...
 
virtual Date pillarDate () const
 pillar date More...
 
virtual Date latestDate () const
 latest date More...
 
Observer interface
void update () override
 
- 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 ()
 

Visitability

Handle< Quotequote_
 
TS * termStructure_
 
Date earliestDate_
 
Date latestDate_
 
Date maturityDate_
 
Date latestRelevantDate_
 
Date pillarDate_
 
virtual void accept (AcyclicVisitor &)
 

Additional Inherited Members

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

Detailed Description

template<class TS>
class QuantLib::BootstrapHelper< TS >

Base helper class for bootstrapping.

This class provides an abstraction for the instruments used to bootstrap a term structure.

It is advised that a bootstrap helper for an instrument contains an instance of the actual instrument class to ensure consistancy between the algorithms used during bootstrapping and later instrument pricing. This is not yet fully enforced in the available bootstrap helpers.

Definition at line 63 of file bootstraphelper.hpp.

Constructor & Destructor Documentation

◆ BootstrapHelper() [1/2]

BootstrapHelper ( Handle< Quote quote)
explicit

Definition at line 151 of file bootstraphelper.hpp.

+ Here is the call graph for this function:

◆ BootstrapHelper() [2/2]

BootstrapHelper ( Real  quote)
explicit

Definition at line 157 of file bootstraphelper.hpp.

◆ ~BootstrapHelper()

~BootstrapHelper ( )
overridedefault

Member Function Documentation

◆ quote()

const Handle< Quote > & quote ( ) const

Definition at line 70 of file bootstraphelper.hpp.

◆ impliedQuote()

virtual Real impliedQuote ( ) const
pure virtual

◆ quoteError()

Real quoteError ( ) const

Definition at line 72 of file bootstraphelper.hpp.

+ Here is the call graph for this function:

◆ setTermStructure()

void setTermStructure ( TS *  t)
virtual

sets the term structure to be used for pricing

Warning:
Being a pointer and not a shared_ptr, the term structure is not guaranteed to remain allocated for the whole life of the rate helper. It is responsibility of the programmer to ensure that the pointer remains valid. It is advised that this method is called only inside the term structure being bootstrapped, setting the pointer to this, i.e., the term structure itself.

Definition at line 162 of file bootstraphelper.hpp.

+ Here is the caller graph for this function:

◆ earliestDate()

Date earliestDate
virtual

earliest relevant date

The earliest date at which data are needed by the helper in order to provide a quote.

Definition at line 168 of file bootstraphelper.hpp.

◆ maturityDate()

Date maturityDate
virtual

instrument's maturity date

Definition at line 173 of file bootstraphelper.hpp.

+ Here is the caller graph for this function:

◆ latestRelevantDate()

Date latestRelevantDate
virtual

latest relevant date

The latest date at which data are needed by the helper in order to provide a quote. It does not necessarily equal the maturity of the underlying instrument.

Definition at line 180 of file bootstraphelper.hpp.

◆ pillarDate()

Date pillarDate
virtual

pillar date

Definition at line 187 of file bootstraphelper.hpp.

◆ latestDate()

Date latestDate
virtual

latest date

equal to pillarDate()

Definition at line 194 of file bootstraphelper.hpp.

◆ update()

void update ( )
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 RelativeDateBootstrapHelper< TS >, and CdsHelper.

Definition at line 201 of file bootstraphelper.hpp.

+ Here is the caller graph for this function:

◆ accept()

void accept ( AcyclicVisitor v)
virtual

Member Data Documentation

◆ quote_

Handle<Quote> quote_
protected

Definition at line 118 of file bootstraphelper.hpp.

◆ termStructure_

TS* termStructure_
protected

Definition at line 119 of file bootstraphelper.hpp.

◆ earliestDate_

Date earliestDate_
protected

Definition at line 120 of file bootstraphelper.hpp.

◆ latestDate_

Date latestDate_
protected

Definition at line 120 of file bootstraphelper.hpp.

◆ maturityDate_

Date maturityDate_
protected

Definition at line 121 of file bootstraphelper.hpp.

◆ latestRelevantDate_

Date latestRelevantDate_
protected

Definition at line 121 of file bootstraphelper.hpp.

◆ pillarDate_

Date pillarDate_
protected

Definition at line 121 of file bootstraphelper.hpp.