Member-only story
Yang-Zhang as an Accurate Volatility Estimator
How to Code Yang-Zhang Volatility For Time Series Analysis
The Yang-Zhang volatility estimator is a measure of historical volatility that combines the advantages of both the Rogers-Satchell and Garman-Klass estimators (previously discussed in earlier articles). It is particularly useful for assets with high opening jumps or overnight gaps. This estimator is designed to reduce the bias and error present in simpler volatility estimators.
This article presents this volatility measure in detail and shows how to code a rolling calculation on time series using Python.
Understanding Yang-Zhang Volatility
Before discussing complex volatility models, it is always recommended to have a thorough understanding of the most basic volatility model (or calculation), that is the historical standard deviation. The standard deviation using the historical method is a common way to measure the volatility of a financial instrument based on past price data.
It quantifies the amount of variation or dispersion of a set of values. In finance, it typically measures the dispersion of daily returns around their mean. Follow these steps to calculate the standard deviation:
- Calculate the returns using either…