garman_kohlhagen
module jetblack_options.european.garman_kohlhagen
Summary
Garman and Kohlhagen (1983) Currency options.
Description
The value of a call option.
The value of a put option.
where:
and
- is the current spot rate
- is the strike price
- is the cumulative normal distribution function
- is domestic risk free [[simple interest]] rate
- is foreign risk free simple interest rate
- is the time to maturity (calculated according to the appropriate day count convention)
- is the volatility of the FX rate.
function jetblack_options.european.garman_kohlhagen.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 of the base currency.
The risk free rate of the quote currency.
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.garman_kohlhagen.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.garman_kohlhagen.price
Summary
Garman and Kohlhagen (1983) Currency options.
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 of the base currency.
The risk free rate of the quote currency.
The asset volatility.