barone_adesi_whaley
module jetblack_options.american.barone_adesi_whaley
Summary
Option pricing functions implementing the Barone, Adesi and Whaley (1987)
Description
American approximation.
function jetblack_options.american.barone_adesi_whaley.ivol
Summary
Calculate the volatility of an 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 expiry of the option in years.
The risk free rate.
The cost of carry of the asset.
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.american.barone_adesi_whaley.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.american.barone_adesi_whaley.price
Summary
The Barone-Adesi and Whaley (1987) American approximation.
Parameters
is_call: boolTrue for a call, false for a put.
The asset price.
The strike price.
The time to expiry in years.
The risk free rate.
The cost of carry.
The asset volatility.