Hi everyone,
Does anyone in the community know how to plot the volatility surface using interpolation method? I tried different interpolation methods in Python, they do not support irregular lists. But for market options contracts, for one maturity there could be 4 or 5 or even more strikes. That would make the x axis and y axis not necessarily orthogonal or equally spaced. Can anyone help me with this?
JayJayD
I'll be glad to help to my best.
But, I need more details, like:
Jing Wu
Thanks JayJay! The normalization of strike prices do solve my problems. Now I can create a smooth volatility surface using interpolation methods in Python.
Pavel Paramonov
Jing Wu could you share a bit about your context? There are interpolation approaches for the volatility surface that take into account no-arbitrage conditions. It really depends on the objective of interpolation.
I'd be glad to see any attempts to interpolate e.g. constant maturity IV within QuantConnect. Could also help to assess option data quality over specific days.
Jing Wu
Hi Pavel Paramonov, please check my research notebook file attached here(QC research page are not launched at that time so I'm using the real-time Yahoo Finance options data to generate the volatility skew and the surface plot, you can install pandas_datareader library locally and run the code in Jupyter). My final solution is: first using the griddata interpolation method to fill the implied volatility dataset to make it a regular matrix, then I use the Rbf(radial basis functions) interpolation to further smooth the surface. Since Rbf supports multiple kinds of radial functions, I tried most of them and finally found 'linear' works well. I'm pretty interested in options volatility and I'm willing to learn more if you have any better ideas for interpolation. For more details please refer to my tutorial
It would be great if you can give me more suggestions about this research.
Pavel Paramonov
I did not realize how many tutorials are available now. The ones detailing QC API in its Python flavor are particularly helpful, thank you Jing Wu !
Regarding the volatility interpolation in your notebook: I see you used RBF just for plotting the surface, that is fine of course. As far as the interpolation when IV at non-listed coordinates is needed, there may be advantages in parametric fits over RFB/loess/etc. interpolation. Specifically, it could be better when the fitting function satisfies no-arbitrage conditions (also easier to do differentiation). Here are a couple of threads that may be useful:
https://quant.stackexchange.com/questions/20741/why-linear-interpolation-not-appropriate-for-volatility-surface-construction
https://quant.stackexchange.com/questions/11580/why-parameterize-the-black-scholes-implied-volatility-surface
What I was particularly interested to see is a constant-maturity IV calculation from QC options data. Say, starting with 1 month ATM IV and comparing the results with some Bloomberg sample over a year or so.
Here is a relatively simple worked out calculation case:
https://quant.stackexchange.com/questions/27714/how-to-compute-30-60-90-day-implied-volatility
On handling interpolation with respect to the expiration:
https://quant.stackexchange.com/questions/22258/how-to-do-interpolation-in-the-term-structure-of-volatility-surface
This could be one of several starting points to evaluate the quality of AlgoSeek option data for specific tickers/intervals, which I imagine many QC users may wonder about.
Jing Wu
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!