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

#include <strippedoptionlet.hpp>

+ Inheritance diagram for StrippedOptionlet:
+ Collaboration diagram for StrippedOptionlet:

Public Member Functions

 StrippedOptionlet (Natural settlementDays, const Calendar &calendar, BusinessDayConvention bdc, ext::shared_ptr< IborIndex > iborIndex, const std::vector< Date > &optionletDates, const std::vector< Rate > &strikes, std::vector< std::vector< Handle< Quote > > >, DayCounter dc, VolatilityType type=ShiftedLognormal, Real displacement=0.0)
 
 StrippedOptionlet (Natural settlementDays, const Calendar &calendar, BusinessDayConvention bdc, ext::shared_ptr< IborIndex > iborIndex, const std::vector< Date > &optionletDates, const std::vector< std::vector< Rate > > &strikes, std::vector< std::vector< Handle< Quote > > >, DayCounter dc, VolatilityType type=ShiftedLognormal, Real displacement=0.0)
 
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 ()
 

StrippedOptionletBase interface

Calendar calendar_
 
Natural settlementDays_
 
BusinessDayConvention businessDayConvention_
 
DayCounter dc_
 
ext::shared_ptr< IborIndexiborIndex_
 
VolatilityType type_
 
Real displacement_
 
Size nOptionletDates_
 
std::vector< DateoptionletDates_
 
std::vector< TimeoptionletTimes_
 
std::vector< RateoptionletAtmRates_
 
std::vector< std::vector< Rate > > optionletStrikes_
 
std::vector< std::vector< Handle< Quote > > > optionletVolQuotes_
 
std::vector< std::vector< Volatility > > optionletVolatilities_
 
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
 
VolatilityType volatilityType () const override
 
Real displacement () const override
 
void checkInputs () const
 
void registerWithMarketData ()
 
void performCalculations () const override
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Helper class to wrap in a StrippedOptionletBase object a matrix of exogenously calculated optionlet (i.e. caplet/floorlet) volatilities (a.k.a. forward-forward volatilities).

Definition at line 39 of file strippedoptionlet.hpp.

Constructor & Destructor Documentation

◆ StrippedOptionlet() [1/2]

StrippedOptionlet ( Natural  settlementDays,
const Calendar calendar,
BusinessDayConvention  bdc,
ext::shared_ptr< IborIndex iborIndex,
const std::vector< Date > &  optionletDates,
const std::vector< Rate > &  strikes,
std::vector< std::vector< Handle< Quote > > >  v,
DayCounter  dc,
VolatilityType  type = ShiftedLognormal,
Real  displacement = 0.0 
)

Definition at line 32 of file strippedoptionlet.cpp.

◆ StrippedOptionlet() [2/2]

StrippedOptionlet ( Natural  settlementDays,
const Calendar calendar,
BusinessDayConvention  bdc,
ext::shared_ptr< IborIndex iborIndex,
const std::vector< Date > &  optionletDates,
const std::vector< std::vector< Rate > > &  strikes,
std::vector< std::vector< Handle< Quote > > >  v,
DayCounter  dc,
VolatilityType  type = ShiftedLognormal,
Real  displacement = 0.0 
)

Definition at line 53 of file strippedoptionlet.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 129 of file strippedoptionlet.cpp.

◆ optionletVolatilities()

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

Implements StrippedOptionletBase.

Definition at line 138 of file strippedoptionlet.cpp.

+ Here is the call graph for this function:

◆ optionletFixingDates()

const vector< Date > & optionletFixingDates ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 147 of file strippedoptionlet.cpp.

+ Here is the call graph for this function:

◆ optionletFixingTimes()

const vector< Time > & optionletFixingTimes ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 152 of file strippedoptionlet.cpp.

+ Here is the call graph for this function:

◆ optionletMaturities()

Size optionletMaturities ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 157 of file strippedoptionlet.cpp.

◆ atmOptionletRates()

const vector< Time > & atmOptionletRates ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 161 of file strippedoptionlet.cpp.

+ Here is the call graph for this function:

◆ dayCounter()

DayCounter dayCounter ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 168 of file strippedoptionlet.cpp.

◆ calendar()

Calendar calendar ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 172 of file strippedoptionlet.cpp.

+ Here is the caller graph for this function:

◆ settlementDays()

Natural settlementDays ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 176 of file strippedoptionlet.cpp.

+ Here is the caller graph for this function:

◆ businessDayConvention()

BusinessDayConvention businessDayConvention ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 180 of file strippedoptionlet.cpp.

◆ volatilityType()

VolatilityType volatilityType ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 184 of file strippedoptionlet.cpp.

◆ displacement()

Real displacement ( ) const
overridevirtual

Implements StrippedOptionletBase.

Definition at line 188 of file strippedoptionlet.cpp.

◆ checkInputs()

void checkInputs ( ) const
private

Definition at line 84 of file strippedoptionlet.cpp.

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

◆ registerWithMarketData()

void registerWithMarketData ( )
private

Definition at line 117 of file strippedoptionlet.cpp.

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

◆ performCalculations()

void performCalculations ( ) const
overrideprivatevirtual

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

Implements LazyObject.

Definition at line 123 of file strippedoptionlet.cpp.

Member Data Documentation

◆ calendar_

Calendar calendar_
private

Definition at line 85 of file strippedoptionlet.hpp.

◆ settlementDays_

Natural settlementDays_
private

Definition at line 86 of file strippedoptionlet.hpp.

◆ businessDayConvention_

BusinessDayConvention businessDayConvention_
private

Definition at line 87 of file strippedoptionlet.hpp.

◆ dc_

DayCounter dc_
private

Definition at line 88 of file strippedoptionlet.hpp.

◆ iborIndex_

ext::shared_ptr<IborIndex> iborIndex_
private

Definition at line 89 of file strippedoptionlet.hpp.

◆ type_

VolatilityType type_
private

Definition at line 90 of file strippedoptionlet.hpp.

◆ displacement_

Real displacement_
private

Definition at line 91 of file strippedoptionlet.hpp.

◆ nOptionletDates_

Size nOptionletDates_
private

Definition at line 93 of file strippedoptionlet.hpp.

◆ optionletDates_

std::vector<Date> optionletDates_
private

Definition at line 94 of file strippedoptionlet.hpp.

◆ optionletTimes_

std::vector<Time> optionletTimes_
private

Definition at line 95 of file strippedoptionlet.hpp.

◆ optionletAtmRates_

std::vector<Rate> optionletAtmRates_
mutableprivate

Definition at line 96 of file strippedoptionlet.hpp.

◆ optionletStrikes_

std::vector<std::vector<Rate> > optionletStrikes_
private

Definition at line 97 of file strippedoptionlet.hpp.

◆ optionletVolQuotes_

std::vector<std::vector<Handle<Quote> > > optionletVolQuotes_
private

Definition at line 99 of file strippedoptionlet.hpp.

◆ optionletVolatilities_

std::vector<std::vector<Volatility> > optionletVolatilities_
mutableprivate

Definition at line 100 of file strippedoptionlet.hpp.