Black Scholes calculator for Python including all Greeks
Project description
# blackscholes
![](https://img.shields.io/pypi/dm/blackscholes) |
![](https://img.shields.io/pypi/pyversions/blackscholes)
Black Scholes calculator for Python including all Greeks.
## Installation
`pip install blackscholes`
## Examples
### Input variables
```python3
S = 55.0 # Asset price of 55
K = 50.0 # Strike price of 50
T = 1.0 # 1 year to maturity
r = 0.0025 # 0.25% risk-free rate
sigma = 0.15 # 15% vol
```
### Call
```python3
from blackscholes import BlackScholesCall
call = BlackScholesCall(S=S, K=K, T=T, r=r, sigma=sigma)
call.price() ## 6.339408
call.delta() ## 0.766407
call.charm() ## 0.083267
```
### Put
```python3
from blackscholes import BlackScholesPut
put = BlackScholesPut(S=S, K=K, T=T, r=r, sigma=sigma)
put.price() ## 1.214564
put.delta() ## -0.23359
put.charm() ## 0.083267
```
## Contributing
We very much welcome new contributions! Check out the [Github Issues](https://github.com/CarloLepelaars/blackscholes/issues)
to see what is currently being worked on.
Also check out [5. Contributing](https://carlolepelaars.github.io/blackscholes/5.contributing/) in the documentation to learn more about
contributing to [blackscholes](https://github.com/CarloLepelaars/blackscholes).
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
blackscholes-0.0.4.tar.gz
(7.5 kB
view hashes)
Built Distribution
Close
Hashes for blackscholes-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3742fed039f8b072b00889b7636ef24f20660f73680822a6282247cb3398b383 |
|
MD5 | 59cc0d671cb5951bb97f8dcc46e7d157 |
|
BLAKE2b-256 | 4bc70ca46442f9d82956f2f863daa3aad0bbafb333529803e2ee2aa707858540 |