Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | List of all members
OptionPriceSurface Class Reference

#include <qle/termstructures/optionpricesurface.hpp>

+ Inheritance diagram for OptionPriceSurface:
+ Collaboration diagram for OptionPriceSurface:

Public Member Functions

 OptionPriceSurface (const QuantLib::Date &referenceDate, const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Real > &strikes, const std::vector< QuantLib::Real > &prices, const QuantLib::DayCounter &dayCounter, const QuantLib::Calendar &calendar=QuantLib::NullCalendar())
 
TermStructure interface
QuantLib::Date maxDate () const override
 
const QuantLib::Date & referenceDate () const override
 
QuantLib::DayCounter dayCounter () const override
 
QuantLib::Real price (QuantLib::Time t, QuantLib::Real strike) const
 
QuantLib::Real price (QuantLib::Date d, QuantLib::Real strike) const
 
- Public Member Functions inherited from OptionInterpolator2d< QuantLib::Linear, QuantLib::Linear >
 OptionInterpolator2d (const QuantLib::Date &referenceDate, const QuantLib::DayCounter &dayCounter, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, const QuantLib::Linear &interpolatorStrike=QuantLib::Linear(), const QuantLib::Linear &interpolatorExpiry=QuantLib::Linear(), const QuantLib::Date &baseDate=QuantLib::Date())
 OptionInterpolator2d default Constructor. More...
 
 OptionInterpolator2d (const QuantLib::Date &referenceDate, const QuantLib::DayCounter &dayCounter, const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Real > &strikes, const std::vector< QuantLib::Real > &values, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, const QuantLib::Linear &interpolatorStrike=QuantLib::Linear(), const QuantLib::Linear &interpolatorExpiry=QuantLib::Linear(), const QuantLib::Date &baseDate=QuantLib::Date())
 OptionInterpolator2d Constructor with dates. More...
 
 OptionInterpolator2d (const QuantLib::Date &referenceDate, const QuantLib::Calendar &calendar, const QuantLib::BusinessDayConvention &bdc, const QuantLib::DayCounter &dayCounter, const std::vector< QuantLib::Period > &tenors, const std::vector< QuantLib::Real > &strikes, const std::vector< QuantLib::Real > &values, bool lowerStrikeConstExtrap=true, bool upperStrikeConstExtrap=true, const QuantLib::Linear &interpolatorStrike=QuantLib::Linear(), const QuantLib::Linear &interpolatorExpiry=QuantLib::Linear(), const QuantLib::Date &baseDate=QuantLib::Date())
 OptionInterpolator2d Constructor with Tenors. More...
 
 OptionInterpolator2d (const OptionInterpolator2d &)=delete
 
OptionInterpolator2doperator= (const OptionInterpolator2d &)=delete
 
void initialise (const std::vector< QuantLib::Date > &dates, const std::vector< QuantLib::Real > &strikes, const std::vector< QuantLib::Real > &values)
 Initialise. More...
 
void initialise (const std::vector< QuantLib::Period > &tenors, const std::vector< QuantLib::Real > &strikes, const std::vector< QuantLib::Real > &values, const QuantLib::Calendar &calendar, const QuantLib::BusinessDayConvention &bdc)
 
std::vector< QuantLib::Time > times () const
 
std::vector< QuantLib::Date > expiries () const
 
std::vector< std::vector< QuantLib::Real > > strikes () const
 
std::vector< std::vector< QuantLib::Real > > values () const
 
QuantLib::DayCounter dayCounter () const
 
QuantLib::Real getValue (QuantLib::Time t, QuantLib::Real strike) const override
 virtual access methods More...
 
QuantLib::Real getValue (QuantLib::Date d, QuantLib::Real strike) const override
 
- Public Member Functions inherited from OptionInterpolatorBase
virtual ~OptionInterpolatorBase ()
 
 OptionInterpolatorBase (const QuantLib::Date &referenceDate)
 
virtual QuantLib::Real getValue (QuantLib::Time t, QuantLib::Real strike) const =0
 virtual access methods More...
 
virtual QuantLib::Real getValue (QuantLib::Date d, QuantLib::Real strike) const =0
 
const QuantLib::Date & referenceDate () const
 
std::vector< QuantLib::Time > times () const
 
std::vector< QuantLib::Date > expiries () const
 
std::vector< std::vector< QuantLib::Real > > strikes () const
 
std::vector< std::vector< QuantLib::Real > > values () const
 

Additional Inherited Members

- Protected Attributes inherited from OptionInterpolator2d< QuantLib::Linear, QuantLib::Linear >
std::vector< QuantLib::Interpolation > interpolations_
 
- Protected Attributes inherited from OptionInterpolatorBase
std::vector< QuantLib::Date > expiries_
 
std::vector< QuantLib::Time > times_
 
std::vector< std::vector< QuantLib::Real > > strikes_
 
std::vector< std::vector< QuantLib::Real > > values_
 
QuantLib::Date referenceDate_
 

Detailed Description

Option Price Surface based on sparse matrix.

Definition at line 35 of file optionpricesurface.hpp.

Constructor & Destructor Documentation

◆ OptionPriceSurface()

OptionPriceSurface ( const QuantLib::Date &  referenceDate,
const std::vector< QuantLib::Date > &  dates,
const std::vector< QuantLib::Real > &  strikes,
const std::vector< QuantLib::Real > &  prices,
const QuantLib::DayCounter &  dayCounter,
const QuantLib::Calendar &  calendar = QuantLib::NullCalendar() 
)

Definition at line 39 of file optionpricesurface.hpp.

43 : QuantLib::TermStructure(referenceDate, calendar, dayCounter),
44 OptionInterpolator2d<QuantLib::Linear, QuantLib::Linear>(referenceDate, dayCounter, dates, strikes, prices){};
std::vector< std::vector< QuantLib::Real > > strikes() const
QuantLib::DayCounter dayCounter() const override
const QuantLib::Date & referenceDate() const override

Member Function Documentation

◆ maxDate()

QuantLib::Date maxDate ( ) const
override

Definition at line 48 of file optionpricesurface.hpp.

48{ return QuantLib::Date::maxDate(); }

◆ referenceDate()

const QuantLib::Date & referenceDate ( ) const
override

Definition at line 49 of file optionpricesurface.hpp.

const QuantLib::Date & referenceDate() const
+ Here is the call graph for this function:

◆ dayCounter()

QuantLib::DayCounter dayCounter ( ) const
override

Definition at line 50 of file optionpricesurface.hpp.

QuantLib::DayCounter dayCounter() const
+ Here is the call graph for this function:

◆ price() [1/2]

QuantLib::Real price ( QuantLib::Time  t,
QuantLib::Real  strike 
) const

Definition at line 53 of file optionpricesurface.hpp.

53{ return getValue(t, strike); };
QuantLib::Real getValue(QuantLib::Time t, QuantLib::Real strike) const override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ price() [2/2]

QuantLib::Real price ( QuantLib::Date  d,
QuantLib::Real  strike 
) const

Definition at line 54 of file optionpricesurface.hpp.

54{ return getValue(d, strike); };
+ Here is the call graph for this function: