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

#include <qle/pricingengines/blackswaptionenginedeltagamma.hpp>

+ Collaboration diagram for BachelierSpec:

Public Member Functions

Real value (const Option::Type type, const Real strike, const Real atmForward, const Real stdDev, const Real annuity, const Real)
 
Real vega (const Real strike, const Real atmForward, const Real stdDev, const Real exerciseTime, const Real annuity, const Real)
 
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 = Normal
 

Detailed Description

Definition at line 144 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 
)

Definition at line 146 of file blackswaptionenginedeltagamma.hpp.

147 {
148 return bachelierBlackFormula(type, strike, atmForward, stdDev, annuity);
149 }

◆ vega()

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

Definition at line 150 of file blackswaptionenginedeltagamma.hpp.

151 {
152 return std::sqrt(exerciseTime) * bachelierBlackFormulaStdDevDerivative(strike, atmForward, stdDev, annuity);
153 }

◆ 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 154 of file blackswaptionenginedeltagamma.hpp.

155 {
156 QuantLib::CumulativeNormalDistribution cnd;
157 Real d1 = (atmForward - strike) / stdDev;
158 Real w = type == Option::Call ? 1.0 : -1.0;
159 return annuity * w * cnd(w * d1);
160 }

◆ gamma()

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

Definition at line 161 of file blackswaptionenginedeltagamma.hpp.

162 {
163 QuantLib::CumulativeNormalDistribution cnd;
164 Real d1 = (atmForward - strike) / stdDev;
165 return annuity * cnd.derivative(d1) / stdDev;
166 }

◆ theta()

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

Definition at line 167 of file blackswaptionenginedeltagamma.hpp.

168 {
169 QuantLib::CumulativeNormalDistribution cnd;
170 Real d1 = (atmForward - strike) / stdDev;
171 return -0.5 * annuity * cnd.derivative(d1) * stdDev / exerciseTime;
172 }

Member Data Documentation

◆ type

const VolatilityType type = Normal
static

Definition at line 145 of file blackswaptionenginedeltagamma.hpp.