QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
Public Member Functions | List of all members
BondHelper Class Reference

Bond helper for curve bootstrap. More...

#include <ql/termstructures/yield/bondhelpers.hpp>

+ Inheritance diagram for BondHelper:

Public Member Functions

 BondHelper (const Handle< Quote > &price, const ext::shared_ptr< Bond > &bond, Bond::Price::Type priceType=Bond::Price::Clean)
 
QL_DEPRECATED BondHelper (const Handle< Quote > &price, const ext::shared_ptr< Bond > &bond, bool useCleanPrice)
 
RateHelper interface
Real impliedQuote () const
 
void setTermStructure (YieldTermStructure *)
 
Additional inspectors
ext::shared_ptr< Bondbond () const
 
QL_DEPRECATED bool useCleanPrice () const
 
Bond::Price::Type priceType () const
 
- Public Member Functions inherited from BootstrapHelper< TS >
 BootstrapHelper (const Handle< Quote > &quote)
 
 BootstrapHelper (Real quote)
 
const Handle< Quote > & quote () const
 
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
 
virtual Date latestRelevantDate () const
 latest relevant date More...
 
virtual Date pillarDate () const
 pillar date
 
virtual Date latestDate () const
 latest date More...
 
virtual void update ()
 
- Public Member Functions inherited from Observer
 Observer (const Observer &)
 
Observeroperator= (const 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 deepUpdate ()
 
- Public Member Functions inherited from Observable
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
void notifyObservers ()
 

Visitability

ext::shared_ptr< Bondbond_
 
RelinkableHandle< YieldTermStructuretermStructureHandle_
 
Bond::Price::Type priceType_
 
void accept (AcyclicVisitor &)
 

Additional Inherited Members

- Public Types inherited from Observer
typedef boost::unordered_set< ext::shared_ptr< Observable > > set_type
 
typedef set_type::iterator iterator
 
- Protected Attributes inherited from BootstrapHelper< TS >
Handle< Quotequote_
 
TS * termStructure_
 
Date earliestDate_
 
Date latestDate_
 
Date maturityDate_
 
Date latestRelevantDate_
 
Date pillarDate_
 

Detailed Description

Bond helper for curve bootstrap.

Warning:
This class assumes that the reference date does not change between calls of setTermStructure().

Constructor & Destructor Documentation

◆ BondHelper() [1/2]

BondHelper ( const Handle< Quote > &  price,
const ext::shared_ptr< Bond > &  bond,
Bond::Price::Type  priceType = Bond::Price::Clean 
)
Warning:
Setting a pricing engine to the passed bond from external code will cause the bootstrap to fail or to give wrong results. It is advised to discard the bond after creating the helper, so that the helper has sole ownership of it.

◆ BondHelper() [2/2]

QL_DEPRECATED BondHelper ( const Handle< Quote > &  price,
const ext::shared_ptr< Bond > &  bond,
bool  useCleanPrice 
)
Deprecated:
Use the other overload instead. Deprecated in version 1.18.

Member Function Documentation

◆ useCleanPrice()

bool useCleanPrice ( ) const
Deprecated:
Use the priceType() method instead. Deprecated in version 1.18.