One reads a lot of hand wringing these days about current valuations entering bubble proportions. It's getting hard to swing a dead cat without hitting an analyst convinced that the market is headed south soon. Just this morning the TheStreet warned:

The Stock Market May Be Poised for a Replay of the 1987 Crash

While it is certainly true that corrections are to be expected as the market climbs its wall of worry, to get an analytic picture of current market conditions I find it helpful to examine the broad market with respect to its historic mean-trend. Seeing how far removed from that trend the indexes currently stand can give a clue about what to expect when the market reverts to (and perhaps overshoots) the average and when such a reversion-to-the-mean might occur.

The figure below plots the S&P 500 index since 1950 along with the mathematical curve that best describes^{1} the index over this period.

*Figure 1-The S&P 500 with best-fit (least square error) geometric function*

The best-fit curve and the index itself exhibit geometric growth, a visual highlight of the power of compounding that Einstein called the eighth wonder of the world. Given the steepness of the curve one can be forgiven for wondering if the truism credited to the economist Herbert Stein applies. Namely, "If something cannot go on forever, it won't". But such plots present a distorted picture of market conditions because they give equal weight to the absolute movement rather than to the percentage movement investors are concerned with. A 10% move in 1960 when the index was at 44 was a mere 4 points which would barely register at today's level.

A more accurate perspective is gained if the same data is plotted on a *logarithmic* scale which has the useful property that equal percentages are allocated equal space on the vertical axis.

*Figure 2-Same data as figure 1 plotted on a logarithmic scale*

Viewed on a log scale, the exponential rise becomes linear (the slope of the line represents the market's average rate-of-return) and the movement of the index looks much more benign. Notice that current the index is very close to the line which means it is not far removed from expectations.

The difference between the index and the best-fit line (called the model "residual") of figure 2 provides an oscillator that can be used to assess the current market condition. Zero represents the index value that lies directly on the best-fit line.

*Figure 3-Best fit residual*

Historically, it can be seen from the graph that values above 0.25 indicate a cautionary zone. Only the bear market of the late seventies started from a value lower than this but only after falling from the cautionary zone earlier in the decade. Conversely, a reading below -0.5 historically has provided an optimal long-term entry point for equities.

Zooming in on the current secular bull market, we see that the index is mid-range the channel defining the trading range since 2009.

*Figure 4-Zoom of the residual of figure 3*

### Momentum is Waning

Using a digital signal processing techniques (my day job is a DSP engineer) applied to the data of figure 3 we can separate the signal from the noise. The figure below plots the first-difference of the Gaussian-smoothed log-index (in gold) of figure 4 along with the unsmoothed log-index itself, both re-scaled to arbitrary units to allow visual alignment. Technical details aside, note the gold-line crossing the mid-point (in green) signals an imminent correction. If the current trend continues we might expect a correction to the bottom of the channel of figure 4 in 6 months or so.

### Summary

When viewed on an equal-percentage (logarithmic) basis, the broad market is near its historic mean trend with further room to run. Ascent to a residual reading above .25 or a break down below the channel of figure 4 would indicate the time to exit equities may have arrived. In the mean-time, momentum is slowing and if current trends continue, a correction to the lower channel boundary may be expected in approximately 6 months. Stay tuned for updates.

^{1}For the mathematically inclined, the best-fit function was found with Mathematicatm using a least-square regression on an exponential fit to the weekly closing S&P 500 index. Publishing the equation would be of no utility as it uses epoch timing for the independent variable.

**Disclosure:** I am/we are long SPY.

I wrote this article myself, and it expresses my own opinions. I am not receiving compensation for it (other than from Seeking Alpha). I have no business relationship with any company whose stock is mentioned in this article.