YANG-ZHANG extension of the GARMAN-KLASS volatility

Category: Indicators By: gabri Created: May 18, 2017, 10:09 AM
May 18, 2017, 10:09 AM
Indicators
1 Comment

The Yang Zhang extension of the Garman-Klass volatility is considered to be the second most precise method to evaluate ex-ante volatility. For all the people using Time Series Momentum (TSMOM) or Dual Momentum strategies, this volatility indicator is the main system to size positions.

Blue skies

//YANG-ZHANG extention of the GARMAN-KLASS volatility
p=22
corr=sqrt(p/(p-1))

gkyzoc=log(open/close[1])*log(open/close[1])
gkyzhl=0.5*log(high/low)*log(high/low)
gkyzco=(2*log(2)-1)*log(close/open)*log(close/open)

gkyz=sqrt(summation[p](gkyzoc+gkyzhl-gkyzco))*sqrt(256/p)

gkyzvolatility=gkyz*corr

return gkyzvolatility as "Garman-Klass Yang-Zhang"

Download
Filename: gkyz-vol.itf
Downloads: 92
gabri Master
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Logo Logo
Loading...