SwaptionHelper Class Reference

calibration helper for ATM swaption More...

#include <ql/models/shortrate/calibrationhelpers/swaptionhelper.hpp>

Inheritance diagram for SwaptionHelper:

Public Member Functions

 SwaptionHelper (const Period &maturity, const Period &length, const Handle< Quote > &volatility, const boost::shared_ptr< IborIndex > &index, const Period &fixedLegTenor, const DayCounter &fixedLegDayCounter, const DayCounter &floatingLegDayCounter, const Handle< YieldTermStructure > &termStructure, CalibrationHelper::CalibrationErrorType errorType=CalibrationHelper::RelativePriceError)
 
virtual void addTimesTo (std::list< Time > &times) const
 
virtual Real modelValue () const
 returns the price of the instrument according to the model
 
virtual Real blackPrice (Volatility volatility) const
 Black price given a volatility.
 
- Public Member Functions inherited from CalibrationHelper
 CalibrationHelper (const Handle< Quote > &volatility, const Handle< YieldTermStructure > &termStructure, CalibrationErrorType calibrationErrorType=RelativePriceError)
 
void performCalculations () const
 
Real marketValue () const
 returns the actual price of the instrument (from volatility)
 
virtual Real calibrationError ()
 returns the error resulting from the model valuation
 
Volatility impliedVolatility (Real targetValue, Real accuracy, Size maxEvaluations, Volatility minVol, Volatility maxVol) const
 Black volatility implied by the model.
 
void setPricingEngine (const boost::shared_ptr< PricingEngine > &engine)
 
- Public Member Functions inherited from LazyObject
void update ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
std::pair< std::set
< boost::shared_ptr
< Observable > >::iterator,
bool > 
registerWith (const boost::shared_ptr< Observable > &)
 
Size unregisterWith (const boost::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 

Additional Inherited Members

- Public Types inherited from CalibrationHelper
enum  CalibrationErrorType { RelativePriceError, PriceError, ImpliedVolError }
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 
- Protected Attributes inherited from CalibrationHelper
Real marketValue_
 
Handle< Quotevolatility_
 
Handle< YieldTermStructuretermStructure_
 
boost::shared_ptr< PricingEngineengine_
 
- Protected Attributes inherited from LazyObject
bool calculated_
 
bool frozen_
 

Detailed Description

calibration helper for ATM swaption

Bug:
This helper does not register with the passed IBOR index and with the evaluation date. Furthermore, the ATM exercise rate is not recalculated when any of its observables change.
Examples:
BermudanSwaption.cpp.