joshuaulrich / TTR

Technical analysis and other functions to construct technical trading rules with R
GNU General Public License v2.0
326 stars 102 forks source link

External reference implementation for volatility() ? #58

Closed Brad-Stiritz closed 6 years ago

Brad-Stiritz commented 6 years ago

Hi Joshua,

Thank you very much for providing this set of tools. I found your project while doing research on the various estimators of volatility. I am working in Matlab, but would like to be able to use your volatility() function as a reference standard.

I appreciate your documentation of all source equations that you coded to. May I ask please, did you have any external reference implementations for volatility, to which you validated your R output?

This is an important question for me, as the Matlab implementation that I found online does not validate against TTR. volatility, for the Yang-Zhang estimator. A colleague of mine investigated the discrepancy, using your code and documentation as his reference standard. He found and corrected a few errors in the Matlab code, which now matches TTR.volatility output.

Any comments appreciated, please. Thanks, Brad

joshuaulrich commented 6 years ago

Hi Brad,

I don't remember if I had an external reference. I have the original papers, and the links in the documentation. If I were doing it again now, I would compare against results from projects like ta-lib, QuantLib, zipline, and other similar projects.

The CHANGES file shows quite a few different people have identified issues in the volatility calculations in the past. (Which is one major reason I like open source software: lots of eyes on the code and results).

I'm closing this issue, since it does not contain anything actionable for the project.