Showing posts with label Systematic. Show all posts
Showing posts with label Systematic. Show all posts

Tuesday, February 19, 2019

Systematic Trading: Week 1

This weekend the Russel 3000 index has been above its 200 MA for 3 days.


Who knows if it will continue?  It could be a false breakout.  Or it could be like 1998: a correction before a final 18 month melt-up.  I will trade the system regardless.

Value (The Acquirer's Multiple)

Yesterday, bought the top 3 stocks from The Acquirer's Multiple All Investable Stock Screener.

I will continue to buy and sell as the number of days the index is above the moving average. (N) changes.

After each stock has been held for 1 quarter, I'll rebalance.  i.e.: replace it with another stock if it is no longer within the top N rated stocks.

Momentum (Clenow)

Bought 3 stocks yesterday:
  • LIVX (Livexlive media Inc), bought 673 shares @ $5.95
  • LCI  (Lannet Company Inc), bought 389 shares @ $10.28
  • EHTH (EHealth Inc), bought 64 shares @ $62.66

Friday, December 21, 2018

The Acquirers Multiple and Quantitative Value

After looking at momentum, I wanted to look at quant value screens/algorithms. Two interesting ones were "The Acquirer's Multiple", and "Quantitative Value".

The Acquirers Multiple

This single measurement is based on Enterprise Value (EV), which gives the cost you would pay to acquire the company. It takes into account a company's capital structure (eg: debt and cash), unlike market-cap based valuations such as PE. And it's more objective than book value.

Divide EV by earnings, usually EBIT1. The resulting number measures how cheap the company is - the lower the better. You need to take a portfolio approach and buy 20-30 of them: these stocks go to zero occasionally2 .

You end up with a bunch of shitty companies. Companies that are targets of lawsuits. Oil companies in the middle of a multi-year bear market. Retailers being killed by Amazon. Companies that no one wants to hold.

The theory behind this is mean reversion: After an industry has been is losing money for years, competition dries up, and eventually the remaining companies are profitable. They may not be very profitable, or have any growth prospects, but after their stocks have been priced for bankruptcy, any improvement in their situation means their stock prices will recover.

When trading using The Acquirer's Multiple, I should expect:
  • Long periods of underperformance. This is true of value investing in general.
  • Declines in bear markets:
(Source : Deep Value and the Acquirer's Multiple (28:20): QuantConn NYC 2016. This is not "The Acquirer's Multiple", but rather the lowest decile of value stocks - similar to TAM) 

The declines are less than momentum strategies, but still bigger than the S&P 500. I'd use the S&P 500's 200 MA to time the my entry.
  • Long term returns of 15-17%. See results from 1964-2016 here.

Quantitative Value

This book gives is a more refined version of The Acquirer's Multiple. It uses EV/EBIT as its main screen, but does some other things:
  1. First it screens out probable Frauds, Manipulations, and companies in financial distress, using statistical techniques.
  2. Then finds the 10% of cheapest stocks by EBIT/EV.
  3. Then tries to find stocks with strong Franchises (high ROA, ROC, FCF/assets, all over 8 years), and Financial Strength (profitability, stability, and operational improvements). The top half are chosen.

Backtesting

I was not able to do a reliable backtest on Quantopian because some fundamental data was missing. If I was trying again, I would try Portfolio123 or QuantRocket. Too bad. I would like to see the shape of the equity curve, the drawdowns, and how they would improve when we use a 200 MA to time entry. But I'm not willing to put any more time into this.

How would I trade this?

I could just buy the Quantitative Value ETF (QVAL), which selects stocks based on the book. Its holdings are equally divided among 50 stocks. Limited to the top 40% largest stocks (minimum market-cap is around 2bn). The expense ratio is 0.79%, meaning if I buy USD 100K and hold for a year, I'm paying $790.

I could also subscribe to the Acquirers Multiple screener for $500 a year, and buy stocks from their All Investable screen. I'd probably trade every week, and ease-in and out of the strategy based on the index's MA - similar to what I do for my momentum strategy.  After filling my portfolio, rebalancing would be quarterly.

Comparing the two: I'll probably go for the screener:

  • It also filters out Frauds, Manipulations and Financial Distress (same as QVAL).
  • It uses operating earnings instead of EBIT, which is slightly better.
  • And it accesses smaller cap stocks (around 150m, depending on market conditions).
  • It also eliminates stocks with high short interest (which QVAL doesn't do).
  • The only thing it doesn't do is check for Franchise and Financial Strength.  This screen is based on purely cheapness and believes we can't distinguish quality.




Footnotes:

1 Tobias Carlisle preferred Operating Earnings (Revenue - COGS + SGA + D&A), as it excludes special items. See FAQ: "What are operating earnings?"
2 In an interview - which I can't find - Tobias Carlisle said that an average of 2% of stocks go to zero every year - market wide. For Acquirers Multiple stocks, the average is 6% a year. But that's the average - the bankruptcies tend to cluster in certain years.

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.