Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
Black76Spec Struct Reference

#include <qle/pricingengines/blackswaptionenginedeltagamma.hpp>

+ Collaboration diagram for Black76Spec:

Public Member Functions

Real value (const Option::Type type, const Real strike, const Real atmForward, const Real stdDev, const Real annuity, const Real displacement)
 
Real vega (const Real strike, const Real atmForward, const Real stdDev, const Real exerciseTime, const Real annuity, const Real displacement)
 
Real delta (const Option::Type type, const Real strike, const Real atmForward, const Real stdDev, const Real annuity, const Real displacement)
 
Real gamma (const Real strike, const Real atmForward, const Real stdDev, const Real annuity, const Real displacement)
 
Real theta (const Real strike, const Real atmForward, const Real stdDev, const Real exerciseTime, const Real annuity, const Real displacement)
 

Static Public Attributes

static const VolatilityType type = ShiftedLognormal
 

Detailed Description

Definition at line 111 of file blackswaptionenginedeltagamma.hpp.

Member Function Documentation

◆ value()

Real value ( const Option::Type  type,
const Real  strike,
const Real  atmForward,
const Real  stdDev,
const Real  annuity,
const Real  displacement 
)

Definition at line 113 of file blackswaptionenginedeltagamma.hpp.

114 {
115 return blackFormula(type, strike, atmForward, stdDev, annuity, displacement);
116 }

◆ vega()

Real vega ( const Real  strike,
const Real  atmForward,
const Real  stdDev,
const Real  exerciseTime,
const Real  annuity,
const Real  displacement 
)

Definition at line 117 of file blackswaptionenginedeltagamma.hpp.

118 {
119 return std::sqrt(exerciseTime) *
120 blackFormulaStdDevDerivative(strike, atmForward, stdDev, annuity, displacement);
121 }

◆ delta()

Real delta ( const Option::Type  type,
const Real  strike,
const Real  atmForward,
const Real  stdDev,
const Real  annuity,
const Real  displacement 
)

Definition at line 122 of file blackswaptionenginedeltagamma.hpp.

123 {
124 QuantLib::CumulativeNormalDistribution cnd;
125 Real d1 = std::log((atmForward + displacement) / (strike + displacement)) / stdDev + 0.5 * stdDev;
126 Real w = type == Option::Call ? 1.0 : -1.0;
127 return annuity * w * cnd(w * d1);
128 }

◆ gamma()

Real gamma ( const Real  strike,
const Real  atmForward,
const Real  stdDev,
const Real  annuity,
const Real  displacement 
)

Definition at line 129 of file blackswaptionenginedeltagamma.hpp.

130 {
131 QuantLib::CumulativeNormalDistribution cnd;
132 Real d1 = std::log((atmForward + displacement) / (strike + displacement)) / stdDev + 0.5 * stdDev;
133 return annuity * cnd.derivative(d1) / ((atmForward + displacement) * stdDev);
134 }

◆ theta()

Real theta ( const Real  strike,
const Real  atmForward,
const Real  stdDev,
const Real  exerciseTime,
const Real  annuity,
const Real  displacement 
)

Definition at line 135 of file blackswaptionenginedeltagamma.hpp.

136 {
137 QuantLib::CumulativeNormalDistribution cnd;
138 Real d1 = std::log((atmForward + displacement) / (strike + displacement)) / stdDev + 0.5 * stdDev;
139 return -0.5 * annuity * cnd.derivative(d1) * (atmForward + displacement) * stdDev / exerciseTime;
140 }

Member Data Documentation

◆ type

const VolatilityType type = ShiftedLognormal
static

Definition at line 112 of file blackswaptionenginedeltagamma.hpp.