1

I want to run a time series regression over data is not spaced out in regular time intervals and where in some time periods there are multiple observations. Such in the picture below.

enter image description here

Is this possible and are there any models that are appropriate for this with out having to alter the data?

Ferdi
  • 5,179
  • With the irregular spaces I would not consider it changing the data to interpolate the missing dates with zeroes. Any time series method is going to require that. Regression will not necessarily require evenly spaced data. You could use the data as-is with a linear regression. What are you measuring, and what's your goal (are you trying to predict the future or understand the relationship b/w variables explaining the past)? Answer these questions and we can give suggestions. – Chris Umphlett Sep 06 '18 at 13:29
  • The score is a sentiment analysis score which analyses news headlines. I want to see if the sentiment of headlines have a predictive impact on stock prices. I would like to be able to control for a range of other variables too. – user9903833 Sep 06 '18 at 15:26
  • And what does one observation mean? why are there more one score sometimes, and zero other times? – Chris Umphlett Sep 06 '18 at 15:29
  • I could average the sentiment scores of multiple news articles and perhaps create a variable which counts how many articles there were that day. This is why ideally I would prefer not to average over stories because it will lose a lot of the variation in the stories. – user9903833 Sep 06 '18 at 15:52
  • To clarify I think that I would want a model something like this

    $ P _ { t } = \alpha + P _ { t -1 } + \beta X _ { t - 1 } + \varepsilon _ { t } $ where $ P _ { t } $ is the share price and $ \beta X _ { t - 1 }$ is a range of controls including the news sentiment scores

    – user9903833 Sep 06 '18 at 16:05
  • you could build that model with the data as-is. That's not a time-series model so that data does not need to be equally spaced. You are choosing to ignore the days that have no analysis score. It is a separate issue as to whether or not you should ignore them, it would depend at least on why you don't have a score (there are truly no articles that meet some criteria, or it's missing data). – Chris Umphlett Sep 06 '18 at 17:10

0 Answers0