Friday, 23 November 2018

Is trend following dead?

I get asked this question at least once a week. As those of you that have met me IRL ('in real life') will know I have limited patience and I'm easily bored. I'm definitely bored of answering this question. This post is the last time I'll answer it.

There are broadly two ways to answer this question:


  • Looking at fundamental reasons why trend following is less likely to work
  • Some kind of statistical analysis



Are there fundamental reasons why trend following won't work any more?


Some people spend their entire lives opining about why this or that strategy no longer makes sense (google 'is value/ momentum/xxx dead' and see how many results come back). Personally I find that a very pointless occupation.

I've always felt it is very difficult to forecast the future, and your best bet is to maintain an exposure to a diversified source of different return factors. You'd be mad to have 100% of your capital exposed to trend following (it's about 15% across my whole portfolio). However you'd be equally mad to have 0% of your capital exposed to it because you think it was dead. In this oft quoted recent interview with David Harding, he was cutting the exposure of his fund in the strategy in half, to 25%.

When I have occasionally checked to see if exogenous conditions can be used to predict trading strategy returns I've found very weak effects if anything at all, as in this post on the effect of QE on CTA returns.  Also; trend following returns tend to have negative auto correlation for annual returns (alluded to in this blog post). So bad years tend to be followed by better years.

Before my patience is tested to it's limit let me quickly discuss just two of the reasons why people think trend following is dead:


  • Strategy is overcrowded; possibly but trend following is mostly a self reinforcing strategy, unlike say relative value strategies where profits get squeezed out when investors rush in, having more trend followers causes trends to last longer. Having said that overcrowding is potentially problematic when trends end and numerous investors rush to the exits, especially as there are other players like risk parity investors whose behaviour will closely resemble trend followers (see February 2018). It's worth reading the excellent work of Dr. Robert Hillman on this subject.
  • World is unpredictable (see Trump, also Brexit): perhaps this is true, but this unpredictability also affects discretionary human traders - I doubt any human can predict what Trump is going to do next (that probably includes Trump). Also trend following as a strategy has been around a long time, and on average it's worked despite the fact that there have always been unpredictable factors in the world. I'd be more concerned about a strategy that worked really well in the Obama presidency, but hadn't been tested before that (especially as the Obama presidency was a strong bull market in stocks).

Can statistical analysis tell us if trend following is dead


Statistical analysis is brilliant at telling us about the past. Less useful in telling us about the future. But perhaps it can tell us that trend following has definitely stopped working? I'm keener on this approach than thinking about fundamentals - because it's a useful exercise in understanding uncertainty. Let's find out.

First we need some data. I'm going to use (a) the SG Trend index, and (b) a back-test of trend following strategy returns. The advantage of (a) is that it represents actual returns by trend followers, whilst (b) goes back longer.

Heres the SG trend index (monthly values, cumulated % returns equivalent to a log scale):



It certainly looks like things get rather ugly after the middle of 2009.

Heres a backtest:

Backtest of three equally weighted EWMAC rules over 37 futures

And for comparision a zoom of the backtest since 2000 to match the SG index:

Backtest of three equally weighted EWMAC rules over 37 futures, since 2000 only



The backtest by the way is just an equal weight of three EWMAC rules, equally weighted across 37 odd futures instruments in my dataset generated using pysystemtrade with the following configuration.

In terms of answering the question we can reframe it as:

Is there statistical evidence that the performance of the strategy is negative in the last X years?

Two open questions then are (a) how do we measure performance, and (b) what is X?

I normally measure performance using Sharpe Ratio, but I think it's more appropriate to use return here. One characteristic of trend following is that the vol isn't very stable; it tends to be low when losing and high when making money. This results in very bad rolling Sharpe Ratios in down periods, and not so good rolling Sharpes in the good times. So just this once I'm going to use return as my performance measure. 

In terms of the time period we have the usual two competing effects; short periods won't give us statistical significance, longer periods won't help test the hypothesis of whether trend following is recently dead. The recent period of poor performance started either in 2009 or 2015 depending on how far back you want to go. Let's use a 2 year, 3 year, 5 year and 10 year window.

What I'm going to be backing out is the rolling T-statistic, testing against the null hypothesis that returns were zero or negative. A high positive T-statistic indicates it's likely the returns are significantly positive (yeah!). A low negative T-statistic indicates that it's likely that returns are significantly negative (boo!). A middling T-statistic means we don't really know.

Here's the python:

from scipy.stats import ttest_1samp

# dull wrapper function as pandas apply functions have to return a floatdef ttest_series(xseries):
    return ttest_1samp(xseries, 0.0).statistic

# given some account curve of monthly returns this will return the rolling 10 year 
# series of t-statisticsacc.rolling(120).apply(ttest_series)

Incidentally I also tried bootstrapping the T-statistic, and it didn't affect the results very much.

Here are the results. Firstly for my back test, 2 year rolling window:

The red lines show the critical values for the statistic, given the degrees of freedom (24 months -1 = 23 in this case); and the significance level (I've opted for the widely used 5%). We can say that trend following has definitely been working a few times (significant positive T-statistic). But it never goes significantly negative.

Let's look at 3 years:

Nothing to see hear folks. The recent poor performance brings the 3 year rolling average down to zero.

Surely five years must show significant results:

Ten years?
Nothing. Also interestingly it looks like the performance of the strategy has been pretty stable for the last 30 years or so (flat from the period in the ten years before 1996), with the exception of a fallow period in the years before the last financial crisis.

Okay, let's switch to the SG CTA index. Starting with two years:

No evidence of anything at all there. Three years?

We literally have no clue. Five years?

Never in the field of human conflict have so many lines of matplotlib wasted on not finding anything interesting. I won't bother with the 10 year plot - as with my backtest the last 10 years have been positive, so they can't be significantly negative.

Some may accuse me of straw-manning here; "listen Rob we're not saying trend following is so broken it will lose money; just that it hasn't and won't do as well as in the past". Well looking again at those rolling plots I see no evidence of that eithier.

Looking at the SG index there has perhaps been a slight degradation in performance after 2009, but taking the long term view over the backtest I'd say that over the last 30 years at least performance has been very similar and the current period of poor returns is by no means as bad as things have got in the past before recovering.

One more VERY IMPORTANT POINT: It's arguably silly to look at the performance of any trading strategy in isolation; like I said above only a moron would have 100% of their money in trend following. One of the arguments for trend following is that it provides 'crisis alpha' or to be more precise it has a negative correlation to other assets in a bear market. Unfortunately it's virtually impossible to say whether trend following still retains that property, since (he said wistfully) there hasn't been a decent crisis for 10 years.

You should be happy to invest in crisis alpha even if it has a expected return of zero over all history - arguably you should even be happy to pay for it's insurance properties, and put up with a slightly negative return. Since the 2009 trend following has delivered some modestly positive performance; arguably better than we have a right to expect. We won't know for sure if trend following can still deliver until the next big crisis comes along.


Summary

"Is trend following dead?" I don't know. Probably not. Now leave me alone and let us never speak of this again.

The next person who asks me this question will get a deep sigh in response. The one after that, a full eye roll. And with the third person I will have to resort to physical violence.


2 comments:

  1. trend following has never worked for the average trader that does not have enough $$, patience and focus to be in 37 commodities at the same time. One of the great false flags of this business.

    ReplyDelete
    Replies
    1. *I wasn't going to engage with any comments on this post - like I said it's my final word on the subject - But it's Larry Williams! So I made an exception...*

      Absolutely correct. The individual sharpe ratios are pretty poor so you need to diversify to make any kind of half okay expected return.

      I'm fully automated otherwise there is no way I'd trade that many contracts. The average trader also doesn't have enough capital to trade 37 futures, although my post was aimed more at institutional traders.

      Delete