In "Volatility Trading" Euan Sinclair defines Yang-Zhang volatility estimator as
$$ \sigma = \sqrt{\sigma^2_o + k\sigma^2_c + (1-k)\sigma^2_{rs}} $$
where $$ \sigma^2_o \propto Variance\left(ln\left(\frac{o_i}{o_{i-1}}\right)\right) $$ $$ \sigma^2_c \propto Variance\left(ln\left(\frac{c_i}{c_{i-1}}\right)\right) $$ $$ \sigma^2_{rs} = \frac{1}{N} \sum_{i=1}^N \left( \left(ln \frac{h_i}{c_i}\right) \left(ln \frac{h_i}{o_i}\right) + \left(ln \frac{l_i}{c_i}\right) \left(ln \frac{l_i}{o_i}\right) \right) $$
/* I'm using $\propto$ symbol as "proportional to" to avoid unbiasing the $Variance$ via multiplying $Variance$ by $\frac{N}{N-1}$. See the actual formulas on the screenshot below in the References. */
However, TTR package 1 uses different formulas for $\sigma_o^2$, $\sigma_c^2$:
$$ \sigma^2_o \propto Variance\left(ln\left(\frac{o_i}{c_{i-1}}\right)\right) $$ $$ \sigma^2_c \propto Variance\left(ln\left(\frac{c_i}{o_{i}}\right)\right) $$
I plotted Garman-Klass, Parkinson, Yang-Zhang (TTR and Sinclair's) estimators on a chart:
It shows how Sinclair's Yang-Zhang definition systematically deviates (and overestimates?) the volatility compared to the rest of the estimators.
Question
Does Sinclair's formula have a typo?
References
- TTR volatility documentation
- Yang-Zhang volatility estimator from Sinclair's book: screenshot