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

#include <qle/termstructures/creditvolcurve.hpp>

+ Inheritance diagram for CreditVolCurveWrapper:
+ Collaboration diagram for CreditVolCurveWrapper:

Public Member Functions

 CreditVolCurveWrapper (const QuantLib::Handle< QuantLib::BlackVolTermStructure > &vol)
 
QuantLib::Real volatility (const QuantLib::Date &exerciseDate, const QuantLib::Real underlyingLength, const QuantLib::Real strike, const Type &targetType) const override
 
const QuantLib::Date & referenceDate () const override
 
- Public Member Functions inherited from CreditVolCurve
 CreditVolCurve (QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc, const std::vector< QuantLib::Period > &terms, const std::vector< QuantLib::Handle< CreditCurve > > &termCurves, const Type &type)
 
 CreditVolCurve (const QuantLib::Natural settlementDays, const QuantLib::Calendar &cal, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc, const std::vector< QuantLib::Period > &terms, const std::vector< QuantLib::Handle< CreditCurve > > &termCurves, const Type &type)
 
 CreditVolCurve (const QuantLib::Date &referenceDate, const QuantLib::Calendar &cal, QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc, const std::vector< QuantLib::Period > &terms, const std::vector< QuantLib::Handle< CreditCurve > > &termCurves, const Type &type)
 
QuantLib::Real volatility (const QuantLib::Date &exerciseDate, const QuantLib::Period &underlyingTerm, const QuantLib::Real strike, const Type &targetType) const
 
virtual QuantLib::Real volatility (const QuantLib::Date &exerciseDate, const QuantLib::Real underlyingLength, const QuantLib::Real strike, const Type &targetType) const =0
 
QuantLib::Real volatility (const QuantLib::Real exerciseTime, const QuantLib::Real underlyingLength, const QuantLib::Real strike, const Type &targetType) const
 
virtual const std::vector< QuantLib::Period > & terms () const
 
virtual const std::vector< QuantLib::Handle< CreditCurve > > & termCurves () const
 
const Typetype () const
 
QuantLib::Real atmStrike (const QuantLib::Date &expiry, const QuantLib::Period &term) const
 
QuantLib::Real atmStrike (const QuantLib::Date &expiry, const QuantLib::Real underlyingLength) const
 
QuantLib::Real minStrike () const override
 
QuantLib::Real maxStrike () const override
 
QuantLib::Date maxDate () const override
 

Private Attributes

QuantLib::Handle< QuantLib::BlackVolTermStructure > vol_
 

Additional Inherited Members

- Public Types inherited from CreditVolCurve
enum class  Type { Price , Spread }
 
- Protected Member Functions inherited from CreditVolCurve
void init ()
 
void update () override
 
void performCalculations () const override
 
QuantLib::Real moneyness (const QuantLib::Real strike, const QuantLib::Real atmStrike) const
 
QuantLib::Real strike (const QuantLib::Real moneyness, const QuantLib::Real atmStrike) const
 
- Protected Attributes inherited from CreditVolCurve
std::vector< QuantLib::Period > terms_
 
std::vector< QuantLib::Handle< CreditCurve > > termCurves_
 
Type type_
 
std::map< std::pair< QuantLib::Date, double >, double > atmStrikeCache_
 

Detailed Description

Definition at line 169 of file creditvolcurve.hpp.

Constructor & Destructor Documentation

◆ CreditVolCurveWrapper()

CreditVolCurveWrapper ( const QuantLib::Handle< QuantLib::BlackVolTermStructure > &  vol)
explicit

Definition at line 606 of file creditvolcurve.cpp.

607 : CreditVolCurve(vol->businessDayConvention(), vol->dayCounter(), {}, {}, Type::Spread), vol_(vol) {
608 registerWith(vol_);
609}
CreditVolCurve(QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter &dc, const std::vector< QuantLib::Period > &terms, const std::vector< QuantLib::Handle< CreditCurve > > &termCurves, const Type &type)
QuantLib::Handle< QuantLib::BlackVolTermStructure > vol_

Member Function Documentation

◆ volatility()

Real volatility ( const QuantLib::Date &  exerciseDate,
const QuantLib::Real  underlyingLength,
const QuantLib::Real  strike,
const Type targetType 
) const
overridevirtual

Implements CreditVolCurve.

Definition at line 611 of file creditvolcurve.cpp.

612 {
613 return vol_->blackVol(exerciseDate, strike, true);
614}
QuantLib::Real strike(const QuantLib::Real moneyness, const QuantLib::Real atmStrike) const
+ Here is the call graph for this function:

◆ referenceDate()

const Date & referenceDate ( ) const
override

Definition at line 616 of file creditvolcurve.cpp.

616{ return vol_->referenceDate(); }

Member Data Documentation

◆ vol_

QuantLib::Handle<QuantLib::BlackVolTermStructure> vol_
private

Definition at line 179 of file creditvolcurve.hpp.