mafipy.function.black_scholes_call_gamma

mafipy.function.black_scholes_call_gamma(underlying, strike, rate, maturity, vol)[source]

calculates black scholes gamma.

\[\frac{\partial^{2}}{\partial S^{2}} c(S, K, r, T, \sigma) = -\phi(d_{1}(S, K, r, T, \sigma)) \frac{1}{S^{2}\sigma\sqrt{T}}\]

where \(S\) is underlying, \(K\) is strike, \(r\) is rate, \(T\) is maturity, \(\sigma\) is volatility, \(\Phi\) is standard normal c.d.f, \(d_{1}\) is defined in func_d1().

See black_scholes_call_value().

Parameters:
  • underlying (float) –
  • strike (float) –
  • rate (float) –
  • maturity (float) – if maturity is not positive, this function returns 0.0.
  • vol (float) – volatility. This must be positive.
Returns:

value of gamma.

Return type:

float.