#include <qle/pricingengines/blackswaptionenginedeltagamma.hpp>
|
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 const VolatilityType | type = ShiftedLognormal |
|
◆ value()
Real value |
( |
const Option::Type |
type, |
|
|
const Real |
strike, |
|
|
const Real |
atmForward, |
|
|
const Real |
stdDev, |
|
|
const Real |
annuity, |
|
|
const Real |
displacement |
|
) |
| |
◆ 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 }
◆ type
const VolatilityType type = ShiftedLognormal |
|
static |