Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ql/pricingengines/blackformula"

Index

Functions

Af

  • Parameters

    Returns Real

F

  • Parameters

    Returns Real

G

  • Parameters

    Returns Real

Nm

  • Parameters

    Returns Real

Np

  • Parameters

    Returns Real

bachelierBlackFormula1

  • Black style formula when forward is normal rather than log-normal. This is essentially the model of Bachelier.

    warning Bachelier model needs absolute volatility, not percentage volatility. Standard deviation is absoluteVolatility*sqrt(timeToMaturity)

    Parameters

    Returns Real

bachelierBlackFormula2

  • Black style formula when forward is normal rather than log-normal. This is essentially the model of Bachelier.

    warning Bachelier model needs absolute volatility, not percentage volatility. Standard deviation is absoluteVolatility*sqrt(timeToMaturity)

    Parameters

    Returns Real

bachelierBlackFormulaImpliedVol

  • Approximated Bachelier implied volatility

    It is calculated using the analytic implied volatility approximation of J. Choi, K Kim and M. Kwak (2009), “Numerical Approximation of the Implied Volatility Under Arithmetic Brownian Motion”, Applied Math. Finance, 16(3), pp. 261-268.

    Parameters

    Returns Real

bachelierBlackFormulaStdDevDerivative1

  • bachelierBlackFormulaStdDevDerivative1(strike: Real, forward: Real, stdDev: Real, discount?: Real): Real
  • Bachelier formula for standard deviation derivative

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation. If T is the time to maturity Black vega would be blackStdDevDerivative(strike, forward, stdDev)*sqrt(T)

    Parameters

    Returns Real

bachelierBlackFormulaStdDevDerivative2

  • Bachelier formula for standard deviation derivative

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation. If T is the time to maturity Black vega would be blackStdDevDerivative(strike, forward, stdDev)*sqrt(T)

    Parameters

    Returns Real

blackFormula1

  • Black 1976 formula

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

    Parameters

    • optionType: Type
    • strike: Real
    • forward: Real
    • stdDev: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0

    Returns Real

blackFormula2

  • Black 1976 formula

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

    Parameters

    Returns Real

blackFormulaCashItmProbability1

  • blackFormulaCashItmProbability1(optionType: Type, strike: Real, forward: Real, stdDev: Real, displacement?: Real): Real
  • Black 1976 probability of being in the money

    (in the bond martingale measure), i.e. N(d2). It is a risk-neutral probability, not the real world one. warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

    Parameters

    Returns Real

blackFormulaCashItmProbability2

  • Black 1976 probability of being in the money

    (in the bond martingale measure), i.e. N(d2). It is a risk-neutral probability, not the real world one. warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity)

    Parameters

    Returns Real

blackFormulaImpliedStdDev1

  • Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    Parameters

    • optionType: Type
    • strike: Real
    • forward: Real
    • blackPrice: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0
    • Default value guess: Real = QL_NULL_REAL
    • Default value accuracy: Real = 0.000001
    • Default value maxIterations: Natural = 100

    Returns Real

blackFormulaImpliedStdDev2

  • Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    Parameters

    • payoff: PlainVanillaPayoff
    • forward: Real
    • blackPrice: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0
    • Default value guess: Real = QL_NULL_REAL
    • Default value accuracy: Real = 0.000001
    • Default value maxIterations: Natural = 100

    Returns Real

blackFormulaImpliedStdDevApproximation1

  • blackFormulaImpliedStdDevApproximation1(optionType: Type, strike: Real, forward: Real, blackPrice: Real, discount?: Real, displacement?: Real): Real
  • Approximated Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    It is calculated using Brenner and Subrahmanyan (1988) and Feinstein (1988) approximation for at-the-money forward option, with the extended moneyness approximation by Corrado and Miller (1996)

    Parameters

    • optionType: Type
    • strike: Real
    • forward: Real
    • blackPrice: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0

    Returns Real

blackFormulaImpliedStdDevApproximation2

  • Approximated Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    It is calculated using Brenner and Subrahmanyan (1988) and Feinstein (1988) approximation for at-the-money forward option, with the extended moneyness approximation by Corrado and Miller (1996)

    Parameters

    Returns Real

blackFormulaImpliedStdDevApproximationRS1

blackFormulaImpliedStdDevApproximationRS2

blackFormulaImpliedStdDevChambers1

  • blackFormulaImpliedStdDevChambers1(optionType: Type, strike: Real, forward: Real, blackPrice: Real, blackAtmPrice: Real, discount?: Real, displacement?: Real): Real
  • Approximated Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    It is calculated following "An improved approach to computing implied volatility", Chambers, Nawalkha, The Financial Review, 2001, 89-100. The atm option price must be known to use this method.

    Parameters

    • optionType: Type
    • strike: Real
    • forward: Real
    • blackPrice: Real
    • blackAtmPrice: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0

    Returns Real

blackFormulaImpliedStdDevChambers2

  • Approximated Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    It is calculated following "An improved approach to computing implied volatility", Chambers, Nawalkha, The Financial Review, 2001, 89-100. The atm option price must be known to use this method.

    Parameters

    Returns Real

blackFormulaImpliedStdDevLiRS1

  • Black 1976 implied standard deviation

    i.e. volatility*sqrt(timeToMaturity)

    "An Adaptive Successive Over-relaxation Method for Computing the Black-Scholes Implied Volatility" M. Li, http://mpra.ub.uni-muenchen.de/6867/

    Starting point of the iteration is calculated based on

    "An Explicit Implicit Volatility Formula" R. Radoicic, D. Stefanica, https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2908494

    Parameters

    • optionType: Type
    • strike: Real
    • forward: Real
    • blackPrice: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0
    • Default value guess: Real = QL_NULL_REAL
    • Default value w: Real = 1
    • Default value accuracy: Real = 0.000001
    • Default value maxIterations: Natural = 100

    Returns Real

blackFormulaImpliedStdDevLiRS2

blackFormulaStdDevDerivative1

  • Black 1976 formula for standard deviation derivative

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation. If T is the time to maturity Black vega would be blackStdDevDerivative(strike, forward, stdDev)*sqrt(T)

    Parameters

    • strike: Real
    • forward: Real
    • stdDev: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0

    Returns Real

blackFormulaStdDevDerivative2

  • Black 1976 formula for standard deviation derivative

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation. If T is the time to maturity Black vega would be blackStdDevDerivative(strike, forward, stdDev)*sqrt(T)

    Parameters

    Returns Real

blackFormulaStdDevSecondDerivative1

  • blackFormulaStdDevSecondDerivative1(strike: Real, forward: Real, stdDev: Real, discount?: Real, displacement?: Real): Real
  • Black 1976 formula for second derivative by standard deviation

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation.

    Parameters

    • strike: Real
    • forward: Real
    • stdDev: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0

    Returns Real

blackFormulaStdDevSecondDerivative2

  • Black 1976 formula for second derivative by standard deviation

    warning instead of volatility it uses standard deviation, i.e. volatility*sqrt(timeToMaturity), and it returns the derivative with respect to the standard deviation.

    Parameters

    Returns Real

blackFormulaVolDerivative

  • Black 1976 formula for derivative with respect to implied vol this is basically the vega, but if you want 1% change multiply by 1%

    Parameters

    • strike: Real
    • forward: Real
    • stdDev: Real
    • expiry: Real
    • Default value discount: Real = 1
    • Default value displacement: Real = 0

    Returns Real

checkParameters

  • checkParameters(strike: Real, forward: Real, displacement: Real): void
  • Parameters

    Returns void

h

  • Parameters

    Returns Real

phi

  • Parameters

    Returns Real