SwaptionHelper Class Reference

calibration helper for ATM swaption More...

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

Inheritance diagram for SwaptionHelper:
[legend]

## Public Member Functions

SwaptionHelper (const Period &maturity, const Period &length, const Handle< Quote > &volatility, const ext::shared_ptr< IborIndex > &index, const Period &fixedLegTenor, const DayCounter &fixedLegDayCounter, const DayCounter &floatingLegDayCounter, const Handle< YieldTermStructure > &termStructure, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError, Real strike=Null< Real >(), Real nominal=1.0, VolatilityType type=ShiftedLognormal, Real shift=0.0)

SwaptionHelper (const Date &exerciseDate, const Period &length, const Handle< Quote > &volatility, const ext::shared_ptr< IborIndex > &index, const Period &fixedLegTenor, const DayCounter &fixedLegDayCounter, const DayCounter &floatingLegDayCounter, const Handle< YieldTermStructure > &termStructure, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError, Real strike=Null< Real >(), Real nominal=1.0, VolatilityType type=ShiftedLognormal, Real shift=0.0)

SwaptionHelper (const Date &exerciseDate, const Date &endDate, const Handle< Quote > &volatility, const ext::shared_ptr< IborIndex > &index, const Period &fixedLegTenor, const DayCounter &fixedLegDayCounter, const DayCounter &floatingLegDayCounter, const Handle< YieldTermStructure > &termStructure, BlackCalibrationHelper::CalibrationErrorType errorType=BlackCalibrationHelper::RelativePriceError, Real strike=Null< Real >(), Real nominal=1.0, VolatilityType type=ShiftedLognormal, Real shift=0.0)

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 or Bachelier price given a volatility.
ext::shared_ptr< VanillaSwap > | underlyingSwap () const
ext::shared_ptr< Swaption > | swaption () const
Public Member Functions inherited from BlackCalibrationHelper
| BlackCalibrationHelper (const Handle< Quote > &volatility, CalibrationErrorType calibrationErrorType=RelativePriceError, const VolatilityType type=ShiftedLognormal, const Real shift=0.0)
QL_DEPRECATED | BlackCalibrationHelper (const Handle< Quote > &volatility, const Handle< YieldTermStructure > &termStructure, CalibrationErrorType calibrationErrorType=RelativePriceError, const VolatilityType type=ShiftedLognormal, const Real shift=0.0)
Handle< Quote > | volatility () const
| returns the volatility Handle
VolatilityType | volatilityType () const
| returns the volatility type
Real | marketValue () const
| returns the actual price of the instrument (from volatility)
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 ext::shared_ptr< PricingEngine > &engine)
Public Member Functions inherited from LazyObject
void | update ()
void | recalculate ()
void | freeze ()
void | unfreeze ()
void | alwaysForwardNotifications ()
Public Member Functions inherited from Observable
| Observable (const Observable &)
Observable & | operator= (const Observable &)
void | notifyObservers ()
Public Member Functions inherited from Observer
| Observer (const Observer &)
Observer & | operator= (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 ()

## Additional Inherited Members

Public Types inherited from BlackCalibrationHelper
enum | CalibrationErrorType { RelativePriceError, PriceError, ImpliedVolError }
Public Types inherited from Observer
typedef boost::unordered_set< ext::shared_ptr< Observable > > | set_type
typedef set_type::iterator | iterator
Protected Member Functions inherited from LazyObject
virtual void | calculate () const
Protected Attributes inherited from BlackCalibrationHelper
Real | marketValue_
Handle< Quote > | volatility_
Handle< YieldTermStructure > | termStructure_
ext::shared_ptr< PricingEngine > | engine_
const VolatilityType | volatilityType_
const Real | shift_
Protected Attributes inherited from LazyObject
bool | calculated_
bool | frozen_
bool | alwaysForward_

## Detailed Description

calibration helper for ATM swaption

Examples
  BermudanSwaption.cpp.