(in progress; updated 20150911)
Is the U.S. S&P 500 Price-to-Earnings (PE) multiple too rich right now?
Take a look at the Price to Earnings Ratio, based upon an average of earnings over ten years, and the S&P composite. Data is from the Yale School of Economics, namely Robert J. Shiller’s Market Volatility, Chapter 26, which is updated on his website, and can easily be accessed through the Quandl website, and can be databased locally using Python scripts in the github repository marche
Let’s try to do a wavelet decomposition to make sense of features of this time series. PyWavelets was used. I highly recommend PyWavelets to do Wavelet analysis in Python.
Taking the 1-dimensional wavelet decomposition at level 2 (one can change the level, keeping in mind that the maximum level can be calculated with PyWavelets, and I found this level of decomposition kept the most salient features), then the decomposition approximation and detail coefficients can be obtained. Note that the normalization of the values isn’t agreed upon for wavelets (please send me a message and contradict me if I’m wrong).
Consider the plot of the level 2 approximation coefficient, . If one could roughly understand wavelet decomposition as a compression problem, such as compressing an image, or compressing an audio waveform, instead of using Fourier decomposition, but with localized “wavelets”, then this is the PE ratio, with some of the randomness smoothed out.
Consider the plot of the level 2 detail coefficient . The two features that stand out prominently are the sharp dip and peaks around 1929 and around 2000. This does suggest that the PE multiples that the market participants were willing to pay were abnormal in and around 1929 and 2000. It somewhat suggests that we are not, we are far from, a mania, in terms of a PE multiple.
NIST, National Institute of Standards and Technology, has an Engineering Statistics Handbook that explains a lag plot well.
Consider a lag plot of the same time series, of the PE ratio of the S&P composite.
The linear structure strongly suggests that with a 1-year lag, PE ratio is highly correlated and not random at all. One can change the lag (I’ve tried 2,5,10,15,20 year lags) and see that the structure in fairly random. But the 1-year lag plot suggests an autocorrelation model.
I will remark right now that it is unclear whether the PE multiple (21 at the end of 2013; around 19 from other sources) is in a down cycle or up cycle (please write to me or respond here if I am overlooking a technique). I can try an autocorrelation model (or help me implement it using Python). But as I look at it, we are outside a mania.
Consider U.S. housing. Residential real estate, as an asset class, can be either considered competition to U.S. stocks, U.S. equities, or it could be a boon to stocks, because of residential real estate’s multiplier effect to the U.S. economy as a whole; housing “punches above its weight.”
Consider a plot of the historical real home price index from Shiller. This is not the nominal real home price index. However, it’s unclear from the sources what exact inflation adjustment was made.
Note that I want to encourage the use of open data and making data accessible and easy to use, so you could do all this yourself and have access to the same data. Start with Quandl. Take a look at the github marche, as I implemented – using SQLalchemy and pandas – persistence of the data locally (i.e. saving the data locally, and databasing it in a “civilized manner”), so I could work with all the Quandl datasets locally, without having to download from the website over and over.