Mercurial > public > python-black-scholes
comparison README.md @ 15:ca59a9f4076f
Change info files
author | Dennis <dennis@denniscm.com> |
---|---|
date | Fri, 11 Aug 2023 18:25:49 +0000 |
parents | 06e63d7cdb22 |
children | 6af01a49ce09 |
comparison
equal
deleted
inserted
replaced
14:06e63d7cdb22 | 15:ca59a9f4076f |
---|---|
1 # python-black-scholes model | 1 |
2 # python-black-scholes | |
3 | |
4 A command line utility to calculate the theoretical call and put price of an European option using the black-scholes method. | |
5 | |
6 - Docs: <https://denniscm.com/proj/python-black-scholes.html> | |
7 - Main repo on SourceHut: <https://git.sr.ht/~denniscmartin/python-black-scholes> | |
8 - Mirrors: | |
9 - Github: <https://github.com/denniscmartin/python-black-scholes> | |
10 - Gitlab: <https://gitlab.com/denniscmartin/python-black-scholes> | |
2 | 11 |
3 | 12 |
13 ## Note | |
4 | 14 |
5 ## Installation | 15 Previously, the project name was `fucking-black-scholes`, but I changed it to make sure that no employer thinks I'm crazy or something. |
6 | 16 |
7 ### Using pip | |
8 | |
9 ```bash | |
10 pip3 install fucking-black-scholes | |
11 ``` | |
12 | |
13 ## Usage | |
14 | |
15 ```bash | |
16 fbs --help | |
17 ``` | |
18 | |
19 ### Examples | |
20 | |
21 Price a European call option with the following data: | |
22 - Spot price = $20 | |
23 - Exercise price = $21 | |
24 - Risk free rate = 5% | |
25 - Standard deviation = 25% | |
26 - Time to expiration = 6 months | |
27 | |
28 #### Command | |
29 | |
30 ```bash | |
31 fbs \ | |
32 --spot-price=20.00 \ | |
33 --exercise-price=21.00 \ | |
34 --risk-free-rate=0.05 \ | |
35 --std=0.25 \ | |
36 --expiration=0.5 | |
37 ``` | |
38 | |
39 #### Output | |
40 | |
41 ```bash | |
42 --------------------------------------------- | |
43 European call option price: 1.197698084193286 | |
44 --------------------------------------------- | |
45 European put option price: 1.6792062367882679 | |
46 --------------------------------------------- | |
47 ``` |