• With 60 data observations, how do I construct a time series analysis properly?
  • How to do Certain Calculations such as covariances on data with Gaps and Inconsistencies?

Background of Question

  • I'm currently setting out on doing an assignment for a portfolio theory class

Dataset Characteristics

  • 15 stocks with their price-adjusted monthly returns from 1986-2016 (roughly 400 monthly observations) listed on the ISEQ (Irish Stock Exchange)

What I think are Data Issues

Allocated stocks do not have like-for-like observations - stocks listed at different times have different numbers of observations for each stock. ( Non-uniform time series)

Only have 60 observations where all stocks have data from the same time period/across the panel.(Do you mean columns? do you mean same dates?)

( Insert screenshot of data points)

  • One stock in particular only has 60 observations and is extremely 'blocky' in its returns characteristics.

    ( ( Insert screenshot of data point)

Data may cause me problems when I:

Calculate covariances

  • should I use the full array (~400 of observations) of my oldest stock (for variance calculations) against the 60 observations of this problematic stock when calculating the variance co-variance matrix?

Compare like with like and cut my observations across my portfolio to 60 observations

  • Am I sacrificing descriptive power in my outputs if I do this?

My humblest thanks and best wishes, CM.

  • 1
    $\begingroup$ Can you share the dataset? $\endgroup$
    – rbm
    Apr 5, 2017 at 19:27
  • 2
    $\begingroup$ This is common. You will have to adjust your analysis as it moves forward through your observation period. You only had 15 stocks to analyze for the last 5 years, before that it was 14. There is nothing you can do about data that didn't exist before a certain point in time. If you are insistent upon using all 15 stocks then you are stuck with just 60 months. $\endgroup$
    – amdopt
    Apr 5, 2017 at 19:35
  • 1
    $\begingroup$ @amdopt You are mistaken. What would quants do when there is an IPO? Throw out all historical data except the past day? There is a whole category of statistics for handling missing data. Now, that may be beyond the scope of the class and he could probably just use 60 months and get an A. But in practice, it must be handled. $\endgroup$
    – John
    Apr 6, 2017 at 13:52
  • 1
    $\begingroup$ @amdopt There are techniques that go beyond just filling in a data point here and there. Perhaps one of the simplest is Stambaugh 1997 nber.org/papers/w5918 $\endgroup$
    – John
    Apr 6, 2017 at 15:38
  • 2
    $\begingroup$ @CormacMurphy I'm not going to look at your data. $\endgroup$
    – John
    Apr 9, 2017 at 23:27

4 Answers 4


Your question shows that you are beginner in time series analysis. Welcome!

Long Answer to your question

A common approach to analyzing unevenly spaced time series is to transform the data into equally spaced observations using some form of interpolation - most often linear - and then to apply existing methods for equally spaced data. However, transforming data in such a way can introduce a number of significant and hard to quantify biases especially if the spacing of observations is highly irregular.

Short Answer

It depends

Where you will find your answers to all of your questions

First start here:

Chapter 10 Introduction to Time Series Analysis Introduction to Time Series Analysis. Lecture 1

Then read these papers as well as what others have shared

Please make sure you understand what you are asking otherwise others will not be so nice.

  • This means googleing and putting in some effort.Effort is not easy, but part of struggle is important and called 'learning.'
  • We are here to help you when you show us your struggles, so that we can help you with little to no effort =)

Do not be discouraged, ask questions, but make sure you google first.

Welcome to QuantFinance Stack Exchange!


For your assignment, use only the returns that you have available, even if they are not complete for entire period. You will be able to run all your analysis.

Notice that This is not a good solution in real world cases, if you want to use your covariance/correlation matrix for optimization or monte carlo simulation as using pairwise correlations may lead to non positive semi-defined matrices.

  • $\begingroup$ Why "This is not a good solution in real world cases" $\endgroup$ May 6, 2017 at 16:15

Something fairly standard to do is to work with the returns of portfolios constructed on individual firm characteristics rather than the firms themselves. Some basic problems working directly with firms:

  • As you discussed, firms come and go from the sample.
  • As several have mentioned in the comments, firms can significantly change. Apple in 2005 was a computer hardware company. In 2015, Apple was a mobile phone company, its revenues dominated by iPhone. Shouldn't we expect the covariance properties to be significantly different!?
  • If you only use firms where you have data for all years, you are conditioning inclusion in your sample on not delisting, and you may render your estimate of expected returns upwards biased and inconsistent!
    • If someone wrote, "My sample is constructed of all firms which did not go bankrupt or get acquired" or "My sample is constructed of all firms which eventually made it into the S&P500," do you think those firms had above average returns? Of course they did!
    • In general in finance, you can make huge mistakes by using $t+1$ information at time $t$.

If we're willing to do simple, 1980s style finance, a sensible method is to construct yearly rebalanced portfolios based upon firm characteristics known at the time (or several months previously to be safe). The idea is that the portfolio returns will be more stable over time in terms of their statistical properties than individual companies.

As @Alex27629 mentions, you probably can do most of your analysis using only data you have for each company. I'd expect you get defensible results for the purposes of your project.

  1. It is unclear what the 'portfolio assignment' is and what kind of results you are expected to deliver.

  2. 60 points of data points (monthly) when it comes to stock returns is more than enough; whereas conclusions based 20 years of data do not seem reliable as a company in its first 5 years of existence will be completely different than the same company 15 years later - given the company still exists.

  • 1
    $\begingroup$ Your 60 monthly data points argument feels more like a heuristic that the industry has adopted, rather than an argument based on any kind of theory or rigorous evaluation. It's probably sufficient to give the OP an A, but I'm not sure it should be the recommended approach for practitioners. $\endgroup$
    – John
    Apr 6, 2017 at 14:03
  • 1
    $\begingroup$ I think your answer would be better if the first part was a comment. $\endgroup$
    – Bob Jansen
    Apr 6, 2017 at 15:22
  • $\begingroup$ @cykor21 My assignment comprises of using the data to compute an alpha and beta for each stock, standard residuals from each regression, correlation coefficient, covariance between each possible pair using the single index model (SIM) , compute, compare/contrast mean return, variance and covariance for each stock using SIM and historical data. This is pretty easy for me to do if I had a complete sample of observations across each stock between 1984 and 2016. $\endgroup$ Apr 9, 2017 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.