Saturday, November 17, 2018

Stock Market Momentum - Part 2

Rules & Implementation

My system is based on Andreas Clenow's "Stocks on the Move", a readable and entertaining book that adapts trend following strategies to stocks.  Its a long-only rotational trading system, where stocks are ranked by momentum and the highest ranking ones are bought.  It only buys or holds stocks that are above their 100 day MA.  And only takes new positions when the market index is above its 200 day MA.

I made some small changes:

  • I don't size and re-balance positions by volatility.  It makes no sense when a position is $2-4K.  Its hard to code.  And I don't see the benefits since a stock's volatility can change in a heartbeat, and the whole market usually changes with it.  I just buy 25 stocks 1.
  • I use the lower 100-day Bollinger band (1 std-dev) instead of the 100 MA to filter if a stock is in an uptrend.  This takes volatility into account, unlike a moving average.  I want to hold winners as long as possible.
  • His algorithm buys all positions when the market index is above its 200 MA.  I gradually 'ease in' to the market.

The 'easing in' part works like this. We usually hold 25 stocks.  The first day the index closes below its 200 MA, we will set the 'target number of stocks to hold' (N) to be 24.  We don't explicitly sell stocks to meet that target - the system just goes into 'bear mode' and stops buying (Stocks may be sold based on the other criteria).  For each day the index is below the 200 MA, N decreases by 1.  So N will be zero if the index is below the MA for 25 or more consecutive days.  The first day the index goes above the MA, N is incremented by 1.  And if we are holding less than N stocks, we buy up to N.  Therefore, the index needs to be above the ma for some time in order for us to be holding the full allocation of 25 stocks.

This subtracts from my returns a little, but I need it to be comfortable trading the system. Otherwise I won't be able to follow it.

I am running on Amibroker, and selecting stocks from the Russel 3000 with Norgate Data taking care of tracking index constituents.  I exclude stocks trading under $5, or with a median 90-day turnover less than $250K.   For slippage, buying and selling is at the day's average price.  Brokerage is $1 per trade from Interactive Brokers.  Starting amount USD 73K.  I run the system over the weekend and trade on Mondays.

Backtest Results

I get a 14.2% CAGR from 1999 to Aug 2018, and 17.4% from 1991 to Mar 2003.  Decent numbers.

Looking at monthly returns:



Returns are unpredictable.   We often get a few years of boring single digit positive or negative returns, followed by a year of stunningly good 30-60% returns.

The volatility is sickening.  There is a 61% drawdown in the 2000 tech wreck, and a 33% one in 2006.  20-30% drawdowns occur every few years.

Trading It

Can I stick with this?  Trend following strategies are notoriously frustrating.  You have to just follow the system mechanically, week in, week out, and not think about how much you're making.  Or losing.  From Nick Radge (What makes a Successful Trader? 37:00):

  • We have created a system with positive expectancy.  Like a casino.
  • Remove yourself from the trading environment. Place your trades, turn off the computer.  In the long term, positive expectancy will look after you.  All you have to do is be there for it.
  • Think 'Next 1000 trades'.

When will I start?  The Russel 3000 index is currently below its 200 MA, so I'll let the market decide.

1 The tests I saw measuring different momentum with holding different numbers of stocks started with 50 as the smallest number.  I am using 25 due to low capital.  May increase it to 50 later if account size grows.

Friday, November 9, 2018

Stock Market Momentum - Part 1

I'm looking at a systematic, momentum-based stock market strategy.  Why?
  • The existence of momentum in markets is proven by numerous academic studies.
  • The system I have gives a nice CAGR 14-20%, over 10-15 year periods.
  • I will be buying stocks that have gone up.  Completely different from the value stocks I normally buy.
  • I want to be able to trade the markets systematically, without having an opinion. 

What is Momentum?

From academic studies, stocks that have gone up in the past 6-12 months are statistically likely to go up in the next 1-2 years 1.  Most papers use similar methods to measure momentum, for example:

  • Value and Momentum Everywhere: Found evidence of momentum worldwide in stock markets, stock indexes, currencies, bonds, and commodities.  For stocks specifically: they selected large, liquid stocks from 4 markets over nearly 40 years.  Stocks' momentum was ranked by their past 12 month return, skipping the latest month.  They were sorted into 3 equal sized groups: Lowest momentum, Medium momentum and Highest momentum.  And re-balanced monthly.  The Highest momentum group outperformed the Lowest by 5.4% (US market), 6% (UK), 8.1% (Europe) and 1.7% (Japan).   
  • 212 Years of Price Momentum: Looked at US market from 1801 to 2012.  Same methodology as above.  The Highest Momentum group outperformed the Lowest one by around 4% a year.

Why does Momentum occur?

No one knows.  There are many papers arguing whether its due to 'risk factors' 2, or behavior.  I think its behavior.  Humans are herd animals.  Once we see other people doing something, we want to do it too:
  • Fads and Fashion.  Whether its primary school children playing, or women comparing handbags, how often have we seen some trend catch on, then grow in popularity, until everyone 'has one'?  At which point they become not cool anymore, and the cycle starts again.  Look at the stock charts of Crocs or Michael Kors for example. 
  • Capex Cycle: For mining and heavy industry, it takes years to bring new capacity online, so they respond slowly to increased demand, while the price of their commodity/product shoots up over several years.  At the end of the cycle, prices are sky high and everybody is prospecting/investing.  Leading to oversupply and a crash.  Look at Rio Tinto's stock chart for example: up 7 times from 1999 to 2008, then losing all of that in 2009.
  • Success begets success: As business become bigger and stronger, they entrench their position, leading them to become bigger and stronger.  Especially prevalent in technology, with winner-take-all network effects, like with Microsoft or Facebook.  Until someone new comes along, disrupting the market, and the cycle starts again.

Why is it still Profitable?

How can such a simple, dumb, and well known strategy - buying stocks that have gone up - still make money?  Shouldn't everyone be doing it, removing its effects from the market?

Momentum strategies are hard to follow.  They have long and hard drawdowns: a 30% loss every few years is normal.  50-60% losses occasionally occur (the 1929 great depression and the 2000 tech wreck).  And there are long periods...a year or more... of sitting around doing nothing.

There's an interesting presentation by Wes Grey on why Momentum still works.  He considers that, for most fund managers, there is too much career risk in following momentum strategies.  I especially like his 'God Portfolio' (33:00 to 37:00) - not even God can prevent drawdowns!

In the next post I'll look at the system I'm using, and what its like to trade it.


1 Not true for shorter or longer time frames: if we're predicting under one year into the future, or from two to five years, then stock prices tend to mean-revert.
2 i.e.: stocks that posses momentum have higher returns to compensate for being riskier.

Monday, November 5, 2018

Sold most of my stocks

Sold most of my stocks last week.  Just before the rebound : (

Reason was because both the S&P500 and Nasdaq Composite index fell convincingly below their 200 MA.

I still think there's a only a 1/3rd chance of a bear market - most likely this is a 10-20% correction.  But I don't want to take the chance.  If you think there's a 1/3rd chance of getting shot, you have to take action to prevent yourself getting shot.

The stocks I am holding now fall into three groups:
  • Stocks I am willing to hold for 10 years.  Buffet style.
  • Small speculative positions, where I don't mind losing the lot.  Small risk for big gains.
  • A market-neutral pair trade.

I'm spending my time developing a simple automated trading system.  I want to be able to trade the market without having a view.