"Act so as to keep the mind clear, its judgment trustworthy" - Dickson G. Watts, author of Speculation As A Fine Art And Thoughts On Life. [A brief summary here (link)]

Sunday, March 28, 2010

market timing (part 4)




As contemplated last week, I've tested our optimized trailing stop-loss and trailing go-purchase parameters against some out-of-sample data to evaluate if this strategy has any relevance or if the positive results using S&P data from the 2000s is simply a quirk of randomness. The chart above conveys the results using Dow Jones Index data from 1930-2000.

Again, as with most strategies that entail being out of the market some portion of time, the volatility of the trading portfolio is less than that of the buy&hold portfolio. As is typical, this lower volatility is accompanied by lower returns. To determine if the returns are sufficient given the reduced volatility, we scale down the buy&hold returns according to the lower Beta of the trading portfolio. Then we compare these 'adjusted' buy&hold returns to the trading portfolio returns, to see if the trading strategy added any excess return or 'Alpha'.

In short, I think the results are minimal / inconclusive. You can see the average Alpha of the trading strategy over the decades is roughly 2% per year, which although nothing to sneeze at, is a small amount when compared to the approximately 4% standard deviation of that same Alpha . In other words, the Alpha doesn't appear highly statistically significant and one could reasonably conclude the Alpha is actually 0% and the obtained result of 2% is simply a fluke.

