# How to handle Holidays in Time-Series Datasets?

Im currently analyzing a Dataset of the German Stock market. While Holidays like Christmas or New Year aren't a problem for Return Calculation or Portfolio Performance, im testing some regressions and don't know how to handle these Dates.

I'm regressing the Return of my Portfolio, on the Market Returns of the last ten days. Then im adding the betas up, so i can plot the time varying betas of my sample for every point in time.

the right side of my regression looks like this:

Do these days have to be cancelled? I don't think the guys of the paper im replicating cancelled out each holiday plus the ten days before. However the regression results would be biased if Non-Trading-days are in the sample.

## 2 Answers

Preliminary:

I assume from your previous post, that you are using Thomson Reuters Datastream.

There are several additional parameters available on your Datatypes. Let's for example look at the Datatype MV, which is the market value of a company:

1. If you are using MV, than you obtain a time-series, where the last available value is repeated, if a stock is (a) not traded, (b) is suspended or (c) on exchange holidays. The last value is also repeated up to your requested date, if the company went dead!

2. If you are using MV#S, the description from Datastream states:

The #S qualifier unpads values where the underlying data point is stored as a null value - so displays N/A for null values rather than pad the last real value.

You may use MV#S to set (incorrect and repeated) values on exchange holidays to NA within your request. However, if you are dealing with meanwhile delisted stocks, you may additionally request MV#T to set repeated values after delisting to NA, or manually search on Data item TIME (or Worlscope Item WC07015), which

represents the day on which a company became privately held, merged, liquidated, or otherwise became inactive

and (manually) set values newer than this inactive date to NA.

• Thank you very much ! Since you seem to be familiar with Datastream, are there any other useful tips you can give? I'm currently analyzing momentum trading and i've built a few decile portfolios based on momentum. However, my Data got a lot of outliers that have to be cancelled or manually adjusted. Is "RI" or "RZ" (Datatype) the right way to go or do you recommend any other types? Are there better data sources in general than Datastream ?
– KDMS
Jul 24 '19 at 17:54
• Datastream is a very commonly accepted (non-US) data-source for empirical finance journals. However, there are many flaws in detail, but this is eminent in many data sources. However, i may not recommend free sources like Yahoo for any serious attempt in getting published in top journals - there are many errors in these (free) data sources for financial data. Your use of Datatypes depends on your research question. If i get things done, i will take time to answer your other (yet) open question. Jul 25 '19 at 7:17
• Thanks ! I'm testing the dynamic Momentum strategy from Daniel and Moskowitz for other Markets. Since the acces from my University is very slow, i'm working with data from "ALL-Share" Indices, and the Prima All-Share index for German stocks. Maybe this would be the first Bias in my research, since very small stocks aren't included? I'd love to work with data from emerging markets, but there are limitations in the quality and availability i guess..
– KDMS
Jul 25 '19 at 14:19
• So i basically need the Return-Index (RI or RZ) and the Market value. Your #-specification in your first answer helped me. I've thought there are only the regular datatypes
– KDMS
Jul 25 '19 at 14:21

When you handle data of any type you might have the issue of missing elements.

You can generally handle it by global ommission or by imputation.

Imputation can be feed forward, feed backward, some averaging or interpolation scheme.

One such scheme might be to use your existing data to build a machine learning algorithm that predicts market movements conditioned on other values, as a Bayesian problem.

For example FTSE rallies 100 points, S&P rallies 50 points and your model predicts the DAX rallies X points. You then use X as the imputated value for your data. This approach may strengthen your results otherwise.