QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
List of all members
OptionletStripper Class Reference

#include <optionletstripper.hpp>

+ Inheritance diagram for OptionletStripper:
+ Collaboration diagram for OptionletStripper:

StrippedOptionletBase interface

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_
 
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
 
 OptionletStripper (const ext::shared_ptr< CapFloorTermVolSurface > &, ext::shared_ptr< IborIndex > iborIndex_, Handle< YieldTermStructure > discount={}, VolatilityType type=ShiftedLognormal, Real displacement=0.0)
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
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 ()
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 
virtual void performCalculations () const =0
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

StrippedOptionletBase specialization. It's up to derived classes to implement LazyObject::performCalculations

Definition at line 41 of file optionletstripper.hpp.

Constructor & Destructor Documentation

◆ OptionletStripper()

OptionletStripper ( const ext::shared_ptr< CapFloorTermVolSurface > &  termVolSurface,
ext::shared_ptr< IborIndex iborIndex_,
Handle< YieldTermStructure discount = {},
VolatilityType  type = ShiftedLognormal,
Real  displacement = 0.0 
)
protected

Definition at line 30 of file optionletstripper.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ optionletStrikes()

const vector< Rate > & optionletStrikes ( Size  i) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 79 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ optionletVolatilities()

const vector< Volatility > & optionletVolatilities ( Size  i) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 89 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ optionletFixingDates()

const vector< Date > & optionletFixingDates ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 102 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ optionletFixingTimes()

const vector< Time > & optionletFixingTimes ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 107 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ optionletMaturities()

Size optionletMaturities ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 112 of file optionletstripper.cpp.

◆ atmOptionletRates()

const vector< Rate > & atmOptionletRates ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 126 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ dayCounter()

DayCounter dayCounter ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 132 of file optionletstripper.cpp.

◆ calendar()

Calendar calendar ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 136 of file optionletstripper.cpp.

◆ settlementDays()

Natural settlementDays ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 140 of file optionletstripper.cpp.

◆ businessDayConvention()

BusinessDayConvention businessDayConvention ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 144 of file optionletstripper.cpp.

◆ optionletFixingTenors()

const vector< Period > & optionletFixingTenors ( ) const

Definition at line 98 of file optionletstripper.cpp.

◆ optionletPaymentDates()

const vector< Date > & optionletPaymentDates ( ) const

Definition at line 116 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ optionletAccrualPeriods()

const vector< Time > & optionletAccrualPeriods ( ) const

Definition at line 121 of file optionletstripper.cpp.

+ Here is the call graph for this function:

◆ termVolSurface()

ext::shared_ptr< CapFloorTermVolSurface > termVolSurface ( ) const

Definition at line 149 of file optionletstripper.cpp.

+ Here is the caller graph for this function:

◆ iborIndex()

ext::shared_ptr< IborIndex > iborIndex ( ) const

Definition at line 153 of file optionletstripper.cpp.

◆ displacement()

Real displacement ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 157 of file optionletstripper.cpp.

◆ volatilityType()

VolatilityType volatilityType ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 161 of file optionletstripper.cpp.

Member Data Documentation

◆ termVolSurface_

ext::shared_ptr<CapFloorTermVolSurface> termVolSurface_
protected

Definition at line 74 of file optionletstripper.hpp.

◆ iborIndex_

ext::shared_ptr<IborIndex> iborIndex_
protected

Definition at line 75 of file optionletstripper.hpp.

◆ discount_

Handle<YieldTermStructure> discount_
protected

Definition at line 76 of file optionletstripper.hpp.

◆ nStrikes_

Size nStrikes_
protected

Definition at line 77 of file optionletstripper.hpp.

◆ nOptionletTenors_

Size nOptionletTenors_
protected

Definition at line 78 of file optionletstripper.hpp.

◆ optionletStrikes_

std::vector<std::vector<Rate> > optionletStrikes_
mutableprotected

Definition at line 80 of file optionletstripper.hpp.

◆ optionletVolatilities_

std::vector<std::vector<Volatility> > optionletVolatilities_
mutableprotected

Definition at line 81 of file optionletstripper.hpp.

◆ optionletTimes_

std::vector<Time> optionletTimes_
mutableprotected

Definition at line 83 of file optionletstripper.hpp.

◆ optionletDates_

std::vector<Date> optionletDates_
mutableprotected

Definition at line 84 of file optionletstripper.hpp.

◆ optionletTenors_

std::vector<Period> optionletTenors_
protected

Definition at line 85 of file optionletstripper.hpp.

◆ atmOptionletRate_

std::vector<Rate> atmOptionletRate_
mutableprotected

Definition at line 86 of file optionletstripper.hpp.

◆ optionletPaymentDates_

std::vector<Date> optionletPaymentDates_
mutableprotected

Definition at line 87 of file optionletstripper.hpp.

◆ optionletAccrualPeriods_

std::vector<Time> optionletAccrualPeriods_
mutableprotected

Definition at line 88 of file optionletstripper.hpp.

◆ capFloorLengths_

std::vector<Period> capFloorLengths_
protected

Definition at line 90 of file optionletstripper.hpp.

◆ volatilityType_

const VolatilityType volatilityType_
protected

Definition at line 91 of file optionletstripper.hpp.

◆ displacement_

const Real displacement_
protected

Definition at line 92 of file optionletstripper.hpp.