GithubHelp home page GithubHelp logo

Comments (3)

joshuaulrich avatar joshuaulrich commented on June 15, 2024

Thanks for the report. I certainly agree that the standard calculation with n-1 observations looks odd... and the mean0 calculation was based on that, which is probably why the n-2 is there (subtract one more observation).

I used this site when coding these volatility functions.

from ttr.

ivannp avatar ivannp commented on June 15, 2024

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).

from ttr.

braverock avatar braverock commented on June 15, 2024

see

?var

which says:

"The denominator n - 1 is used which gives an unbiased estimator of
the (co)variance for i.i.d. observations."

Obviously, this applies to volatility as well as variance.

On 04/27/2015 10:41 PM, Ivan Popivanov wrote:

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).


Reply to this email directly or view it on GitHub
#13 (comment).

Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock

from ttr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.