A while ago I put a lot of work and effort into looking at Black Scholes and various other option pricing models. Given that you can pay a small fortune for each option series you purchase from the CBOE, it occurred to me that you may as well back test on theoretical option prices that you generate yourself.
The Jupyter Notebook set our below (and hosted on Jupyter NB Viewer where you will be able to see it more clearly) was the result of my efforts, with which I was fairly pleased. I then realized that I had failed to estimate the “Volatility Smile” whereby options further out of the money or in the money tend to have an implied volatility slightly different from ATM options in the real market place.
At some stage I will revert to the notebook and attempt to model the volatility smile but at this stage I thought I may as well release the Notebook to those (few!) who may have interest.
I have not looked at this code for quite some time. Caveat Emptor, make of it what you will. If you don’t code, or are not familiar with Python and its libraries, “move on and ignore this post” would be my advice!