🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 67 (from laksa078)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

đź“„
INDEXABLE
âś…
CRAWLED
14 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.5 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://quantra.quantinsti.com/glossary/Realized-Volatility
Last Crawled2026-04-03 23:14:32 (14 days ago)
First Indexed2018-07-22 13:19:58 (7 years ago)
HTTP Status Code200
Meta TitleRealized Volatility
Meta DescriptionRealized volatility refers to the measure of daily changes in the price of a security over a particular period of time.
Meta Canonicalnull
Boilerpipe Text
Introduction Realized volatility refers to the measure of daily changes in the price of a security over a particular period of time. It assumes the daily mean price to be zero in order to provide movement regardless of direction.  It is different from Implied volatility in the sense that realized volatility is the actual change in historical prices, while implied volatility predicts future price volatility. Realized volatility can be calculated by firstly calculating continuously compounded daily returns using the following formula: where, Ln = natural logarithm   Pt = Underlying Reference Price (“closing price”) at day t Pt–1 = Underlying Reference Price at day immediately preceding day t Then, by plugging the value of Rt in the formula below: where, Vol = Realized volatility 252 = approximate number of trading days in a year t = a counter representing each trading day n = number of trading days in the specific time frame Rt = continuously compounded daily returns   All the concepts covered in this post are taken from the Quantra course on  Options Volatility Strategies: Greeks, GARCH & Python Backtesting . You can preview the concepts taught in this course by clicking on the free preview button. Note:  The links in this tutorial will be accessible only after logging into  quantra.quantinsti.com  and enrolling for the free preview of the course.     Advantages The realized volatility is the measure of the historical performance of an asset which implies that one comes to know if the asset’s price has been fluctuating a lot or not. Hence, the asset’s volatility is predicted by the historical performance. The realized volatility also concentrates on the time period and hence you can analyse a particular time period in this manner. For measuring the implied volatility (future volatility), an analysis of historical performance is always helpful. Hence, realized volatility is the base of implied volatility. Disadvantages The only disadvantage of the realized volatility is that it does not take into account the current price and also does not look into the future volatility, unlike implied volatility. Hence, realized volatility is actually directionless and simply chases the upward and downward trends of the historical data. Let us find out realized volatility with the help of Python. We begin with extracting the data from yahoo finance. We will take Amazon’s data here.   # For data manipulation import pandas as pd import numpy as np # To fetch financial data import yfinance as yf # Download the price data of Apple from Jan 2019 to Dec 2019 # Set the ticker as 'AAPL' and specify the start and end dates price_data_AMZN= yf.download('AMZN', start='2020-11-06', end='2023-1-3', auto_adjust = True) price_data_AMZN Output: [*********************100%***********************]  1 of 1 completed Output:   Open High Low Close Volume Date           2020-11-05 165.998505 168.339996 164.444000 166.100006 115786000 2020-11-06 165.231995 166.100006 161.600006 165.568497 92946000 2020-11-09 161.551498 164.449997 155.605499 157.186996 143808000 2020-11-10 154.751007 155.699997 150.973999 151.751007 131820000 2020-11-11 153.089005 156.957504 152.500000 156.869507 87338000 ... ... ... ... ... ... 2022-12-23 83.250000 85.779999 82.930000 85.250000 57433700 2022-12-27 84.970001 85.349998 83.000000 83.040001 57284000 2022-12-28 82.800003 83.480003 81.690002 81.820000 58228600 2022-12-29 82.870003 84.550003 82.550003 84.180000 54995900 2022-12-30 83.120003 84.050003 82.470001 84.000000 62401200 542 rows × 5 columns Now, let us plot the data.   import matplotlib.pyplot as plt %matplotlib inline # Compute the logarithmic returns using the Closing price price_data_AMZN['Log_Ret'] = np.log(price_data_AMZN['Close'] / price_data_AMZN['Close'].shift(1)) # Compute Volatility using the pandas rolling standard deviation function price_data_AMZN['Realized Volatility'] = price_data_AMZN['Log_Ret'].rolling(window=252).std() * np.sqrt(252) # Plot the AMZN Price series and the Volatility price_data_AMZN[['Close']].plot(subplots=True, color='blue',figsize=(8, 6)) plt.title('Close price', color='purple', size=15) # Setting axes labels for close prices plot plt.xlabel('Dates', {'color': 'orange', 'fontsize':15}) plt.ylabel('Prices', {'color': 'orange', 'fontsize':15}) price_data_AMZN[['Realized Volatility']].plot(subplots=True, color='blue',figsize=(8, 6)) plt.title('Realized Volatility', color='purple', size=15) # Setting axes labels for realized volatility plot plt.xlabel('Dates', {'color': 'orange', 'fontsize':15}) plt.ylabel('Realized volatility', {'color': 'orange', 'fontsize':15}) # Rotating the values along x-axis to 45 degrees plt.xticks(rotation=45) Output: The output above shows a steep rise in the realized volatility between November 2021 and January 2023. What to do next?  Go to  this  course  Click on ' Free Preview ' Go through 10-15% of course content  Drop us your comments, queries on  community     About the Course Author IMPORTANT DISCLAIMER:  This post is for educational purposes only and is not a solicitation or recommendation to buy or sell any securities. Investing in financial markets involves risks and you should seek the advice of a licensed financial advisor before making any investment decisions. Your investment decisions are solely your responsibility. The information provided is based on publicly available data and our own analysis, and we do not guarantee its accuracy or completeness. By no means is this communication sent as the licensed equity analysts or financial advisors and it should not be construed as professional advice or a recommendation to buy or sell any securities or any other kind of asset.
Markdown
NEW \+ \- \- Build Trading Algos, Use AI & Manage Risk \| Live Virtual Class Join Bootcamp x [![Quantra](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)](https://quantra.quantinsti.com/) - ![Search](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/search-icon.cb9e1fde700e33c9.webp)![Search](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/search-icon-green.41728036e5a6f411.webp) ![Search](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)![Search](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) Speak Now ![Mic Blue](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) - [Courses LIVE CLASS![arrow](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)](https://quantra.quantinsti.com/courses?section=courses) ### Premium Courses - [NEWAgentic AI for Trading](https://quantra.quantinsti.com/course/agentic-ai-trading) - [Trading Alphas](https://quantra.quantinsti.com/course/trading-alphas-mining-optimisation-system-design) - [Trading Using LLM](https://quantra.quantinsti.com/course/llm-trading-strategies) - [Systematic Options Trading](https://quantra.quantinsti.com/course/systematic-options-trading) - [Options Volatility Trading](https://quantra.quantinsti.com/course/options-volatility-trading) - [Momentum Trading Strategies](https://quantra.quantinsti.com/course/momentum-trading-strategies) - [Deep Reinforcement Learning](https://quantra.quantinsti.com/course/deep-reinforcement-learning-trading) - [Machine Learning for Options Trading](https://quantra.quantinsti.com/course/machine-learning-options-trading) ### Specializations For - [Beginners](https://quantra.quantinsti.com/learning-track/algorithmic-trading-beginners) - [Quants](https://quantra.quantinsti.com/learning-track/advanced-algorithmic-trading-strategies) - [AI Enthusiasts](https://quantra.quantinsti.com/learning-track/machine-learning-deep-learning-trading-2) - [Futures & Options Traders](https://quantra.quantinsti.com/learning-track/quantitative-trading-futures-options-markets) - [ML Enthusiasts](https://quantra.quantinsti.com/learning-track/machine-learning-deep-learning-trading-1) - [Technical Analysts](https://quantra.quantinsti.com/learning-track/technical-analysis-quantitative-methods) - [Portfolio Managers](https://quantra.quantinsti.com/learning-track/portfolio-management-position-sizing-quantitative-methods) - [Forex & Crypto Traders](https://quantra.quantinsti.com/learning-track/algorithmic-trading-cryptocurrency-forex) ### Most Popular - [AI Trading Bootcamp LIVE CLASS](https://quantra.quantinsti.com/algorithmic-trading-bootcamp) - [All Courses Bundle](https://quantra.quantinsti.com/all-courses-bundle) - [Instructor Led Program](https://www.quantinsti.com/epat) - [Free Learning Track](https://quantra.quantinsti.com/learning-track/guide-quantitative-trading-beginners) - [All Free Courses](https://quantra.quantinsti.com/courses?isPaid=0&section=courses) Browse All Courses - [Live Trading](https://quantra.quantinsti.com/live-trading) - Login - ![Contact Options](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/call-white.2fa56b720b43e9c8.webp) - [![Schedule a Call](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) +91 8450963428](tel:+918450963428) - [![Chat on WhatsApp](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) Chat on WhatsApp](https://wa.me/8450963428) - [![quantra@quantinsti.com](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7) quantra@quantinsti.com](https://quantra.quantinsti.com/glossary/%20mailto:quantra@quantinsti.com) - [![Shopping Cart](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/cart-icon.6d414a033e90c6ec.webp)](https://quantra.quantinsti.com/cart) [![Quantra](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/logo.svg)](https://quantra.quantinsti.com/) ![Search](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/search-icon.cb9e1fde700e33c9.webp) [![Shopping Cart](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/cart.28d4b50d30dc412b.webp)](https://quantra.quantinsti.com/cart) - Learning Tracks ![right-arrow](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/button-arrow-blue.be44909f577d6117.png) - Course Categories ![right-arrow](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/button-arrow-blue.be44909f577d6117.png) - [All Courses Bundle ![right-arrow](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/button-arrow-blue.be44909f577d6117.png)](https://quantra.quantinsti.com/all-courses-bundle) - [Go to Course Catalogue ![right-arrow](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/cart-arrow-right-blue.32ecc9315faa283b.png)](https://quantra.quantinsti.com/courses?section=courses) - Quick Links [Live Trading]() [Dr. Ernest P Chan]() [Free Learning Track]() [EPAT]() [AI Trading Bootcamp LIVE CLASS]() ![Move Left](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/icons/left-arrow.e73e699360e8faab.png) Complete list # Realized Volatility ## Introduction Realized volatility refers to the measure of daily changes in the price of a security over a particular period of time. It assumes the daily mean price to be zero in order to provide movement regardless of direction. It is different from Implied volatility in the sense that realized volatility is the actual change in historical prices, while implied volatility predicts future price volatility. Realized volatility can be calculated by firstly calculating continuously compounded daily returns using the following formula: ![](https://d2a032ejo53cab.cloudfront.net/Glossary/XWeZ5dIY/rv1.png) where, **Ln = natural logarithm** **Pt = Underlying Reference Price (“closing price”) at day t** **Pt–1 = Underlying Reference Price at day immediately preceding day t** Then, by plugging the value of Rt in the formula below: ![](https://d2a032ejo53cab.cloudfront.net/Glossary/vlsKfyI0/rv2.png) where, **Vol = Realized volatility** **252 = approximate number of trading days in a year** **t = a counter representing each trading day** **n = number of trading days in the specific time frame** **Rt = continuously compounded daily returns** All the concepts covered in this post are taken from the Quantra course on **[Options Volatility Strategies: Greeks, GARCH & Python Backtesting](https://quantra.quantinsti.com/course/options-volatility-trading)**. You can preview the concepts taught in this course by clicking on the free preview button. **Note:** The links in this tutorial will be accessible only after logging into [quantra.quantinsti.com](https://quantra.quantinsti.com/) and enrolling for the free preview of the course. [![Start Free Preview](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/Wkz2PGU0/Group-3246.png)](https://quantra.quantinsti.com/startCourseDetails?cid=290&section_no=1&unit_no=1&preview=true&course_type=paid&unit_type=Video) [![View Course](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/rt2enKhG/Group-3244.png)](https://quantra.quantinsti.com/course/options-volatility-trading) *** ## ## Advantages - The realized volatility is the measure of the historical performance of an asset which implies that one comes to know if the asset’s price has been fluctuating a lot or not. Hence, the asset’s volatility is predicted by the historical performance. - The realized volatility also concentrates on the time period and hence you can analyse a particular time period in this manner. - For measuring the implied volatility (future volatility), an analysis of historical performance is always helpful. Hence, realized volatility is the base of implied volatility. *** ## ## Disadvantages The only disadvantage of the realized volatility is that it does not take into account the current price and also does not look into the future volatility, unlike implied volatility. Hence, realized volatility is actually directionless and simply chases the upward and downward trends of the historical data. Let us find out realized volatility with the help of Python. We begin with extracting the data from yahoo finance. We will take Amazon’s data here. ``` # For data manipulation import pandas as pd import numpy as np # To fetch financial data import yfinance as yf # Download the price data of Apple from Jan 2019 to Dec 2019 # Set the ticker as 'AAPL' and specify the start and end dates price_data_AMZN= yf.download('AMZN', start='2020-11-06', end='2023-1-3', auto_adjust = True) price_data_AMZN Output: ``` \[\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*100%\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\] 1 of 1 completed **Output:** | | | | | | | |---|---|---|---|---|---| | | **Open** | **High** | **Low** | **Close** | **Volume** | | **Date** | | | | | | | **2020-11-05** | 165\.998505 | 168\.339996 | 164\.444000 | 166\.100006 | 115786000 | | **2020-11-06** | 165\.231995 | 166\.100006 | 161\.600006 | 165\.568497 | 92946000 | | **2020-11-09** | 161\.551498 | 164\.449997 | 155\.605499 | 157\.186996 | 143808000 | | **2020-11-10** | 154\.751007 | 155\.699997 | 150\.973999 | 151\.751007 | 131820000 | | **2020-11-11** | 153\.089005 | 156\.957504 | 152\.500000 | 156\.869507 | 87338000 | | **...** | ... | ... | ... | ... | ... | | **2022-12-23** | 83\.250000 | 85\.779999 | 82\.930000 | 85\.250000 | 57433700 | | **2022-12-27** | 84\.970001 | 85\.349998 | 83\.000000 | 83\.040001 | 57284000 | | **2022-12-28** | 82\.800003 | 83\.480003 | 81\.690002 | 81\.820000 | 58228600 | | **2022-12-29** | 82\.870003 | 84\.550003 | 82\.550003 | 84\.180000 | 54995900 | | **2022-12-30** | 83\.120003 | 84\.050003 | 82\.470001 | 84\.000000 | 62401200 | 542 rows × 5 columns Now, let us plot the data. ``` import matplotlib.pyplot as plt %matplotlib inline # Compute the logarithmic returns using the Closing price price_data_AMZN['Log_Ret'] = np.log(price_data_AMZN['Close'] / price_data_AMZN['Close'].shift(1)) # Compute Volatility using the pandas rolling standard deviation function price_data_AMZN['Realized Volatility'] = price_data_AMZN['Log_Ret'].rolling(window=252).std() * np.sqrt(252) # Plot the AMZN Price series and the Volatility price_data_AMZN[['Close']].plot(subplots=True, color='blue',figsize=(8, 6)) plt.title('Close price', color='purple', size=15) # Setting axes labels for close prices plot plt.xlabel('Dates', {'color': 'orange', 'fontsize':15}) plt.ylabel('Prices', {'color': 'orange', 'fontsize':15}) price_data_AMZN[['Realized Volatility']].plot(subplots=True, color='blue',figsize=(8, 6)) plt.title('Realized Volatility', color='purple', size=15) # Setting axes labels for realized volatility plot plt.xlabel('Dates', {'color': 'orange', 'fontsize':15}) plt.ylabel('Realized volatility', {'color': 'orange', 'fontsize':15}) # Rotating the values along x-axis to 45 degrees plt.xticks(rotation=45) ``` **Output:** ![](https://d2a032ejo53cab.cloudfront.net/Glossary/ZoouET7N/Screen-Shot-2023-04-24-at-10.46.04-AM.png) The output above shows a steep rise in the realized volatility between November 2021 and January 2023. ## **What to do next?** - Go to [this](https://quantra.quantinsti.com/course/options-volatility-trading) course - Click on '**[Free Preview](https://quantra.quantinsti.com/startCourseDetails?cid=290&section_no=1&unit_no=1&course_type=paid&unit_type=Video)**' - Go through 10-15% of course content - Drop us your comments, queries on [community](https://quantra.quantinsti.com/community) [![Start Free Preview](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/Wkz2PGU0/Group-3246.png)](https://quantra.quantinsti.com/startCourseDetails?cid=290&section_no=1&unit_no=1&preview=true&course_type=paid&unit_type=Video) ### **About the Course Author** ![](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/dIfDJES4/Group-113.png) *** IMPORTANT DISCLAIMER: *This post is for educational purposes only and is not a solicitation or recommendation to buy or sell any securities. Investing in financial markets involves risks and you should seek the advice of a licensed financial advisor before making any investment decisions. Your investment decisions are solely your responsibility. The information provided is based on publicly available data and our own analysis, and we do not guarantee its accuracy or completeness. By no means is this communication sent as the licensed equity analysts or financial advisors and it should not be construed as professional advice or a recommendation to buy or sell any securities or any other kind of asset.* RELATED KEYWORDS - [Dispersion Trading](https://quantra.quantinsti.com/glossary/Dispersion-Trading) - [Implied Volatility](https://quantra.quantinsti.com/glossary/Implied-Volatility) - [Standard Deviation](https://quantra.quantinsti.com/glossary/Standard-Deviation) - [Volatility](https://quantra.quantinsti.com/glossary/Volatility) - [Volatility Arbitrage](https://quantra.quantinsti.com/glossary/Volatility-Arbitrage) - [Volatility Skew](https://quantra.quantinsti.com/glossary/Volatility-Skew) - [Volatility Smile](https://quantra.quantinsti.com/glossary/Volatility-Smile) - [Volatility Surface](https://quantra.quantinsti.com/glossary/Volatility-Surface) - [VWAP](https://quantra.quantinsti.com/glossary/VWAP) - [About Us](https://www.quantinsti.com/about-us) - [QuantInsti](https://www.quantinsti.com/) - [Blueshift](https://blueshift.quantinsti.com/) - [Associates](https://www.quantinsti.com/associates) - [Contact Us](https://www.quantinsti.com/contact-us/#inquiry=quantra) - [Affiliate Program](https://quantinsti.tapfiliate.com/) - [Privacy Policy](https://www.quantinsti.com/privacy-policy/) - [FAQs](https://quantra.quantinsti.com/docs/) - [Courses](https://quantra.quantinsti.com/courses) - [Blog](https://blog.quantinsti.com/) - [For Business](https://quantra.quantinsti.com/corporate) - [Success Stories](https://quantra.quantinsti.com/successful-quants) - [Community](https://quantra.quantinsti.com/community) - [Glossary](https://quantra.quantinsti.com/glossary) - [![X](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/social-icons/X.954552b1a485c079.svg)](https://x.com/quantinsti/) - [![Facebook](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/social-icons/FB.eebd059a1b20a291.svg)](https://www.facebook.com/quantinsti) - [![LinkedIn](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/social-icons/Linkedin.44d73acf4f25701e.svg)](https://www.linkedin.com/school/1229089) - [![Youtube](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/social-icons/YT.3a414f2705f0bdec.svg)](https://www.youtube.com/c/Quantra) - [![Instagram](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/social-icons/IG.224eb7351902f1ac.svg)](https://www.instagram.com/quantinstian/) - [![Github](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/social-icons/Github.3570b93d70878364.svg)](https://github.com/quantinsti) [![Quantinsti](https://d37y0qrjxmff6w.cloudfront.net/production-new/static/images/quantinsti-logo.2c0a345f6f588ab6.png)](https://www.quantinsti.com/) ©2026 QuantInsti® - Quantra® is a trademark property of QuantInsti® #### Our Cookie Policy To give you the best user experience, through analytics, and to show you tailored & most relevant content on our website, we use cookies. Please note that by closing this banner, scrolling this page, clicking a link or continuing to use our site, you consent to our use of cookies. You can read more about our privacy policy [here](https://www.quantinsti.com/privacy-policy/) Accept all cookies
Readable Markdown
## Introduction Realized volatility refers to the measure of daily changes in the price of a security over a particular period of time. It assumes the daily mean price to be zero in order to provide movement regardless of direction. It is different from Implied volatility in the sense that realized volatility is the actual change in historical prices, while implied volatility predicts future price volatility. Realized volatility can be calculated by firstly calculating continuously compounded daily returns using the following formula: ![](https://d2a032ejo53cab.cloudfront.net/Glossary/XWeZ5dIY/rv1.png) where, **Ln = natural logarithm** **Pt = Underlying Reference Price (“closing price”) at day t** **Pt–1 = Underlying Reference Price at day immediately preceding day t** Then, by plugging the value of Rt in the formula below: ![](https://d2a032ejo53cab.cloudfront.net/Glossary/vlsKfyI0/rv2.png) where, **Vol = Realized volatility** **252 = approximate number of trading days in a year** **t = a counter representing each trading day** **n = number of trading days in the specific time frame** **Rt = continuously compounded daily returns** All the concepts covered in this post are taken from the Quantra course on **[Options Volatility Strategies: Greeks, GARCH & Python Backtesting](https://quantra.quantinsti.com/course/options-volatility-trading)**. You can preview the concepts taught in this course by clicking on the free preview button. **Note:** The links in this tutorial will be accessible only after logging into [quantra.quantinsti.com](https://quantra.quantinsti.com/) and enrolling for the free preview of the course. [![Start Free Preview](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/Wkz2PGU0/Group-3246.png)](https://quantra.quantinsti.com/startCourseDetails?cid=290&section_no=1&unit_no=1&preview=true&course_type=paid&unit_type=Video) [![View Course](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/rt2enKhG/Group-3244.png)](https://quantra.quantinsti.com/course/options-volatility-trading) *** ## Advantages - The realized volatility is the measure of the historical performance of an asset which implies that one comes to know if the asset’s price has been fluctuating a lot or not. Hence, the asset’s volatility is predicted by the historical performance. - The realized volatility also concentrates on the time period and hence you can analyse a particular time period in this manner. - For measuring the implied volatility (future volatility), an analysis of historical performance is always helpful. Hence, realized volatility is the base of implied volatility. *** ## Disadvantages The only disadvantage of the realized volatility is that it does not take into account the current price and also does not look into the future volatility, unlike implied volatility. Hence, realized volatility is actually directionless and simply chases the upward and downward trends of the historical data. Let us find out realized volatility with the help of Python. We begin with extracting the data from yahoo finance. We will take Amazon’s data here. ``` # For data manipulation import pandas as pd import numpy as np # To fetch financial data import yfinance as yf # Download the price data of Apple from Jan 2019 to Dec 2019 # Set the ticker as 'AAPL' and specify the start and end dates price_data_AMZN= yf.download('AMZN', start='2020-11-06', end='2023-1-3', auto_adjust = True) price_data_AMZN Output: ``` \[\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*100%\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\] 1 of 1 completed **Output:** | | | | | | | |---|---|---|---|---|---| | | **Open** | **High** | **Low** | **Close** | **Volume** | | **Date** | | | | | | | **2020-11-05** | 165\.998505 | 168\.339996 | 164\.444000 | 166\.100006 | 115786000 | | **2020-11-06** | 165\.231995 | 166\.100006 | 161\.600006 | 165\.568497 | 92946000 | | **2020-11-09** | 161\.551498 | 164\.449997 | 155\.605499 | 157\.186996 | 143808000 | | **2020-11-10** | 154\.751007 | 155\.699997 | 150\.973999 | 151\.751007 | 131820000 | | **2020-11-11** | 153\.089005 | 156\.957504 | 152\.500000 | 156\.869507 | 87338000 | | **...** | ... | ... | ... | ... | ... | | **2022-12-23** | 83\.250000 | 85\.779999 | 82\.930000 | 85\.250000 | 57433700 | | **2022-12-27** | 84\.970001 | 85\.349998 | 83\.000000 | 83\.040001 | 57284000 | | **2022-12-28** | 82\.800003 | 83\.480003 | 81\.690002 | 81\.820000 | 58228600 | | **2022-12-29** | 82\.870003 | 84\.550003 | 82\.550003 | 84\.180000 | 54995900 | | **2022-12-30** | 83\.120003 | 84\.050003 | 82\.470001 | 84\.000000 | 62401200 | 542 rows × 5 columns Now, let us plot the data. ``` import matplotlib.pyplot as plt %matplotlib inline # Compute the logarithmic returns using the Closing price price_data_AMZN['Log_Ret'] = np.log(price_data_AMZN['Close'] / price_data_AMZN['Close'].shift(1)) # Compute Volatility using the pandas rolling standard deviation function price_data_AMZN['Realized Volatility'] = price_data_AMZN['Log_Ret'].rolling(window=252).std() * np.sqrt(252) # Plot the AMZN Price series and the Volatility price_data_AMZN[['Close']].plot(subplots=True, color='blue',figsize=(8, 6)) plt.title('Close price', color='purple', size=15) # Setting axes labels for close prices plot plt.xlabel('Dates', {'color': 'orange', 'fontsize':15}) plt.ylabel('Prices', {'color': 'orange', 'fontsize':15}) price_data_AMZN[['Realized Volatility']].plot(subplots=True, color='blue',figsize=(8, 6)) plt.title('Realized Volatility', color='purple', size=15) # Setting axes labels for realized volatility plot plt.xlabel('Dates', {'color': 'orange', 'fontsize':15}) plt.ylabel('Realized volatility', {'color': 'orange', 'fontsize':15}) # Rotating the values along x-axis to 45 degrees plt.xticks(rotation=45) ``` **Output:** ![](https://d2a032ejo53cab.cloudfront.net/Glossary/ZoouET7N/Screen-Shot-2023-04-24-at-10.46.04-AM.png) The output above shows a steep rise in the realized volatility between November 2021 and January 2023. ## **What to do next?** - Go to [this](https://quantra.quantinsti.com/course/options-volatility-trading) course - Click on '**[Free Preview](https://quantra.quantinsti.com/startCourseDetails?cid=290&section_no=1&unit_no=1&course_type=paid&unit_type=Video)**' - Go through 10-15% of course content - Drop us your comments, queries on [community](https://quantra.quantinsti.com/community) [![Start Free Preview](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/Wkz2PGU0/Group-3246.png)](https://quantra.quantinsti.com/startCourseDetails?cid=290&section_no=1&unit_no=1&preview=true&course_type=paid&unit_type=Video) ### **About the Course Author** ![](https://d2a032ejo53cab.cloudfront.net/Glossary/MediaContent/dIfDJES4/Group-113.png) *** IMPORTANT DISCLAIMER: *This post is for educational purposes only and is not a solicitation or recommendation to buy or sell any securities. Investing in financial markets involves risks and you should seek the advice of a licensed financial advisor before making any investment decisions. Your investment decisions are solely your responsibility. The information provided is based on publicly available data and our own analysis, and we do not guarantee its accuracy or completeness. By no means is this communication sent as the licensed equity analysts or financial advisors and it should not be construed as professional advice or a recommendation to buy or sell any securities or any other kind of asset.*
Shard67 (laksa)
Root Hash8807174087797005267
Unparsed URLcom,quantinsti!quantra,/glossary/Realized-Volatility s443