black_76
module jetblack_options.european.black_76
Summary
Black (1976) Options on futures/forwards
Description
- The discounted futures price ,
- Strike price ,
- Risk-free rate ,
- Annual dividend yield ,
- Time to maturity
- Volatility .
Most of the formula use one or both of the following terms.
function jetblack_options.european.black_76.delta
Summary
The sensitivity of the option to a change in the asset price
Description
using Black 76.
For the call.
For the put.
Parameters
is_call: boolTrue for a call, false for a put.
The current futures price.
The strike price.
The time to expiry in years.
The risk free rate.
The volatility.
Returns
float: The delta.function jetblack_options.european.black_76.gamma
Summary
The second derivative to the change in asset price using Black 76.
Description
The gamma for both calls and puts.
Parameters
F: floatThe current futures price.
The strike price.
The time to expiry in years.
The risk free rate.
The volatility.
Returns
float: The gamma.function jetblack_options.european.black_76.ivol
Summary
Calculate the volatility of a Black 76 option that is implied by the price.
Parameters
is_call: boolTrue for a call, false for a put.
The current asset price.
The option strike price
The time to maturity of the option in years.
The risk free rate.
The option price.
The maximum number of iterations before a price is returned. Defaults to 20.
The largest acceptable error. Defaults to 1e-8.
Returns
float: The implied volatility.function jetblack_options.european.black_76.make_numeric_greeks
Summary
Make a class to generate greeks numerically using finite difference methods.
Parameters
is_call: boolIf true the options is a call; otherwise it is a put.
Returns
NumericGreeks: A class which can generate Greeks using finite difference methods.function jetblack_options.european.black_76.price
Summary
Fair value of a futures/forward using Black 76.
Description
For a call:
For a put:
Parameters
is_call: boolTrue for a call, false for a put.
The price of the future.
The strike price.
The time to expiry in years.
The risk free rate.
The asset volatility.
Returns
float: The option price.function jetblack_options.european.black_76.rho
Summary
The sensitivity of the option price to a change in the risk free rate
Description
using Black 76.
For a call:
For a put:
Parameters
is_call: boolTrue for a call, false for a put.
The price of the future.
The strike price.
The time to expiry in years.
The risk free rate.
The asset volatility.
Returns
float: The rho.function jetblack_options.european.black_76.theta
Summary
The change in the value of the option with respect to time to expiry
Description
using Black 76.
For the call.
For the put.
Parameters
is_call: boolTrue for a call, false for a put.
The current futures price.
The strike price.
The time to expiry in years.
The risk free rate.
The volatility.
Returns
float: The theta.function jetblack_options.european.black_76.vanna
Summary
The sensitivity of the option value to the underlying
Description
asset price and the volatility.
For both calls and puts.
Parameters
F: floatThe price of the future.
The strike price.
The time to expiry in years.
The risk free rate.
The asset volatility.
Returns
float: The vanna.function jetblack_options.european.black_76.vega
Summary
The sensitivity of the options price or a change in the asset volatility
Description
using Black 76.
For both calls and puts.
Parameters
F: floatThe current futures price.
The strike price.
The time to expiry in years.
The risk free rate.
The volatility.
Returns
float: The vega.function jetblack_options.european.black_76.vomma
Summary
The second order sensitivity to volatility.
Description
For both puts and calls.
Parameters
F: floatThe price of the future.
The strike price.
The time to expiry in years.
The risk free rate.
The asset volatility.