Backtrader wrapper indicator exposing GBS/Bj-St 2002 Options Greeks: delta, gamma, theta, vega and rho
For anyone who wants it, I've adapted a wrapper function to Davis Edwards' fantastic work on options valuations. It allows charting of delta, gamma, theta, vega and rho for American options but can easily be adapted to call American, European, Asian, Spread Options.
His website is at http://www.understandtrading.com/GBS.html His original GBS.py is a Jupyter notebook, so I've stripped out all the non-Python and created a simple GBS.py file that can be imported and called more generally. His original code is at https://github.com/dedwards25/Python_Option_Pricing
My code can be found here: https://github.com/bigdavediode/Option-Greeks
This code comes with no warranties, expressed or implied. Example code only.
A screenshot showing delta:
A screenshot showing gamma:
A screenshot showing theta:
You get the idea.