Metadata-Version: 2.4
Name: option-pricings
Version: 0.1.2
Summary: Option pricing using the Black Scholes Model
Author-email: Shreenivas Dani <shreenivasdani@gmail.com>
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Dynamic: license-file

# option-prices
This is an simple python package to calculate greeks like theta,vega,gamma,delta and rho as well as to calculate option prices using binomial tree method and black scholes method.

# Dependencies

`Numpy` 
`Scipy`

# How to install 

`pip install option-pricings`

# How to import 
`import option_prices`

Or import specific modules

`from option_pricings import bsm` for black scholes
`from option_pricings import binomial` for binomial tree
`from option_pricings import greeks` for greeks 

# using the package 

| Symbol | Meaning | Note |
| :--- | :--- | :--- |
| S | Spot Price | |
| K | Strike Price | |
| T | Time to Maturity | |
| r | Interest Rate | To be entered in the scale of 1-100 |
| sigma | Volatility | To be entered in the scale of 1-100 |
| u | Up Factor | |
| d | Down Factor | |

## black scholes
`from option_pricings import bsm`
`price = bsm(S=50,K=40,T=1,r=6,sigma=25,option_type="call")`
`print(price)`

The option type can be either call or put

## binomial
`from option_pricings import binomial`
`price = binomial(S=50,K=52,r=5,T=2,u=1.2,d=0.8,option_type="put",n_steps=2)`
`print(price)`

you can give either u and d or sigma and the u and d will be calculated based on that similarly you can give either time_step or n_step and the other will be calculated like wise
Note: 
## greeks
for using the greeks library you need to specify which of the greeks you want to calculate 
`from option_pricings import greeks`
`greeks.delta(S=50, K=40, T=1, r=6, sigma=25, option_type='call')`
`greeks.gamma(S=50, K=40, T=1, r=6, sigma=25, option_type='call')`
`greeks.vega(S=50, K=40, T=1, r=6, sigma=25, option_type='call')`
`greeks.theta(S=50, K=40, T=1, r=6, sigma=25, option_type='call')`
`greeks.rho(S=50, K=40, T=1, r=6, sigma=25, option_type='call')`

## Author

Shreenivas Dani

Emai: shreenivasdani@gmail.com


 


