Awesome but light option price calculator in Python
Project description
option-price
option-price is a Python-based powerful but simple option price calculator.
Installation
pip install option-price
Usage
from optionprice import Option
You can initialize an option through this:
some_option = Option(european=False,
kind = 1,
s0 = 100,
k=120,
t=45,
sigma=0.01,
r=0.05
dv = 0)
option-price
has three approaches to calculate the price of the price of the option. They are
- B-S-M
- Monte Carlo
- Binary Tree
option-price
will pick B-S-M by default. You can simply get the price by using
some_option.getPrice()
If you want to calculate in other ways, you can use
some_option.getPrice(method='MC',iteration = 500000)
or
some_option.getPrice(method='BT',iteration = 1000)
while MC stands for Monte Carlo and BT stands for Binary Tree.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
option-price-0.0.9.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for option_price-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf4df630e052056fd02837f67031fe7f7dfbc252b177077aeae802f0ac8c0937 |
|
MD5 | 8497454d14dd723393304b7e2e68b3c6 |
|
BLAKE2b-256 | 49abcd3d561444a8ee3356c8821a4457b4c9de0cb7c003a0e49ae6f09254b11f |