QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SwaptionVolatilityCube Class Reference

swaption-volatility cube More...

#include <ql/termstructures/volatility/swaption/swaptionvolcube.hpp>

Inherits SwaptionVolatilityDiscrete.

Inherited by SwaptionVolCube1x< Model >, and SwaptionVolCube2.

Public Member Functions

 SwaptionVolatilityCube (const Handle< SwaptionVolatilityStructure > &atmVolStructure, const std::vector< Period > &optionTenors, const std::vector< Period > &swapTenors, const std::vector< Spread > &strikeSpreads, const std::vector< std::vector< Handle< Quote > > > &volSpreads, const boost::shared_ptr< SwapIndex > &swapIndexBase, const boost::shared_ptr< SwapIndex > &shortSwapIndexBase, bool vegaWeightedSmileFit)
 
Real shift (Time optionTime, Time swapLength) const
 shift size for displaced lognormal volatility
 
TermStructure interface
DayCounter dayCounter () const
 the day counter used for date/time conversion
 
Date maxDate () const
 the latest date for which the curve can return values
 
Time maxTime () const
 the latest time for which the curve can return values
 
const DatereferenceDate () const
 the date at which discount = 1.0 and/or variance = 0.0
 
Calendar calendar () const
 the calendar used for reference and/or option date calculation
 
Natural settlementDays () const
 the settlementDays used for reference date calculation
 
VolatilityTermStructure interface
Rate minStrike () const
 the minimum strike for which the term structure can return vols
 
Rate maxStrike () const
 the maximum strike for which the term structure can return vols
 
SwaptionVolatilityStructure interface
const PeriodmaxSwapTenor () const
 the largest length for which the term structure can return vols
 
Other inspectors
Rate atmStrike (const Date &optionDate, const Period &swapTenor) const
 
Rate atmStrike (const Period &optionTenor, const Period &swapTenor) const
 
Handle< SwaptionVolatilityStructureatmVol () const
 
const std::vector< Spread > & strikeSpreads () const
 
const std::vector< std::vector< Handle< Quote > > > & volSpreads () const
 
const boost::shared_ptr< SwapIndexswapIndexBase () const
 
const boost::shared_ptr< SwapIndexshortSwapIndexBase () const
 
const bool vegaWeightedSmileFit () const
 
LazyObject interface
void performCalculations () const
 

Protected Member Functions

void registerWithVolatilitySpread ()
 
virtual Size requiredNumberOfStrikes () const
 
Volatility volatilityImpl (Time optionTime, Time swapLength, Rate strike) const
 
Volatility volatilityImpl (const Date &optionDate, const Period &swapTenor, Rate strike) const
 

Protected Attributes

Handle< SwaptionVolatilityStructureatmVol_
 
Size nStrikes_
 
std::vector< SpreadstrikeSpreads_
 
std::vector< RatelocalStrikes_
 
std::vector< VolatilitylocalSmile_
 
std::vector< std::vector< Handle< Quote > > > volSpreads_
 
boost::shared_ptr< SwapIndexswapIndexBase_
 
boost::shared_ptr< SwapIndexshortSwapIndexBase_
 
bool vegaWeightedSmileFit_
 

Detailed Description

swaption-volatility cube

Warning:
this class is not finalized and its interface might change in subsequent releases.

Member Function Documentation

void performCalculations ( ) const
virtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.