Swaption Class Reference
[Financial instruments]

#include <ql/instruments/swaption.hpp>

Inheritance diagram for Swaption:

Inheritance graph
[legend]
List of all members.

Detailed Description

Swaption class

Tests:
  • the correctness of the returned value is tested by checking that the price of a payer (resp. receiver) swaption decreases (resp. increases) with the strike.
  • the correctness of the returned value is tested by checking that the price of a payer (resp. receiver) swaption increases (resp. decreases) with the spread.
  • the correctness of the returned value is tested by checking it against that of a swaption on a swap with no spread and a correspondingly adjusted fixed rate.
  • the correctness of the returned value is tested by checking it against a known good value.
  • the correctness of the returned value of cash settled swaptions is tested by checking the modified annuity against a value calculated without using the Swaption class.
Todo:
add greeks and explicit exercise lag
Examples:

BermudanSwaption.cpp.


Public Member Functions

 Swaption (const boost::shared_ptr< VanillaSwap > &swap, const boost::shared_ptr< Exercise > &exercise, const Handle< YieldTermStructure > &termStructure, const boost::shared_ptr< PricingEngine > &engine, Settlement::Type delivery=Settlement::Physical)
void setupArguments (PricingEngine::arguments *) const
Volatility impliedVolatility (Real price, Real accuracy=1.0e-4, Size maxEvaluations=100, Volatility minVol=1.0e-7, Volatility maxVol=4.0) const
 implied volatility
Rate atmRate () const
Instrument interface
bool isExpired () const
 returns whether the instrument is still tradable.
Inspectors
Settlement::Type settlementType () const
VanillaSwap::Type type () const
const boost::shared_ptr< VanillaSwap > & underlyingSwap () const

Classes

class  arguments
 Arguments for swaption calculation More...
class  engine
 base class for swaption engines More...