Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need help, calculating volatility

    Hi,

    I'm trying to calculate volatility. I have a not so straightforward dataset and I'm looking for 'rolling' volatility. My dataset has 2 columns one with the hourID (so 60 times the number 1 underneath each other, than 60 times number 2, etc) and next to that I have a column with a price this price is the same as every same number:
    column 1 column 2
    1 505
    1 505
    1 505
    etc
    2 750
    2 750
    etc

    I need the volatility (rolling) of the price from the last 24 hours (use one value of column 2 than skip 59 and than use antother etc). So I need to know the volatility of 24 numbers (of the price at each hourID) each calculation.

    Thank you in advance

  • #2
    Please follow https://www.statalist.org/forums/for...ing-volatility if interested.

    Bas: Please find advice on

    * bumping at https://www.statalist.org/forums/help#adviceextras #1 with a suggestion to improve a question, not just repost it

    * why no-one answered at https://www.statalist.org/forums/help#noanswer

    * how to post data at https://www.statalist.org/forums/help#stata

    Comment


    • #3
      Thank you Nick!

      Comment

      Working...
      X