Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose there are two time series that I want to analyze and compare. However, many, or most, of the data are zeroes for some reason. For example, consider a pair of intraday trading returns time series. In most days, the trading strategies don't trade at all, so most of the returns are zeroes.

How can I understand their correlation? I suppose I can just keep all the zeroes, and use the raw data to calculate the correlation. Any other thoughts?

If I want to identify the time period when the returns are different substantially, I must think about the zeroes carefully. For example, time period A gives 0.2% in each of 20 days out of 100 days, but time period B gives 0.1% in 40 days out of 100 days. How do I compare and determine them?

share|improve this question
Usually the choice of when not to trade is also part of a strategy, so zeros are also meaningful imho and should not be discounted for. Or is the choice of whether to trade or not exhogenous? I would also suggest looking at the literature on performance attribution to better frame your problem. – Quartz Jul 9 '13 at 9:38
Would you rate the output of a regression or correlation study between time series A(0.5%, NA, NA, -0.3%, NA, 0.1%, NA, 1%, NA, NA) and time series B(1%, 0.5%, NA, -1.2%, NA, NA, 0.5%, 0.4%, -0.2%, -0.1%) more highly than the outcome if you aggregated into weekly bins (NA = no trading that day, numerically = 0%)? I highly doubt it. You basically assume a perfect correlation between TS A and TS B on days where both strategies did not generate any returns, which completely falsifies your statistical results. Thats all I like to add to this topic. – Matt Wolf Jul 10 '13 at 0:39

This depends on the nature of the zero returns. As Quartz has pointed out, if the zero returns are endogenous, then you should take the zeros into consideration as they are part of the strategy behavior - there is nothing wrong with regressing the two series in that case.

Finally, it is always a very bad idea to aggregate the time series simply to avoid the problem as you're artificially inflating your Sharpe ratio.

share|improve this answer

The answer largely depends on what are the timeseries and what kind of analysis you are going to do. Also you should clearly understand the limitations of correlation for time series.

In your 2 trading strategies returns example, I would try to:

  1. Use a third time series to compare correlations of trades returns against it. For example, if both strategy are trading the same asset, you can take this asset's return time series.

  2. Use rolling window and aggregate trading strategies return values inside that window.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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