Collection of classical option pricing formulas.
>>> from putcall import black_scholes >>> spot_value = 100 >>> strike_value = 105 >>> vol_value = 0.2 >>> time_value = 2.0 >>> is_call_bool = True >>> rate = 0.05 >>> black_scholes(spot_value, strike_value, vol_value, time_value, is_call_bool, rate) 13.639602713024757
The latest stable version can always be installed or updated via pip:
$ pip install putcall
If the above fails, please try easy_install instead:
$ easy_install putcall
The latest development version can be installed directly from GitHub:
$ pip install --upgrade git+https://github.com/pbrisk/putcall.git
Issues and Pull Requests are always welcome.
Code and documentation are available according to the Apache Software License (see LICENSE).