Back to Browse

Python for Finance: Historical Volatility & Risk-Return Ratios

16.5K views
May 11, 2021
21:50

Today explore historical volatility in python and a method to estimate volatility using the log returns distribution sample variance. We then visualise the historical volatility in terms of the log returns distributions as well as considering a rolling window to plot volatility over time. In the financial industry, useful measures for decision making are inclusive of both expected returns and volatility. Here we explain and calculate the following risk-return metrics over a rolling time horizon: Sharpe Ratio, Sortino Ratio, M2 Ratio, Max Drawdowns and the Calmar Ratio. 00:00 Intro 01:18 Historical Volatility 07:06 Rolling Window Historical Volatility 08:40 Sharpe Ratio 10:56 Sortino Ratio 13:42 M2 Ratio 16:45 Max Drawdowns 19:50 Calmar Ratio As a high-level programming language, Python is a great tool for financial data analysis, with quick implementation and well documented API data sources, statistical modules and other frameworks related to the financial industry. We will be using Jupyter Lab as an interactive web browser editor for this series due to ease of use and presenting code in a live notebook is ideal for this tutorial series. This is the fourth video of many on the topic of Python for Finance. The series will include general techniques used for financial analysis and act as an introduction for more in-depth tutorials that we may explore later (such as time series modelling, building financial dashboards, machine learning ect.). ★ ★ Code Available on GitHub ★ ★ GitHub: https://github.com/TheQuantPy Specific Tutorial Link: https://github.com/TheQuantPy/youtube-tutorials/blob/8e64e19629cee840928b51baf4660e5c777e87e7/2021/002%20Apr-Jun/2021-05-11%20Python%20for%20Finance_%20Historical%20Volatility%20_%20Risk-Return%20Ratios.ipynb ★ A data driven path to getting a job in Quant Finance https://www.quantpykit.com/ ★ QuantPy GitHub Collection of resources used on QuantPy YouTube channel. https://github.com/thequantpy 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.

Download

1 formats

Video Formats

360pmp455.1 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Python for Finance: Historical Volatility & Risk-Return Ratios | NatokHD