Skip to content

Commit 31864c5

Browse files
committed
Bitcoin example
1 parent 191a552 commit 31864c5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

example_greeks.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from bsm import BSM
2+
3+
calc = BSM()
4+
5+
#Bitcoin example
6+
7+
S = 21000 #Underlying (price now)
8+
K = 30000 #Strike
9+
V = 0.75 #Implied Volatility (1 / 100%)
10+
T = 30 / 365 #Expiration date (days from now / 365)
11+
dT = "C" #Call / Put
12+
13+
print('Theo: ', round(calc.theo(S, K, V, T, dT), 2))
14+
print('Delta: ', round(calc.delta(S, K, V, T, dT), 2))
15+
print('Theta: ', round(calc.theta(S, K, V, T), 2))
16+
print('Vega: ', round(calc.vega(S, K, V, T), 2))
17+
print('Gamma: ', round(calc.gamma(S, K, V, T), 2))

0 commit comments

Comments
 (0)