Solved – Overlapping time series: is there any better way to visualize them

data transformationdata visualization

I have this time series dataset:

enter image description here

The graph shows trend lines for 7 stock prices. They are very close and overlapping, but you will be able to get an idea that trend lines are layered (i.e. brown on the top and red/orange at the bottom, though far from conspicuous).

Is there any way to better visualize this data? like transforming $y$-axis to another scaling, mapping the whole thing onto cylinder/cone etc.? I tried with moving average, but the improvement is not so good.

NOTE: This is not an ML/DM problem. I am looking for a better/alternative/suitable visualization technique, that's all.

Best Answer

Graphical comparison of time series is in principle straightforward: plot two or more series against time and look at the graph. Your example is one of many showing that it may not be so easy in practice.

This is pitched fairly generally. For stock prices, some of the strategies may not be especially relevant or successful, but they may have value for other kinds of series.

Some solutions, direct or indirect, include

  • Graphical multiples, as already suggested by @Glen_b. Each series could be plotted separately. An extension to the idea of showing a reference series is this: For each series, plot the other series as backdrop in a subdued colour (e.g. a light gray) and then plot the series of interest on top in a more prominent colour.

  • Smoothing the series first. Even if you are also interested in fine structure, smoothing can help establish general patterns of change and thus aid understanding.

  • Looking at differences or ratios. One series of interest, or an average or other reference series, can be used to look at differences, or as appropriate ratios, of series rather than the series themselves. So, for example, plot (this series $-$ IBM) or (this series / IBM). If using ratios, then consider logarithmic scale too. (Ratios depend on all values being positive, or at least having the same sign, to work.)

  • Changing the aspect ratio. Erratic series with numerous changes of direction are often best plotted with an aspect ratio yielding short, long graphs, which you may need to split into different sections. The ideal is that typical segments are at about $45^\circ$. (That is a counsel of perfection for very long series.)

  • Sampling. Do you need every value? Would plotting every $k$th value be as informative visually? In some cases, sampling should include local maxima and minima to show important details. The principle here is that short-term changes are often noise and lacking in interest or intelligibility.