Announcement

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

  • Calculate bipower variation of daily stock returns

    Hey there,

    I have calculated daily excess stock returns over 16 years and I want to calculate the realized bipolar variation of these excess returns like in the paper of Chung&Seo.

    The formula is found on page 8 of the paper (equal to the paper from 2017 in the International Review of Economics and Finance but working paper is freely available):

    ๐œŽ(๐‘ก๐‘–)^2 โ‰ก 1/ /(21โˆ’2) โˆ‘๐‘—=3 |๐‘Ÿ๐‘ก ||๐‘Ÿ๐‘กโˆ’1|.

    I am not sure how to do that. Probably with the rolling command or so?

    Do you have an idea on the code I can use (the rt and rt-1 are simply the daily excess returns in my Stata database).

    Regards,
    Michael

    This study investigates firmsโ€™ capital structure decisions around significant drops in stock price. We present evidence that firms usually repurchase equity to

  • #2
    I may need to provide more information in order to get any help on this issue I guess?

    Comment


    • #3
      Michael,

      I'm not sure what the bipolar variation is, but you will probably use Stata's built-in rolling command, or something like asreg or asrol (both from SSC) written by Attaullah Shah

      You might also take a look at this post here

      It would also be helpful if you posted a small sample of your data using Stata's dataex command.

      Comment


      • #4
        Hi David, sorry for answering so late. I needed to check some issues with the requirements but I applied the asrol command using

        bysort ID_S: asrol excessreturn, window (Date 21) stat (sd) gen(std_bipower)

        which I guess calculates a daily rolling 21day window standard deviation per stock across the dates (not sure about the correct formula I posted on January 14th). I am not sure if it is working. I have 1.600 stocks and daily data for about 15 years and it is now 2 hours that Stata is calculating on my MacBook from 2013.

        I am not sure if something is wrong or if it is normal that it takes so long. I am using Stata SE 15.1.

        Comment

        Working...
        X