Announcement

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

  • Differencing data leaves gaps in results

    Hi guys,

    I'm working with daily data and after differencing the data, I get a data set with missing values every 5th value.

    I had daily stock price data and my code was:

    gen Yt = d.Close_Price

    Any guidance would be appreciated.
    Last edited by Faarez Gamieldien; 07 Jun 2021, 03:27. Reason: Edit: adding tags to the post

  • #2
    Presumably you have data only for weekdays (also also gaps for public holdays). So, for Mondays Stata can't find data for Sundays.

    The usual solution is to set up a business calendar.


    Code:
    help bcal

    Comment

    Working...
    X