Entering text into the input field will update the search result below

Garman-Klass-Yang-Zhang Historical Volatility Calculation – Volatility Analysis In Python

Jul. 15, 2020 10:46 AM ETSPDR® S&P 500 ETF Trust (SPY)
rvarb profile picture
rvarb's Blog
Please Note: Blog posts are not selected, edited or screened by Seeking Alpha editors.

Seeking Alpha Analyst Since 2013

Trader and blogger at


In the previous post, we introduced the Garman-Klass volatility estimator that takes into account the high, low, open, and closing prices of a stock. In this installment, we present an extension of the Garman-Klass volatility estimator that also takes into consideration overnight jumps.

Garman-Klass-Yang-Zhang (GKYZ) volatility estimator consists of using the returns of open, high, low, and closing prices in its calculation. It also uses the previous day’s closing price. It is calculated as follows,

Volatility trading strategy Garman-Klass-Yang-Zhang estimator

where hi denotes the daily high price, li is the daily low price, ci is the daily closing price and oi is the daily opening price of the stock at day i.

We implemented the above equation in Python. We downloaded SPY data from Yahoo finance and calculated the GKYZ historical volatility using the Python program. The picture below shows the GKYZ historical volatility of SPY from March 2015 to March 2020.

Garman-Klass-Yang-Zhang Historical Volatility Trading Strategy

We note that the GKYZ volatility estimator takes into account overnight jumps but not the trend, i.e. it assumes that the underlying asset follows a GBM process with zero drift. Therefore the GKYZ volatility estimator tends to overestimate the volatility when the drift is different from zero. However, for a GBM process, this estimator is eight times more efficient than the close-to-close volatility estimator.

Follow the link below to download the Python program.

Article Source Here: Garman-Klass-Yang-Zhang Historical Volatility Calculation – Volatility Analysis in Python

Analyst's Disclosure: I/we have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours.

Seeking Alpha's Disclosure: Past performance is no guarantee of future results. No recommendation or advice is being given as to whether any investment is suitable for a particular investor. Any views or opinions expressed above may not reflect those of Seeking Alpha as a whole. Seeking Alpha is not a licensed securities dealer, broker or US investment adviser or investment bank. Our analysts are third party authors that include both professional investors and individual investors who may not be licensed or certified by any institute or regulatory body.

Recommended For You

To ensure this doesn’t happen in the future, please enable Javascript and cookies in your browser.
Is this happening to you frequently? Please report it on our feedback forum.
If you have an ad-blocker enabled you may be blocked from proceeding. Please disable your ad-blocker and refresh.