Option pricing using the Black Scholes Model
Project description
Option-prices
This package is to be used for option price calculation using the Black Scholes Model and binomial model
Description
This package provides a simple and easy-to-use implementation of the Black Scholes Model and binomial model for calculating European call and put option prices. It is designed for students, traders, and developers who want a lightweight and reliable tool for option pricing without the complexity of larger libraries.
Getting Started
Dependencies
Numpy,Scipy
Installing
pip install option-prices
Executing program
import option_pricings from option_pricings import bsm from option_pricings import binomial
example when time scale is in year
price=bsm(S=50,K=50,T=1,r=6,sigma=25,option_type = "call",time_scale="Year") print(price)
price = binomial(S=30,K=40,r=6,T=2,time_step = 1,u=1.2,d=0.8) print(price)
using sigma parameter instead of u and d
price = binomial(S=30,K=40,r=6,T=2,time_step = 1,sigma = 25) print(price)
put option
price = binomial(S=30,K=40,r=6,T=2,time_step = 1,u=1.2,d=0.8,option_type="put") print(price)
changing time scale to month
price = binomial(S=30,K=40,r=6,T=24,time_step = 12,u=1.2,d=0.8,time_scale = "month") print(price)
example when time scale is in month
price = bsm(S=50,K=50,T=6,r=6,sigma=25,option_type = "call",time_scale="Month") print(price)
Note: When time_scale="Year", enter T in years. When time_scale="Month", enter T in months. same thing applies for binomial
Authors
Shreenivas Dani
Version History
- 0.1
- Initial Release
License
This project is licensed under the MIT License - see the LICENSE.md file for details
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file option_prices-0.1.1.tar.gz.
File metadata
- Download URL: option_prices-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f9e5745e9ab1ed414b35bc9fb73463c545a1a103662115ec126da31f5888778
|
|
| MD5 |
c17a45090cb071499894bcff4749a200
|
|
| BLAKE2b-256 |
64ef950d59c4045e98d618c87435a7b53243679c42e822f98cc2b40d254da915
|
File details
Details for the file option_prices-0.1.1-py3-none-any.whl.
File metadata
- Download URL: option_prices-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ce3b808624d67dca4144d4c92da376735157f7b5287da8515feafd87254b028
|
|
| MD5 |
70365e92abba53c5d9eea1c7bc486537
|
|
| BLAKE2b-256 |
bf8391fa759ced8583a4e71b1c24d8557d49846267b8d2e780c6d5a9c8f1637d
|