Back

Yang Zhang Volatility

Hi,

Here is an implementation of the Yang-Zhang volatility estimator. You can find the original derivation of the formula here: http://www.atmif.com/papers/range.pdf. The estimator is very effective to estimate the volatility based on bar data as it takes into account the close to open gap. The estimator has the advantage of being "unbiased in the continuous limit, (b) independent of the drift, (c) consistent in dealing with opening price jumps. Furthermore, it has the smallest variance among all estimators with similar properties. The improvement
of accuracy over the classical close-to-close estimator is dramatic for real-life time series" (YZ, 2000).

Some authors have show that, in the case of inverse volatility weighting of the position, using the YZ estimator for position sizing results in bigger profits because the turnover is reduced. If you compare the YZ volatility to the standard volatility estimator you will see that the YZ has less variation.

Hope it will be useful to some of you!

Best,

L
Update Backtest








Super impressive L! If you're open please submit it as pull request and we'll integrate it into LEAN! We just need an external data source to validate the indicator.
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Thanks Jared. I would be happy to contribute but I don't really know how to proceed. For the external source data, is it acceptable to compute the value with R (using the TTR library where YZ is implemented) and use that for the validation?
0

Yes the Matlab implementation is fine!
The other indicators are located here, and the tests for indicators are here for an example! :) We also created a contributor guideto help people figure out github.
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Note that it is only valid with the settings in the paper for daily bars.
1

Hi Jared,

>Yes the Matlab implementation is fine!

I can't see how to access the Matlab implementation. Any assistance appreciated, please?

Thank you in advance, 

Brad

0

Brad Stiritz, Jared is saying that someone can use a Matlab implementation of an indicator to generate output that can be compared against the indicator implementation in Lean.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed