Historical vs Implied Volatility with 10yrs Options Data!
ฝัง
- เผยแพร่เมื่อ 8 ก.พ. 2025
- In today's tutorial we investigate how you can use ThetaData's API to retreive 10 years of historical options data on Microsoft (MSFT) for comparing Implied Volatility to Historical Volatility.
We also describe what the difference between historical volatility and implied volatility actually is. Realized volatility (rv) is the actual stock price variability due to randomness of the underlying Brownian motion or Wiener Process of the stock price. While the Implied volatility (iv) is how the market is pricing the option currently. To calculate implied volatility you use the market price of the option (as well as the contract terms) and a theoretical pricing model depending on the type of option being priced.
But what is the difference? Since the market does not have perfect knowledge about the future these two numbers can and will be different. Therein, lies the risk management problem, or perhaps the business or trading opportunity?
Online written tutorial: quantpy.com.au...
★ ★ Code Available on GitHub ★ ★
GitHub: github.com/The...
Specific Tutorial Link: github.com/The...
★ ★ QuantPy GitHub ★ ★
Collection of resources used on QuantPy TH-cam channel. github.com/the...
★ ★ Discord Community ★ ★
Join a small niche community of like-minded quants on discord. / discord
★ ★ Support our Patreon Community ★ ★
Get access to Jupyter Notebooks that can run in the browser without downloading python.
/ quantpy
★ ★ ThetaData API ★ ★
ThetaData's API provides both realtime and historical options data for end-of-day, and intraday trades and quotes. Use coupon 'QPY1' to receive 20% off on your first month.
www.thetadata....
★ ★ Online Quant Tutorials ★ ★
WEBSITE: quantpy.com.au
★ ★ Contact Us ★ ★
EMAIL: pythonforquants@gmail.com
Disclaimer: All ideas, opinions, recommendations and/or forecasts, expressed or implied in this content, are for informational and educational purposes only and should not be construed as financial product advice or an inducement or instruction to invest, trade, and/or speculate in the markets. Any action or refraining from action; investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied in this content, are committed at your own risk an consequence, financial or otherwise. As an affiliate of ThetaData, QuantPy Pty Ltd is compensated for any purchases made through the link provided in this description.
Thanks for watching all, looking forward to hearing your responses to my last question of this tutorial!
Looking forward to the next vid
In theory they can't be different ~ otherwise there is an arbitrage between lifting the cheap and offering the rich. The difference is explained by the implied discount rate which one can infer by inverting the stock option put-call parity approximation:
C-P = S - K*(1-rt) - Dividends
(C-P+D-S)/K + 1 = rt
((C-P+D-S)/K + 1)/t = r
Once you've priced against that discount rate then the IVs should be equivalent. However market effects like a borrow squeeze can alter this. For shorter term options with smaller interest rates and small dividends this is a good approximation.
In my intuition: Yes, in theory, they should be the same, but option prices are a product of supply and demand. Minor differences are to be expected between the two. If the difference is bigger than the spread + TC, I would say that (if the option is American,) maybe a speculation on an increase in interest rates can increase the value of a Put more than a Call. Looking forward to hearing the answer!!
Great video. Loved it ❤️
Interesting question, but I don't have the answer! But may I suggest a topic for a futrure video. As you know the US market is now having a lot of high yield etf. It would be very interesting to be able to evaluate the risk on some of those etf that use synthetic covered call strategy: writing calls on security that the etf do not owns!😁
Just a guess: since the world is primarily long, puts are more often bought for tail protection, and therefore carry a volatility premium.
thanks for your site with code examples
Is it possible to calculate iv in Excel sheet sir ..pls make a video on implied volatility 🎉
in the formulae for realized vol he assumed the returns had zero mean?
Hey, do you know the best place to find monthly fundamental data for stocks, over the span of decades? For back testing. And one that takes into account survivorship vials for delisted stocks.
What i'm really confused about is when you're making this API call is understanding whether this is a 4 dimensional array? Said differently, for each t_i are you returning, for that day, ALL the strikes for MSFT between 13:00 and 14:00? (thus 4 dimensional as you'd have the 'smile' for each option on that day at that time ) OR are you returning only the strike prices of ATM options on MSFT between 13:00 and 14:00? Sorry, may be a silly question
Hi everyone, can someone ask this important question ,please ?:
If you buy a call/put option that only has intrinsic value, then you can almost forget about Theta an IV because the option price movement will not be affected by them?
is that right? :
Theta and IV only applies to the extrinic value part and not to the intrinsic value part of the price of the option?
Else, if you buy a call/put option with both intrinsic and extrinsic value, but, the amount of intrinsic value is bigger than the extrinsic value , you can only lose money if your option ends OTM?I mean, even if end up losing all the extrinsic value, because your option ends ITM (you get right the direction of the stock movement) , still has intrinsic value (and bigger than the one it had when you bought it)
You can only lose (because of theta and IV) the extrinsic value part , not more than that?
Thanks in advance
3:35 A small mistake here, in d1, it should be (r+sigma^2)T.
I forward your question to ChatGPT4, and here is the reply:
"Yes, in a perfect world without arbitrage opportunities, the implied volatility for a call and a put with the same strike price and expiration should be the same. This property is a result of put-call parity, which is a fundamental principle in options pricing that defines a relationship between the price of European put and call options of the same class (i.e., with the same underlying asset, strike price and expiration date).
However, in the real world, slight discrepancies can occur due to factors such as bid-ask spreads, transaction costs, and liquidity issues. These differences, while typically small, can result in slightly different implied volatilities when calculated from observed market prices of put and call options.
That said, if you see a significant difference between implied volatilities of a put and a call with the same strike and expiration, it might indicate an arbitrage opportunity, a problem with the data, or a violation of some assumption of the Black-Scholes model or the conditions required for put-call parity to hold."
Clients' life plans could be the reason of the premium difference.
(๑˙❥˙๑)
I believe what you’re calculating is “historical volatility”, not “realized volatility”. Every trust worthy research paper defines realized volatility in terms of intraday “high frequency” returns, not daily historical ones. So to get the realized volatility, for example, one would take 5-minute intraday returns and use a formula similar to historical volatility to calculate the realized volatility for that day. So your reference to realized volatility is misleading.