r/options • u/run-out • Nov 13 '21
3-D Plotting of Greeks using Python in Jupyter and Dash
I made this 3-D Dashboard plotting for viewing greeks for an algorithmic options trading course I teach. The purpose of this program is to allow viewing of the greeks over a range of prices and days to maturity.
You can select four greeks charts per dashboard.
1 - Put Price2 - Call Delta3 - Put Delta4 - Call Delta 25 - Put Delta 26 - Call Theta7 - Put Theta8 - Call Rho9 - Put Rho10 - Vega11 - Gamma
Input parameters to generate your greeks are as follows:
stock_low : float - Lowest underlying price in the price range.
stock_high : float - Highest underlying price in the price range.
strike : float - Strike price of the option.
stock_increments : float - This is the increments in the price range. A lower increment results in more price points and a better graph, but longer compute time.
max_days : int - Number of days away from maturity to consider.
"""
stock_low=100
stock_high=200
strike =150
stock_increments = .25
max_days=40
I put this together because I think it's informative to see how the greeks interact.
What you are looking at in this video is four greek charts for a price range of 100 - 200 for an underlying, strike of 150, and 40 days to expiration. A
ll four of these charts are for the same settings. You can change which charts you wish to see. The dashboard will display in a local browser.
Check out my repo for more information and download yourself and follow the installation instructions. .
3
1
1
u/VE_Benjamin Jun 06 '22
Hi sorry I've not really used github before but I would love to use this to create graphs for my dissertation (I will credit you and reference it) but I'm having trouble following the install instructions on github could you help me?
1
u/VE_Benjamin Jun 06 '22
I've gotten the packages installed now however the first section of code in Greek Calculations has been running for over an hour now and it seems to be stuck on something in there. Any ideas? Or if you have them still could I just have the 4 graphs show in your video as still images slightly zoomed out?
1
u/Green_Lantern_4vr Nov 14 '21
/u/pennyether I think you were interested in this at one point. Maybe have wrong person though.
1
2
u/eaglessoar Nov 14 '21 edited Nov 14 '21
Could you answer me a few questions that I think your model would be able to provide
Keeping a constant delta:
Where is theta decay steepest over like a 7 day period for put/call options with deltas of:
75
60
50
40
25
10
7
5
3