-
-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TTR::volatility seems wrong in the default case #13
Comments
Thanks for the report. I certainly agree that the standard calculation with I used this site when coding these volatility functions. |
Hmm, looks like the site has the equation in this manner, since N is the number of CLOSING observations. For N closes, we have N-1 returns and so on. I guess that's one approach, but is it consistent for the other estimators (i.e. Yang-Zhang)? There I think we take N returns (or ratios). |
see ?var which says: "The denominator n - 1 is used which gives an unbiased estimator of Obviously, this applies to volatility as well as variance. On 04/27/2015 10:41 PM, Ivan Popivanov wrote:
Brian G. Peterson |
runSD(r, n-1)
- why do we compute the SD usingn-1
bars? runSD already computes the SD of the mean (the default for the "sample" parameter isTRUE
). I suspect that the formula in themean0=TRUE
case has similar issue - then-2
looks suspicious.The text was updated successfully, but these errors were encountered: