Sunday, June 26, 2016

Out-of-Sample Returns: The Defense Against Overfitting

One of the most common criticisms of data-derived strategies, especially those published in books whose authors stand to gain from their sale, is model overfitting. How do we know the strategies aren't just a random correlations found in large datasets? If I told you that companies with left-handed CEOs outperformed the overall market from 1950-2016, you'd probably think I was full of it (or even if it was true, that the correlation is meaningless and not a predictor of future returns). If I told you that simple value strategies (which are rooted in much more sensible factors than left-handedness) have outperformed the market between 1964 and 2009, your next argument might be that those strategies would fall apart after 2009.

O'Shaughnessy developed and tested the strategies in his book using data from 1927 to 2009 (1964 to 2009 for the ones I've discussed) and the results he presents are considered "in-sample." He attempted to assure that the strategies' performance were not the result of random chance by using the t-statistic, but a better way to be sure is to test the strategies "out-of-sample."

Using Portfolio123, I've recreated the trending value, consumer staples value, and utilities value strategies and backtested them from the beginning of 2010 to the present.


Out-of-Sample Return % (Jan 2010 - June 2016)
Out-of-Sample Performance Metrics (Jan 2010 - June 2016)
It looks like the strategies haven't fallen apart out-of-sample. Both the consumer staples value and trending value strategies have outperformed the benchmark over this time period, with trending value having more risk and consumer staples value having less risk than the benchmark, which follows the in-sample results.

The utilities value strategy has lagged over this time period, which has happened in the past and is bound to happen for any long-term strategy. Periods of underperformance are quantified by base rates (look into base rate fallacy for another example how investors tend to neglect past performance in favor of recent information). The base rates for the utilities value strategy between 1968 and 2009 tell us that this strategy underperforms its benchmark 13% of the time on a 7-year rolling basis.

So do you abandon ship? Or trust the base rates? Most investors, amateur and professional, would do the former, poking holes in the efficient market hypothesis (Forbes recommends reevaluating a professional asset manager after just 3 quarters of underperformance! Many times managers that are fired for short-term underperformance go on to outperform again after being fired).

Instead of jumping ship, a reasonable recommendation would be to use multiple strategies in your portfolio. This will help you emotionally weather the storm of one strategy underperforming for a year or several years. 

Stay tuned for the stocks that these strategies are currently pointing to. Happy trading!

Please post any questions, comments, or suggestions you have below.

Friday, June 24, 2016

Minimizing Downside Risk: Quantitative Strategies for Conservative Investors

In What Works on Wall Street, James O'Shaughnessy looked at how different factors fared within individual sectors of the stock market. He found the best performing factor for the utilities sector was a composite of several factors, called "value composite 2" (VC2), and the best performing factor for the consumer staples sector was shareholder yield (SHY). Both VC2 and SHY were introduced here.

To replicate the utilities value strategy, simply purchase the top 25 stocks in the all stocks universe (market cap >$200M in 2008 $) sorted by highest VC2 score. For the consumer staples value strategy, purchase the top 25 stocks in the all stocks universe sorted by highest SHY. Both strategies rebalance annually, as with all the strategies in the book.

What's amazing about these strategies is not only do they outperform the market, they do it at a lower risk.


Strategy Performance (1968 - 2009)
Both strategies outperform the market with lower standard deviation.  A limitation of just looking at standard deviation is that it accounts for upside risk and downside risk, but since upside risk is a good thing, a more useful measure is downside deviation, which only measures downside risk.

The lower the downside deviation, the less likely the return will be lower than expected. In other words, the lower the downside deviation, the less risk the strategy has when stock prices are falling.

That's all there is to it. If you have any questions, post them in the comments below.

Monday, June 13, 2016

The Irrational Investor (Why Isn't Everyone Doing It?)

If you read my last post, one of your first reactions might have been, "If these strategies are so effective, why isn't everyone doing it?" Or, why aren't you in charge of a big hedge fund, why isn't every pension/trust fund using it, etc. (these are actual responses I've heard from people).

And while O'Shaughnessy covers this very question brilliantly in the first three chapters of What Works on Wall Street, I will make a feeble attempt in this post to begin to answer the skeptics. (He also has commentary on these topics, including "The Myth of the Most Efficient Market" and many others, on his asset management firm's website).

To begin, let's review the obvious: everyone isn't doing it, especially not managers of equity funds.


% of actively managed funds underperforming the S&P 500 on a 10-year return
On average between 1991 and 2009, 70% of actively managed funds had 10-year returns worse than the S&P 500. Vanguard has more recent (and more complete) data in its case for index-fund investing, shown below.


% of actively managed funds underperforming their benchmark on a 5-year return
(click to enlarge)
For the data and time period Vanguard looked at, actively managed funds underperformed their benchmarks two-thirds of the time on a 5-year return (a pretty strong case to not invest in actively managed funds).

So why, if strategies like trending value and the other 222 strategies that outperformed the S&P 500 between 1964 and 2009 are so lucrative, aren't these equity fund managers able to beat the market?

Identifying the factors that outperform the market is easy. It's a well documented fact that value investing over long periods of time will outperform the market (even Warren Buffet knows the value of value investing!). This is the basis for the trending value strategy I previously discussed. If the underlying indicators are obvious, who is left to blame? The investor's brain is a good place to start.

Indexing the S&P works because it's a strategy that never varies. Day in and day out, it the S&P 500 is an index of large cap stocks. It doesn't decide one year, "Oh small stocks are doing well recently, maybe I'll become a small cap index!" No, it stays the course.

As an individual investor (or as the manager of an equity fund, where it's literally your job to not lose your clients' money), would you have stayed the course through the 7 years between 1964 and 2009 that the trending value strategy underperformed the S&P 500?

Difference in CAGR, Trending Value Strategy minus All Stocks
When the strategy lags 20%+ behind the rest of the market (like it did in 1999 and 2009, shown above), are you really going to stick with it? Not likely -- fear/risk avoidance is wired into the deepest parts of your brain, an extremely useful feature for species survival, but not so useful for being disciplined in your investment strategy. (And if you stuck with it as a professional asset manager, you'd be fired).

A 2005 study found that brain-damaged people make better investment decisions than able-brained people, by being more willing to take risks and less likely to react emotionally to losses. The brain-damaged people ended up with 13% more money on average at the end of 20 mock investment rounds.

This is a brilliant market-timing game that shows you just how difficult it is to try to beat the market on a short-term basis. If you don't do well on that game, don't feel bad, not even Isaac Newton could to outsmart the market in the short-term. Or millions of other investors, as evidenced by recent history.

At the bottom of the Great Recession in Feb/March 2009, there was a net outflux of equity of over $50B (in just those 2 months; $9B net outflow over the year), as the influx into the bond market that year was $375B. Those who sold at the bottom not only realized their 50% losses, but missed out on the 159% rebound since then. They did it despite decades of past data and experience suggesting that the market would rebound.

So what's the takeaway? Discipline is the key to the individual investor hoping to implement a strategy proven to outperform the market over the long term.

"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disclination to do so."
          - Douglas Adams

Sunday, June 5, 2016

Trending Value: Breaking Down a Proven Quantitative Investing Strategy

What I'm about to introduce to you is not black magic. And I say that because if you're a realist like me, anytime someone comes to you with something that sounds too good to be true, it's almost always too good to be true (or a pyramid scheme). Update: see my post attempting to answer the skeptics.

But this strategy is rigorously backtested and rooted in common sense. It isn't about finding correlations between obscure financial metrics and stock performance to formulate a otherwise seemingly random strategy.

Every metric in this strategy is commonly used by millions of investors every day; but when they are combined in a specific way, the results can be extraordinary.


Cumulative % Return, Trending Value vs All Stocks (1964 - 2009)

Portfolio Performance, Trending Value vs All Stocks (1965 - 2009)

The trending value strategy was developed by James O'Shaughnessy and detailed in his book What Works on Wall Street as one of the best performing strategies, using a combination of value and growth metrics, terms you've probably heard of or seen marketed in ETFs or mutual funds.

Value investing is a well-known investment strategy that aims to select stocks that the market has undervalued - that is, the stock's price is lower than what its fundamentals suggest it is actually worth.

O'Shaughnessy begins by backtesting strategies using one value metric at a time. For example, a strategy that is only invested in the stocks in the top decile (lowest 10%) of price-to-earnings ratios (P/E) and rebalanced every year. And likewise using price-to-book ratio (P/B), price-to-sales ratio (P/S), and price-to-cash flow ratio (P/CF). He also looks at enterprise value to EBITDA (earnings before interest, taxs, depreciation and amortization) ratio (EV/EBITDA), which was the single best performing value factor he backtested. (For each of these 5 factors, low values are better).

Another factor he looked at was shareholder yield (SHY), which is buyback (how many stocks are repurchased by the company (i.e., decrease in number of outstanding shares)) plus dividends divided by market capitalization. (For shareholder yield, higher is better). The results for the top decile of these factors (lowest (or highest for SHY) 10%, rebalanced annually) are below (with all stocks for comparison).
Performance (1965 - 2009)
By themselves, all of these factors beat the overall stock market. But combining the factors, coming up with a composite score and investing in the top decile of composite scores, yields even better results. To develop the composite scores, a ranking for each factor is given to each stock in the universe of stocks. So the stock with the lowest P/E gets a score of 100, the stock with the lowest SHY gets a 1, and so on (this can be done with the PERCENTRANK function in Excel (or 1 - PERCENTRANK for SHY, since higher numbers are better), or much more seamlessly using a more powerful tool like Portfolio123).

The ranks for each factor of a stock are added up for its composite score. O'Shaughnessy looked at 3 different value composite scores: value composite 1 (VC1) used the factors described above except SHY, value composite 2 (VC2) add SHY to VC1, and value composite 3 replaces SHY with just buyback yield. The returns for top decile of each of these composite scores is below (rebalanced annually).


Performance (1964 - 2009)
Each value composite is a significant improvement over any individual factor. Composites are more powerful than just screening for the best values of the individual factors because a stock that may be deficient in one metric but excellent in the others would get eliminated from consideration by screening (e.g., a stock in the top decile of VC2 may not necessarily be in the top decile for all of the individual factors).

To implement the trending value strategy, you simply invest in the top 25 stocks sorted by 6-month % price change (the "trending" part of the name) among the top decile of stocks ranked by VC2 (O'Shaughnessy chose VC2 over VC3 because of its slightly higher Sharpe ratio, a measure of risk-adjusted return).

The universe of stocks is limited to those with a market capitalization of more than $200M (in 2009 $) to avoid liquidity problems with trading smaller stocks. It's a buy and hold strategy that is rebalanced annually with the following exceptions. If a company fails to verify its financial numbers, is charged with fraud by the Federal government, restates its numbers so that it would not have been in the top 25, receives a buyout offer and the stock price moves within 95% of the buyout price, or if the price drops more than 50% from when you bought it and is in the bottom 10% of all stocks in price performance for the last 12 months, the stock is replaced in the portfolio.

So what's the catch? There are a few:

  1. The Data: While most of the metrics described are freely available from any number of online sources, some (e.g., buyback yield) aren't as easy to come by, and I still haven't found a free way to obtain all of the data for all of the stocks at once.
  2. Psychology: While the trending value strategy has never underperformed the market for any rolling 5-, 7-, or 10-year periods between 1964 and 2009, it has underperformed the market for rolling 1-year periods 15% of the time, and 3-year period 1% of the time. If you hit a few years with less-than-stellar performance, are you going to stick it out and trust the strategy, or are you going to jump ship to bonds (as many people did in 2009, missing out on the huge subsequent rebound) or another trendy strategy that seems to be performing better at the time?
  3. Commissions (for small-time investors): At $10/trade and 25 trades per year, you need a portfolio of $100,000 to keep your commissions to a reasonable 0.25%.
Luckily for you, I'll be publishing the trending value stock picks every month from here on out, so number 1 is solved. Number 2 is on you. And number 3 is the subject of a future post.

Sunday, May 15, 2016

Why I Dumped My Index Funds (An Introduction to Quantitative Investing)

In my last post, I outlined why increasing your portfolio return is the most worthwhile investment of your time and energy. Now I'm going to introduce the investment strategies that have consistently beaten the market for decades.

The first time I heard the term "quantitative investing", I imagined mazes of cubicles with math/finance graduates working 100 hours a week at big investment banks on Wall St. But once you peel back the scary facade, you find that the reality is not very intimidating.

Instead of picking investments based on a gut feeling, what you hear on the news, what a company's logo looks like, or other qualitative indicators, quantitative investing uses cold hard numbers. That's all there is to it. 

In 1991, a strategy called Dogs of the Dow was popularized by Michael B. O'Higgins. Basically, every year you would invest in the ten stocks listed on the Dow Jones Industrial Average index that have the highest dividend to price ratio (also known as dividend yield). As you can see, this strategy beats the market most years. The Dogs of the Dow strategy has faced criticism for not being sophisticated enough. But it isn't the only quantitative strategy out there -- far from it.

Originally published in 1996 and now on its 4th edition (updated in 2011 at the 2009 recession), What Works on Wall Street takes a deep dive into dozens of quantitative strategies and is a must-read if you decide to start experimenting with any of them. This is the book that led me down the path to completely dump the contents my 401(k) and implement a quantitative strategy.

To give you a teaser to the content of this book and a preview for my next post, here is an excerpt that lists all of the strategies sorted by worst year. They were backtested from 1965 to 2009. The highlighted row is a strategy called trending value, which will be the first strategy that we explore in detail.

For the trending value strategy, the average annual return was 21.08%, more than double the S&P 500's performance. $10,000 invested in 1965 grew to more than $48M by 2009, compared to just over $500k if you'd invested in an S&P 500 index fund (so 2x the return over 40 years gets you 96x the result -- compound interest is amazing). And to implement these strategies, all you need to do is crunch some numbers once a year (with stock data and Excel), buy the stocks that the data is pointing to, hold them until next year, and repeat.

If this intrigues you as much as it did me, buy the book and stay tuned for my next post.

Saturday, April 9, 2016

The Power of Compound Interest

In 1790, Ben Franklin's will left £1,000 (then $4,400) each to the cities of Boston and Philadelphia, to be invested and not withdrawn from until 100 and 200 years later. By 1990, after 200 years, the combined value of the investments had grown to over $4.5 million.

The power of compound interest is no secret, but those articles are missing the point. They do a great job demonstrating how compound interest works and showing you a pretty bar graph, but what they fail to do is inform you as an investor trying to make career, portfolio, and retirement decisions.

So, how can you use your newfound knowledge of compound interest to work for you? Let's consider John, who starts his career at 22 making $50,000 per year and plans to retire by age 62.

To plan for retirement, John has done some math. Every year, he is hoping to get 3% raises (finishing his career making over $160,000), plans to save 5% of his salary in a 401(k), and make a 9% return on his investment in a S&P 500 index fund.

If he does that, he'll end up with $1.17M when he turns 62. Using the 4% rule (which has recently come under more scrutiny, but is still a good starting point), John should be able to safely withdrawal $47,000 per year for the next 30 years without running out of money. Maybe that's enough for John, but more likely it's not. If he doesn't like the idea of going from $160,000 salary at age 62 to living off $47,000 he needs to increase his nest egg. But how?

Well, he could earn more money. Let's assume he works his way up the ladder, earning 5% raises every year on average, ending his career at $350,000 as the CEO of his company. The other factors remaining the same (5% savings rate and 9% returns), his portfolio would be worth $1.52M at age 62, good for $61,000 per year. That isn't a huge increase, and most people can't bet on climbing up to a salary $350,000 per year.

This graph shows how John's portfolio value at retirement changes as he gets bigger raises. This data set (and each one to follow) is a single variable sensitivity analysis: the other two variables (savings % and return %) remain the same (5% and 9%).



Or, he could save more. If he doubled his savings rate to 10% (3% raises and 9% returns), he would double his nest egg to $2.34M, or $93,800 per year using the 4% rule. Now that's starting to sound pretty good. But for some people, scrimping your whole life just to have more money when you're old isn't super appealing. Or maybe you're a saver, but are looking for other ways to make sure you'll have more than enough. Or maybe you want to retire early.

As described above, for the annual raise % series of the chart, only annual raise % changes and the savings % and return % stay at the base percentages (5% and 9%). For the savings % series, only the savings % changes and the raise % and return % stay the same (3% and 9%).



The last leg in this three-legged stool of your nest egg is return. If you can squeeze another 3% out of your portfolio return (for a total of 12%, with 3% raises and 5% savings rate), your nest egg at age 62 jumps to $2.49M, more than doubling your savings rate got you. Push that 3% more to 15%, and you have $5.51M at 62 or $2M at age 55. Now you can truly appreciate the genius of Ben Franklin.


Not only is your effort better spent increasing your returns, but increasing your return will lower your retirement age.



We already discussed that anything above 5% raises is pretty unrealistic, and although increasing savings is beneficial it might not be the easiest or most enjoyable path to retirement. So how realistic are long-term returns of 12-15%+ (while still being able to sleep at night)? That's the subject of another post.