QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
OptionletStripper2 Class Reference

#include <ql/termstructures/volatility/optionlet/optionletstripper2.hpp>

+ Inheritance diagram for OptionletStripper2:
+ Collaboration diagram for OptionletStripper2:

Classes

class  ObjectiveFunction
 

Public Member Functions

 OptionletStripper2 (const ext::shared_ptr< OptionletStripper1 > &optionletStripper1, const Handle< CapFloorTermVolCurve > &atmCapFloorTermVolCurve)
 
std::vector< RateatmCapFloorStrikes () const
 
std::vector< RealatmCapFloorPrices () const
 
std::vector< VolatilityspreadsVol () const
 
- Public Member Functions inherited from OptionletStripper
const std::vector< Rate > & optionletStrikes (Size i) const override
 
const std::vector< Volatility > & optionletVolatilities (Size i) const override
 
const std::vector< Date > & optionletFixingDates () const override
 
const std::vector< Time > & optionletFixingTimes () const override
 
Size optionletMaturities () const override
 
const std::vector< Rate > & atmOptionletRates () const override
 
DayCounter dayCounter () const override
 
Calendar calendar () const override
 
Natural settlementDays () const override
 
BusinessDayConvention businessDayConvention () const override
 
const std::vector< Period > & optionletFixingTenors () const
 
const std::vector< Date > & optionletPaymentDates () const
 
const std::vector< Time > & optionletAccrualPeriods () const
 
ext::shared_ptr< CapFloorTermVolSurfacetermVolSurface () const
 
ext::shared_ptr< IborIndexiborIndex () const
 
Real displacement () const override
 
VolatilityType volatilityType () const override
 
virtual const std::vector< Rate > & optionletStrikes (Size i) const =0
 
virtual const std::vector< Volatility > & optionletVolatilities (Size i) const =0
 
virtual const std::vector< Date > & optionletFixingDates () const =0
 
virtual const std::vector< Time > & optionletFixingTimes () const =0
 
virtual Size optionletMaturities () const =0
 
virtual const std::vector< Rate > & atmOptionletRates () const =0
 
virtual DayCounter dayCounter () const =0
 
virtual Calendar calendar () const =0
 
virtual Natural settlementDays () const =0
 
virtual BusinessDayConvention businessDayConvention () const =0
 
virtual VolatilityType volatilityType () const =0
 
virtual Real displacement () const =0
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

LazyObject interface

const ext::shared_ptr< OptionletStripper1stripper1_
 
const Handle< CapFloorTermVolCurveatmCapFloorTermVolCurve_
 
DayCounter dc_
 
Size nOptionExpiries_
 
std::vector< RateatmCapFloorStrikes_
 
std::vector< RealatmCapFloorPrices_
 
std::vector< VolatilityspreadsVolImplied_
 
std::vector< ext::shared_ptr< CapFloor > > caps_
 
Size maxEvaluations_ = 10000
 
Real accuracy_ = 1.e-6
 
void performCalculations () const override
 
std::vector< VolatilityspreadsVolImplied () const
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from OptionletStripper
 OptionletStripper (const ext::shared_ptr< CapFloorTermVolSurface > &, ext::shared_ptr< IborIndex > iborIndex_, Handle< YieldTermStructure > discount={}, VolatilityType type=ShiftedLognormal, Real displacement=0.0)
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 
- Protected Attributes inherited from OptionletStripper
ext::shared_ptr< CapFloorTermVolSurfacetermVolSurface_
 
ext::shared_ptr< IborIndexiborIndex_
 
Handle< YieldTermStructurediscount_
 
Size nStrikes_
 
Size nOptionletTenors_
 
std::vector< std::vector< Rate > > optionletStrikes_
 
std::vector< std::vector< Volatility > > optionletVolatilities_
 
std::vector< TimeoptionletTimes_
 
std::vector< DateoptionletDates_
 
std::vector< PeriodoptionletTenors_
 
std::vector< RateatmOptionletRate_
 
std::vector< DateoptionletPaymentDates_
 
std::vector< TimeoptionletAccrualPeriods_
 
std::vector< PeriodcapFloorLengths_
 
const VolatilityType volatilityType_
 
const Real displacement_
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Helper class to extend an OptionletStripper1 object stripping additional optionlet (i.e. caplet/floorlet) volatilities (a.k.a. forward-forward volatilities) from the (cap/floor) At-The-Money term volatilities of a CapFloorTermVolCurve.

Definition at line 42 of file optionletstripper2.hpp.

Constructor & Destructor Documentation

◆ OptionletStripper2()

OptionletStripper2 ( const ext::shared_ptr< OptionletStripper1 > &  optionletStripper1,
const Handle< CapFloorTermVolCurve > &  atmCapFloorTermVolCurve 
)

Definition at line 36 of file optionletstripper2.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ atmCapFloorStrikes()

std::vector< Rate > atmCapFloorStrikes ( ) const

Definition at line 142 of file optionletstripper2.cpp.

+ Here is the call graph for this function:

◆ atmCapFloorPrices()

std::vector< Real > atmCapFloorPrices ( ) const

Definition at line 147 of file optionletstripper2.cpp.

+ Here is the call graph for this function:

◆ spreadsVol()

std::vector< Volatility > spreadsVol ( ) const

Definition at line 137 of file optionletstripper2.cpp.

+ Here is the call graph for this function:

◆ performCalculations()

void performCalculations ( ) const
overridevirtual

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

Implements LazyObject.

Definition at line 56 of file optionletstripper2.cpp.

+ Here is the call graph for this function:

◆ spreadsVolImplied()

std::vector< Volatility > spreadsVolImplied ( ) const
private

Definition at line 122 of file optionletstripper2.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ stripper1_

const ext::shared_ptr<OptionletStripper1> stripper1_
private

Definition at line 73 of file optionletstripper2.hpp.

◆ atmCapFloorTermVolCurve_

const Handle<CapFloorTermVolCurve> atmCapFloorTermVolCurve_
private

Definition at line 74 of file optionletstripper2.hpp.

◆ dc_

DayCounter dc_
private

Definition at line 75 of file optionletstripper2.hpp.

◆ nOptionExpiries_

Size nOptionExpiries_
private

Definition at line 76 of file optionletstripper2.hpp.

◆ atmCapFloorStrikes_

std::vector<Rate> atmCapFloorStrikes_
mutableprivate

Definition at line 77 of file optionletstripper2.hpp.

◆ atmCapFloorPrices_

std::vector<Real> atmCapFloorPrices_
mutableprivate

Definition at line 78 of file optionletstripper2.hpp.

◆ spreadsVolImplied_

std::vector<Volatility> spreadsVolImplied_
mutableprivate

Definition at line 79 of file optionletstripper2.hpp.

◆ caps_

std::vector<ext::shared_ptr<CapFloor> > caps_
mutableprivate

Definition at line 80 of file optionletstripper2.hpp.

◆ maxEvaluations_

Size maxEvaluations_ = 10000
private

Definition at line 81 of file optionletstripper2.hpp.

◆ accuracy_

Real accuracy_ = 1.e-6
private

Definition at line 82 of file optionletstripper2.hpp.