However, I still found this to be a worthwhile / interesting exercise. For one, I think investors should always position themselves to withstand the worst (i.e. don't bet more than you can afford to lose). In this case, although worse fates can always occur, the 1930s were a tough time by any standard. Imagine nearing or having just entered retirement and then realizing a negative 5% annualized return over the next decade. Talk about something that will force a re-prioritization of your life. In this context, I think it noteworthy how well the more conservative trading strategy of trailing stop-losses and trailing go-purchases outperformed the riskier buy&hold strategy. I mean, if a strategy is going to come through for you with flying colors when you need it the most, then it warrants some consideration regardless of its average performance. This brings to mind some words of wisdom often quoted by a friend and financial advisor who when mentioning the inadequacies of averages, says something to the effect of, "The average depth of Lake Michigan is only four feet, but I wouldn't want to walk across it".

Quote for the Week: "The more pleasures a man captures, the more masters he will have to serve." - Lucius Annaeus Seneca (c. 4 BC-AD 65), Roman Stoic philosopher.

Sunday, March 21, 2010

market timing (part 3)




Market timing rules that rely on quantitative data (stock prices, economic data, etc) to generate a buy/sell decision can generally be classified as momentum strategies or reversion to the mean strategies. The premise of momentum strategies is essentially that whatever is increasing will build on itself in some fashion and continue going up (at least in the short-term). One of the simplest momentum trading rules is a stop-loss, whereby if the price of the stock drops below a certain level, the rule is to sell it at that point rather than continue riding it down. By the same token, one can create a rule whereby if the price of the stock increases above a certain level, the stock is purchased at that point in hopes of riding it upward.

The Test
To test the efficacy of this sort of strategy, I set up a back-test using historical price data for SPY, which is a stock that tracks the S&P 500 index. The rules I used were:

1. If the price of SPY drops to a level that is eight standard deviations (calculated on a daily basis) lower than its most recent highest price, then a stop-loss is triggered and the stock is sold.

2. Then, if the price of SPY increases to a level that is seven standard deviations higher than its most recent lowest price, a 'go-purchase' order is triggered and the stock is bought.

Results
The results of this test are shown in the charts above. Just as with the timing strategy based on retail sales data (a couple posts below), this strategy entails being out of the market a substantial amount of time (37% of the time in this case), which causes the trading portfolio value to be less volatile than the buy&hold portfolio value. As a result, the Beta of the trading portfolio is only 0.3 as calculated against the buy&hold portfolio. However, the return of the trading portfolio is 2.9% (annualized) vs. -3.4% for the buy&hold portfolio, which implies a trading portfolio Alpha of 4.0%.

Next Steps
You may wonder how I came up with the parameters for the test (eight standard deviations, etc). The answer is that I optimized the parameters to provide for the maximum Alpha based on this data set. The resulting Alpha for differing stop-loss and go-purchase rules are shown above in the sensitivity chart. Next week, I'll run this test again using price data from the past year to see how our optimized parameters perform against out of sample data. If the stock prices are truly random, it's not likely that our optimized parameters will result in any meaningful Alpha (but we'll see). I'll also run this test against price data for a different stock as another way to see if our results are at all robust.

Technical Notes
1. The test includes transaction costs of 0.20% for each trade.
2. The trading portfolio earns 0% interest during those times it holds all cash.
Quote for the Week: "No man is crushed by misfortune unless he has first been deceived by prosperity." - Lucius Annaeus Seneca (c. 4 BC-AD 65), Roman Stoic philosopher.

Sunday, March 14, 2010

Market Timing (part 2)

Since I'm on vacation with the family this weekend, I thought I'd simply point you to some of the most worthwhile articles I've seen on the subject of long-term market cycles.

First off is a presentation written in 2005 by my first boss and Investmentor. The upshot is that in the long run (10-20 yrs), market cycles are driven by valuation. To position yourself best, non-traditional diversification is key.

Second is a presentation by Contrarian Edge that seconds the notion of valuation being the driver of long-term market cycles, but rather than diversification as a way to cope with this reality, the main focus is market timing based on your own intrinsic view of value.

The last article is a recent post by Crossing Wall Street that essentially makes the point that when evaluating market valuations, one should account for inflation/interest rates and therefore the market may not be as expensive now as many perceive. However, I would simply add that inflation/interest rates are more likely to rise from these current levels than fall, and therefore the conclusion would be the same which is that the market will face tough headwinds for years to come.

Sunday, March 7, 2010

market timing (part 1)







I've been exploring simple quantitative market timing rules occasionally during the past year and the most promising I've found is related to retail sales. The chart above illustrates the S&P 500 return (adjusted for dividends as reported by yahoo finance) against retail sales as reported by the U.S. Census Bureau (payroll figures included as well for good measure). As you can see by looking at the blue circles, the last two major market peaks were foretold by a top in year-over-year retail sales. However, if you look all the way back to 1994, which is as far back as this economic data series is available electronically, you will notice there were some tops in retail sales where the S&P did NOT subsequently enter a downtrend. Just goes to show that you have to maintain your skepticism in regards to market timing rules insofar as you may discover one that is helpful, but its not likely to be fullproof.

So, would trading based on retail sales be helpful? To answer this question, I set up a back-test as follows: If the average of the trailing-2-month ("T2M") Y/Y retail sales growth figures are greater than the average trailing-12-month ("TTM") Y/Y retail sales growth figures, then buy the S&P 500. If not, then sit out of the market (and earn 0% for purposes of this test). The second chart above shows the results of this trading strategy vs. a buy&hold strategy. As you can see, the Trading Portfolio spends a significant amount of time 'out of the market' and is therefore substantially less volatile than the Buy&Hold Portfolio. Although the Trading Portfolio generates a lower total return, the dramatically reduced volatility provides for some Alpha (i.e. excess return in relation to its Beta) and a superior Sharpe Ratio. Just for kicks, I also 'tortured the data' and ran the test since 1998, thus excluding those early time periods when the trading rule wasn't very effective, the results of which are included in the table above. One day I might hand crank the test going back to 1953 when retail sales were first reported, just to gain a longer-term perspective, but of course there is no time for that sort of manual exercise today.

One thing I find interesting about these sort of quantitative timing strategies, is how they produce risk/return profiles so different from the underlying asset class, which perhaps could represent an opportunity for further diversification beyond the traditional stocks/bonds/cash mixtures.

The main thing to take away from this analysis is that in the intermediate term (2-5 years), the stock market follows macroeconomic fundamentals. Knowing that simple fact is useful for maintaining perspective and keeping an even keel whilst the daily headlines and market pundits tempt you to trade, trade, trade (usually to your detriment). Just as a side pontification, which I might elaborate upon at some point in the future, I think the market is mainly swayed by sentiment in the short term and valuation in the long term (10-20 years).