FinanceModels.Equity API Reference
Exported API
FinanceModels.Equity — ModuleThe Equity module provides equity-related model definitions.
See also: the Volatility module.
Unexported API
FinanceModels.Equity.BlackScholesMerton — TypeBlackScholesMerton(r, q, σ) <: AbstractEquityModelA struct representing the Black-Scholes-Merton model for equity prices.
Arguments
r: The risk-free rate (continuously compounded scalar or aFinanceCore.Ratetype).q: The dividend yield (continuously compounded scalar or aFinanceCore.Ratetype).σ: The volatility model of the underlying asset (seeVolatilitymodule)
Fields
r: The risk-free rate.q: The dividend yield.σ: The volatility model of the underlying asset (seeVolatilitymodule)
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.05410094201902403Fitting 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
FinanceModels.Equity.volatility — Methodvolatility(volatility_model,strike_ratio,time_to_maturity)Returns the volatility associated with the money-ness (strike/price ratio) and time to maturity.
Please open an issue if you encounter any issues or confusion with the package.