Monday, August 5, 2019

Contradictory stories

Let's suppose that you ask a random 1 in 100 people in your city what they feel about, I dunno, elephants.  Now let's suppose you ask a new random sample a month later what they think about elephants.  You'll get a different answer, even if the opinions of the underlying population haven't changed at all.  This is random fluctuation.   It has nothing to do with fluctuations in the underlying reality.  It's an artifact of the estimation process.

There are ways of reducing the influence of random variations.  First, you can fit some kind of moving average.  The assumption is that the random error each month is independent of the error for the next or the previous month.  Therefore it should, over time, average out to zero.  In principle, therefore, to minimise the random error, you should take a longer moving average.  But that would also hide the variability of the underlying data too, which would mean you might miss turning points until it long after they've happened.

The second way is a variant of fitting a moving average.  It's called extreme adjustment.  What this does is to fit a moving average, then estimate the error term, i.e., the deviation between the moving average and the original data.  Any observation where the error term is larger than 2 standard deviations away from zero is replaced with a value closer to the assumed underlying time series, i.e., the moving average.  Other observations are however left unchanged.  This works well for smooth time series with occasional large fluctuations, but "spiky" time series have such large "error terms" (random fluctuations) that larger fluctuations are simply assumed to be normal.

The third way is to use time series with different sample universes.  For example, you can get a very good idea of the performance of the US economy by adding together the volume of retail sales, the volume of industrial production, and total non-agricultural employment.  The assumption here is the error terms of each time series are not correlated with each other, which means that their average will be closer to zero.  We will have a better insight into the underlying economic movements from their average than from each series on its own.

Here's an excellent example of random fluctuations apparently producing quite different stories about what is actually happening.  It comes from two headlines on the same news page of TradingEconomics.com.

  • The Commonwealth Bank of Australia Services PMI was revised higher to 52.3 in July 2019 from a preliminary estimate of 51.9 and compared to the previous month's final figure of 52.6. Output and new orders rose at a slower pace, despite a solid increase in new export business. 

  • The AIG Australian Performance of Services Index plunged 8.3 points from the previous month to 43.9 in July 2019, pointing to the steepest month of contraction in the service sector since November 2014. All five activity indexes in the Australian PSI were negative in July: sales (-8.0 points to 45.1); employment (-3.8 points to 43.8); new orders (-12.7 points to 44.1); supplier deliveries (-12.3 points to 40.5); and finished stocks (-3.4 points to 46.2). 

Which is the better guide to what's happening?  How can we tell, since we don't know the underlying reality—we can only infer it from the data?  We should prolly use both.  So let's add them together and see what we get.  The chart below shows the AIG services PMI vs the Commonwealth Bank services PMI together with an average of those two, and a 3 month by 9 month moving average of the average.  You still with me?



The CBA survey is the smoother of the two (presumably because of a larger sample size).  But it doesn't go back as far as the AIG survey.  Note that there's a good relationship between the CBA and AIG surveys, with the AIG survey much more volatile ("spiky")  than the CBA one, though turning points are not identical.  Perhaps this is because of overlapping sample spaces, since some survey correspondents may be in both surveys.  Note that the average of the two is less "spiky" than the AIG's alone.  The moving average of the average of the two surveys says that there is a slow upturn taking place, despite the falls in July in both series.  It's probably our best guide to what is actually happening.  Except ....  a different moving average might give a different result (see appendix below)

I use all these methods to try and divine what's happening in economies.  Composite and diffusion indices or even just simple averages using many time series as components will more truly reflect the underlying reality than a single series.  Extreme adjustment or  moving averages make it easier to see trends.  But the lesson is also not to just look at the latest observation.  It doesn't matter if July's value is down if June's value is up by a larger amount, and vice versa.  The media often just tell you the latest data release, when what you need to know is the trend over recent months or years.  Statistics can be very misleading if you don't know their context.


APPENDIX: CENTRED VS TRAILING MOVING AVERAGES

The simplest kind of moving average is just the sum of the last N periods divided by N.  (There are more complex moving averages which use a pattern of weights which resemble a quadratic or quartic, but we won't go there today!)  Such a moving average lags the putative turning point by half the span of N.  This is useful for technical analysis in markets, where we might use, say, a 30-day moving average and a 120-day moving average and compare the two.  But for economic time series we want to see clearly when we have entered or exited a recession or a boom.   For that we use a centred moving average.  This is particularly important if we are using moving averages of different lengths (spans) because the underlying time series have different levels of "spikiness".  We might perhaps wish to compare an unsmoothed series with one to which we have fitted a moving average.

With a 9-term moving average, for example, we shift it backwards by 4 months to centre it.   You can see the effect of that in the chart below, which shows the US ISM index and two 9 month moving averages, one trailing and one centred.  Now, note that at the end of the centred moving average, we have "lost" observations.  One way of filling these gaps is to estimate the most recent moving average values using  shorter moving averages.  For example to pad a 9-term centred moving average we could use a 7-term moving average for the 4th observation from the end, 5-term for the 3rd, 3-term for the second, and the actual data point for the last observation.  But for technical reasons this proves unsatisfactory.  Instead we use a pattern of weights.  For example, the most recent value for a 9-term centred moving average is  35% times the last observation, 25% the second last, 21.2% the third last, 15.4% the 4th last, 9.6% the fifth last, 3.8%% the sixth last, 0% for the seventh last, 0% for the eighth last and 0% for the ninth last.  The second most recent value uses a different set of weights, and so on.  This produces an approximation of the 9-term moving average as if we had an additional 4 data points.  However, it is subject to revision: as a new data point becomes available, the moving average weights shift.   







No comments:

Post a Comment