FinanceModels.Equity API Reference

Exported API

Unexported API

FinanceModels.Equity.BlackScholesMertonType
BlackScholesMerton(r, q, σ) <: AbstractEquityModel

A struct representing the Black-Scholes-Merton model for equity prices.

Arguments

  • r: The risk-free rate (continuously compounded scalar or a FinanceCore.Rate type).
  • q: The dividend yield (continuously compounded scalar or a FinanceCore.Rate type).
  • σ: The volatility model of the underlying asset (see Volatility module)

Fields

  • r: The risk-free rate.
  • q: The dividend yield.
  • σ: The volatility model of the underlying asset (see Volatility module)

When fitting, the volatility will be solved-for; volatility itself is a sub-model that will be optimized with a default optimization bound of 0.0 .. 10.0

Examples

julia> model = BlackScholesMerton(0.05, 0.02, 0.2)
BlackScholesMerton{Float64, Float64, Float64}(0.05, 0.02, 0.2)

Valuing an option:

m = Equity.BlackScholesMerton(0.01, 0.02, 0.15)

a = Option.EuroCall(CommonEquity(), 1.0, 1.0)

@test pv(m, a) ≈ 0.05410094201902403

Fitting a set of option prices:

qs = [
    Quote(0.0541, a),
    Quote(0.072636, b),
]
m = Equity.BlackScholesMerton(0.01, 0.02, Volatility.Constant())
fit(m, qs)
@test fit(m, qs).σ ≈ 0.15 atol = 1e-4
source
FinanceModels.Equity.volatilityMethod
volatility(volatility_model,strike_ratio,time_to_maturity)

Returns the volatility associated with the money-ness (strike/price ratio) and time to maturity.

source

Please open an issue if you encounter any issues or confusion with the package.