Tuesday, July 16, 2013

In my book I devoted considerable attention to the phenomenon of "Momentum Crashes" that professor Kent Daniel discovered. This refers to the fact that momentum strategies generally work very poorly in the immediate aftermath of a financial crisis. This phenomenon apparently spans many asset classes, and has been around since the Great Depression. Sometimes it lasted multiple decades, and at other times these strategies recovered during the lifetime of a momentum trader. So how have momentum strategies fared after the 2008 financial crisis, and have they recovered?

First, let's look at the Diversified Trends Indicator (formerly the S&P DTI index), which is a fairly generic trend-following strategy applied to futures. Here are the index values since inception (click to enlarge):

and here are the values for 2013:

﻿

After suffering relentless decline since 2009, it has finally shown positive returns YTD!

Now look at a momentum strategy on the soybean futures (ZS) that I have been working on. Here are the cumulative returns from 2009 to 2011 June:

and here the cumulative returns since then:

The difference is stark!

Despite evidences that indeed momentum strategies have enjoyed a general recovery, we must play the part of skeptical financial scientists and look for alternative theories. If any reader can tell us an alternative, plausible explanation why ZS should start to display trending behavior since July 2011, but not before, please post that in the comment area. The prize for the best explanation: I will disclose in private more details about this strategy to that reader. (To claim the prize, please include the last 4 digit of your phone number in the post for identification purpose.)

===
Upcoming events:

I will be teaching an online workshop on Momentum Strategies from July 30 - August 1. Registration info can be found here.

My friend Dr. Haksun Li is offering a Certificate in Quantitative Investment series of courses.

I read a research paper (I think it was by Fabozzi but I'm not sure) that explained, during recessions there is a fundamental reason for the market to become more volatile. Companies are usually highly leveraged at the peak of a bull market; just like how LTCM went from a leverage ratio of 40 to 100 in a couple of days, companies too will suddenly have exponentially larger leverage ratios since their intrinsic capital will have diminished. This increased amounts of leverage results in increased fluctuations in prices.

For the commodities, I would guess that the same actions apply to the traders rather than the companies. Traders leverage themselves too much, a crisis causes their leverage to shoot up and increase market volatility during the de-leveraging cycle.

If it is true that all momentum / trend following strategies breakdown during periods of high volatility which generally coincide with Economic recessions then one must predict economic recessions. In my experience economic recessions are typically a result of exogenous price shocks. Either the price of energy or the price of capital (i.e. interest rates). For example the 2007-2008 financial crisis was proceeded by rising short term interest rates and very high Oil prices. Similarly, the 2000 recession was proceeded by rising short term interest rates (inverted yield curve). Recessions in the 1970's (two of them) were a result of Oil embargos and huge spike in Oil prices. 1982 - Volker. etc.. So. One might be able to model and predict possible recession periods with Oil price series and short term treasury yield price series. Interest rates are a little more complicated as one might have to take into account inflation to get the "real" vs. "nominal" interest rates. Yield curve. I could even see Libor spreads being used in this part of the model (spreads were widening into the 2007-2008) crisis.

kj:yes, it is interesting that volatility of ZS fell off dramatically after 2011. But so did volatility in many other assets. It may be related to the revival of trend following strategies, but just as another manifestation of the "bull market".

Jozef: I used to follow your paradigm of trading a trend following strategy on all futures, but with little success. After I studied some successful managers' strategies, I now don't believe that we should apply the same strategy to all futures. In particular, equity index futures behave extremely differently from many commodities futures. Also, as my book detailed, the main reason for trending behavior in futures is roll returns, and they are very different for different futures.

Hi William,As in my response to kj above, it is hard to discern whether the decline of volatility is a cause for the revival of trends, or whether it is just a contemporaneous feature of a bull market.Ernie

Hi Neil,Actually, one does not need to predict recessions to benefit from this phenomenon. We just need to know that after a recession has already started, we shouldn't be trading trend strategies for a while, maybe a long while.Best,Ernie

In July 2011 I bought a soy milk maker and since that time I have been eating soy milk everyday on my breakfast cereals. Since I'm a greedy pig, my mass purchases of raw soybeans and subsequent increase in market demand have obviously pushed prices up!

As you said in your book, roll return are very important in futures of commodities and this quantity depends on some factor like: interest rate, inflation, expectations.... It could be that this quantity have been less for 5 years because we don't have inflation and 0 interest rate and that could mean more noise and less trend in futures markets. What do you think?

First of all, we should differentiate btw trend following and momentum. The paper you mentioned is about cross-sectional momentum on equities, which in academia is referred simply as momentum. The reason it doesn't work after crises is b/c of trend reversal (stocks that used to underperform start to overperform). For example small cap value stocks which were falling the most during the bear mkt, are the first to participate in the bull market. Trend following or absolute momentum (academia), tends also to underperform after crises b/c markets become range bound creating more false signals. I think of the mkts as springs. After volatility expansion (crisis) the spring will start to hover around (noisy range bound markets) until it reaches an equilibrium where momentum will start to work again. After crises (regime breaks) mkts are noisy, creating more false signals for trends (signal/noise falls precipitously). The fact that they are noisy does not mean ostensibly that there aren't trends, but the new trends are more noisy and maybe you need different approach (maybe longer lookback) to identify them.

Hi Ernie,One thought is that this momentum was initially set off by the USDA Acreage and Grain Stocks Report that comes out in late June. In 2011, there was a big surprise (at least in corn, which is highly correlated) that deflated a long upward crawl in prices. Same situation in June this year. Last year was the drought. In that case, which I'm guessing is more common in commodities markets, there was a gradual diffusion of news regarding the severity of the drought. Weather forecasting, acreage reporting and the like are messy businesses that probably lend themselves to trending - periodic, imprecise, regional, often anecdotal. So, I'd sum up by guessing that big summer shocks initiated action and widened trading ranges with momentum propagated by the nature of news flow in commodities. Perhaps the memory of recent years also makes a retracing more likely?

I've noticed similar trending averages over the past year. As a contractor, I gauge my workload to determine the direction of the construction industry. When things pick up, I invest and when things slow down, I sell.

I'm not sure we are heading in that direction but the last thing we need is another bubble that only leads us to problems.

Hi Jozef,Renaissance Technologies' Medallion Fund, which trades futures, scored average annual returns of about 35%, after fees, since its inception in 1988, with only one money-losing quarter since 1995, a slight 0.5% drop in the first quarter of 1999.

I think their long term return/drawdown is much better than the 1:1 that you suggested is possible.

Hi Theo,Yes, I also discussed cross-sectional vs. time-series momentum strategies in the book.

I like your explanation about why time-series momentum suffers after financial crises. However, it is really a generic explanation of momentum crashes, not quite the alternative, fundamental explanation specific to ZS that I was hoping for.

Hi Anon,Firstly, the Sharpe ratio since 2011/7 is just over 1, which is pretty good for a momentum strategy on a single future. The annualized return / max drawdown is 1.5, which is again quite decent. (Reader Jozef Rudy above would agree with me!)

Secondly, I would argue that most strategies die sooner or later. You might think that you have found, in backtest, a strategy that worked since the 1900's, but that is likely due to survivorship bias: once you start trading it, it is quite likely to fail in the not-too-distant future. Given this general observation, we should not be afraid to trade strategies that didn't used to work, but suddenly started to do so due to some identifiable market regime change, and *vice versa*.

(Note the keyword "identifiable". What I am trying to ascertain is whether there is a fundamental basis for the regime change, and if so, whether the fundamental condition persists.)

Hi Ernie,These reports have been around for a long time; I just think that the 2011 and 2013 reports were unusually surprising/impactful...and they sandwiched a severe drought in 2012, all lending credence to Mdbllbr's post.

I am not sure you are aiming at the proper league. Medallion fund employs tens of PhDs. You are a single fighter and there is no way you can re-estimate and come with new models in a same pace. Being in CTA league does not require you to do the same, you can use the same models for decades without a significant change.

From my perspective, aiming at CTA performance is more proper.

Also, Renaissance Technologies has another fund, which is not exclusive for employees to invest in, and it has much worse performance.

Hi Paul,When a strategy is dying, I think it is most important to find out the fundamental reason why. I gave the example of GLD-GDX in the book. Once you understood the fundamental reason, you can make a better decision whether or not to abandon it forever. Ernie

Corn. I agree with Mdbllbr of the nature of the change. I think one of those factors is highly related to corn. Corn and soy beans compete for production land. The constant rise in corn demand because of substantial processing facilities built in the last two decades. Farming communities have been amazed by the rise in corn prices and as a result are producing less soy beans. China demand for soy beans continues to rise significantly. Oddly the ethanol tax credit expired in 2011. Corn and soy bean prices are now less influenced by congress and more by market forces. 2630

Slightly off topic. Could you provide the code where kalman filter can be used for single asset price as a mean reversion and momentum signal. You have touched on this concept in your book regarding single asset but I am struggling to code it. Please provide it in the usual protected page with other codes. Thanks John

Hi Ernie, regarding the single asset class kalman filter. I was wondering how to interpret the result if I put single asset prices through the code you have given. I am beginning to sound confused because I have never come across this concept before and learning. Does the code stay same. I wanted to see some visible examples of kalman used with financial data to understand it better. Thanks, John

Hi Anon,When you said "prop trading firm", I assume you mean those where the partners put up all capital, and you are employed as a trader, getting a salary and bonus? If so, there is little difference from working at a hedge fund.

(That is different from certain prop trading firms that require you to put up some of your own risk capital in return for a significant portion of the profits. You get no salary from those firms.)

1) US government subsidize biodiesel production till ~20112) One of soybean's main uses was to produce biodiesel3) Other raw materials can substitute soybean in biodiesel production4) Biodiesel is a substitute for crude oil products

I am reading your book everyday and it is very well written:) To be an institutional or personal algorithmic trading professional in institution, do you think any higher education helps? Let's say someone like me having a degree, is there any master that would help me to gain the suitable knowledge? I looked at financial engineering kind of masters in Hong Kong but the courses are mainly (or I should say "all about") about the calculations of derivative products but not trading.

From my understanding, algorithmic trading is mainly about math+stats+programming. My degree and job are about programming so basically I keep trying to improve my math and stats knowledge for trading purpose. Does this direction make sense to you?

Hi HK,More formal education may help you find a job in institutional algo trading, but not necessarily improve the profitability of your models. Self-learning is the most efficient, mainly by reading a large number of books and papers. For basic knowledge, you can consider MOOC.Ernie

I am still struggling to implement the Kalman Filter for a single asset price series. I was mumbling when I was trying to explain what I was looking for. But then I found this post and the picture in this post is exactly what I am looking for. COuld you please provide the R code for the same in the usual place where other codes of your book2 are. for Example I want to feed S&P 500 daily prices.

Hi John,I am afraid that I don't program in R. Furthermore, I don't presume to understand exactly how a different author implement their own Kalman Filter strategy. However, I would refer you to this R financial expert for help: http://quanttrader.info/public/Ernie

I never try mean reversion model in real life trade. Base on my understanding from your new book, mean reversion model with good backtest suppose to keep working well and stop lose may be never needed. It is hard to apply stop lose for mean reversion model and even if I apply one, it would be far away from the reasonable "mean reversion moving range". So is that if somehow the mean reversion model doesn't work, then the lose of a trade would be so big? So the risk of a single mean reversion model trade can be huge especially for someone like me who is not expert to calculate the mean reversion relationship well enough? Thanks.

Hi HK,Yes, mean reversion is supposed to work most of the time, but does incur tail risk. However, if the frequency of the trades is high enough, the cumulative profit will be larger than the tail risk, which can be controlled by a stop loss.Ernie

For intraday trading, is that hard for individual to daily gain profit from mean reversion models with retail internet speed and broker like IB? So that if I want to do intraday trading everyday, I should better focus on momentum models?

What may be difficult to profit from is high frequency (millisecond) mean reversion trades if you use IB. But then, there are other brokers such as Lightspeed or Mirus futures that you can use as retail trader that offers better speed.

3) (Regulatory/Structural) - As a reaction to soaring farmland prices, Brazilian regulatory reinterpretation of agricultural laws in August 2010 limiting foreign ownership and investments caused infrastructural issues in Brazil, just as it was becoming the largest global soy producerLink: http://www.aljazeera.com/indepth/features/2012/09/2012913112137744956.html and http://www.bloomberg.com/news/2013-03-26/brazil-soy-boom-bottlenecked-as-china-left-waiting-commodities.html

Of the three, the first hypothesis is the most likely, but interestingly the second seems most correlated to your ZS strategy return data (but as you teach correlation <> cointegration or causation!)

I submit in the third hypothesis because as a market structure trader, I love seeing governments interference causing unintended consequences (like 15 miles of unloaded soybean trucks - and profitable trading opportunities). Also it gave me a last minute entry opportunity to be in the running for the prize. :)

Then again, if anyone else does win the primary prize for the best theory, I would love if you would also consider an 'alternate' prize to the runner-up…!

I just remember your new book mentioned the possible ways to define the rules with the orders kind level of data/order flow. If I only know the price and volume with basic live price feed, is there way to define support and resistance? How about interdays?

1 - The limitation of foreign ownership of farmland has not limited the supply of agricultural commodities from Brazil. The government statistics shows the total land used to grow soy has been increasing since 2009.

2 - The infrastructure bottlenecks doesn't reduce the supply either. The logistic issue just increase the transportation cost and they have this issue for a long time. Every year during the export season the press report about it.

I think the interesting question here is why trend following in general stopped working 2010-about mid 2011. Since these strategies typically trade at least 50 different futures, there must be a general explanation rather than a different explanation for each contract.

The answers provided concerning soybean futures fall nicely under the "narrative fallacy" that Taleb talks a lot about. There seems like there are several blog readers that could become academics :)

I could come up with a different explanation for every contract. However, this is purely a narrative and likely not very useful. Therefore, the true answer lies in nailing down why trend following in general stopped working.

Looking back to 1920, trend following has experienced several periods of sideways or negative P&L, but it has always kicked in again after about 2-3 years.

Thanks for your explanation but I am confused. In your new book, you talked about there is paper shows that support and resistance have some predictive power and you showed a high frequency model involving order flow data with support and resistance. So is that you consider 1. support and resistance are subjective and cannot be well defined in your trading system? or 2. support and resistance are not reliable factors to be include in trading system?

Hi HK,Yes, I quoted Osler's paper about a stop hunting strategy using support and resistance levels. And I wrote that those levels are either reported by banks or brokerages daily, or just round numbers. I never wrote that I traded any such strategy myself, nor did I write that I have a system for calculating such levels. Finally, this strategy is completely different from the order flow strategy that I discussed.

Actually, I already pointed out one generic reason why momentum strategies stopped working after 2008. And when momentum strategies stopped working, they do eventually recover historically. So their recovery in 2011 may not require any special explanations.

However, I am looking for alternative economic hypotheses. I disagree with you that these hypotheses have "narrative fallacy". Some of these narratives actually have testable consequences. My favorite example is why GLD-GDX fell out of cointegration in mid-2008. The explanation was high oil price. And lo and behold, if you add oil price as an extra price series, the triplet cointegrates quite well during that period.

To look for testable consequence of the explanations offered here, we may see if similar cause and effect occur for another commodity.

In general, commodities (just like most other assets) are affected by general factors as well as specific factors. We should not ignore explanations due to specific factors since, as Mdbllbr said, they may dominate that commodity over some period.

I agree that surprising news do generate momentum, but usually just in the immediate aftermath of the report. Why should they create trends for the entire year?

2) Dave newbie suggested that demand for soybean is increasing while supply is dropping.

That might seem to suggest unidirectional increase in prices since 2011, which is not the case.

3) Frank suggested also that supply is dropping due to the end of biodiesel subsidy.

Again, this would have just explained a long-term increase in prices that didn't happen.

4) iamatrader suggested a drop in Brazilian soybean production may do this.

This has the same problem with explanations 2 and 3.

5) Finally, Mdbllbr said that prior to 2011, the Euro crisis forced a single risk factor across many assets, while after 2011 the market turned its focus to endogenous (specific) factors unique to the soybean market. In particular, weather forecasts is one. Since weather forecasts count as surprises, and unlike the USDA report, weather forecasts come out regularly, they can and do produce short term trend in prices.

Is this hypothesis testable? Sure it is! You would just need to correlate the reports of "surprising" weather forecasts (much like earnings surprises in equities markets) with any subsequent trend in prices over the last 2 years.

Congratulations, Mdbllr, please email me for your prize. For readers 1-4, please also email me if you wish to know a bit more about my strategy. In your emails, please include your complete phone no. so that I can verify your identity by calling.

Is it possible to objectively backtest support amd resistance? If I setup a backtest to record recent low volatility range then see if it has any impact in trend following strategy in years of data, would this a reasonable way to backtest support and resistance?

To determine if reversion to the mean or trending will work best ask one question; Does the perceived value of an asset nearly match its current price? If yes; reversion to the mean will work best. If no; trending will work best as the market moves towards a new perceived value.

Reversion to the mean works when price discovery is two forces going back and forth on the pros and cons of an asset which results in a bouncing around a mean. Trends happen when something fundamentally has changed. Think of it as a light bulb slowly going off in every investors head as they each realize; prices are wrong at this level.

In 2008 the market trended down to a low value. After the market overshot and snapped back the market began the process of price discovery. As the economy recovered; it did so in a choppy manner because the economy and by extension the market was fragile. We had two forces going back and forth on the pros and cons of all assets. Are good times here again or are we going to crash again? Everyone was searching for the correct price of an asset and the wide opinions = volatility. This is perfect for reversion to the mean strategies and horrible for trend strategies.

What happened in 2011? The market started trending because the economy fundamentally improved. As this light bulb goes off in the minds of investors the market will continue to trend. Eventually it will overshoot and snap back and begin the process of price discovery again. (5849)

Might the launch of the pureplay Teucrium Soybeans ETF in September 2011 be a factor.I note on your chart that the returns on your strategy chart begin to climb at a time coincident with this point.regards conor

I back-tested a momentum strategy on the US equity market that successfully recorded sustainable returns during different market regimes. I am long on average 10 stocks and I rebalance my portfolio on a monthly basis. I back-tested this strategy from 2002 to 2014 on high volume stocks only. Since 2015 the members of my portfolio are available at the beginning of each month. Please look at my website and let me know what you think. www.thehedgefundproject.com/

I back-tested a momentum strategy on the US equity market that successfully recorded sustainable returns during different market regimes. I am long on average 10 stocks and I rebalance my portfolio on a monthly basis. I back-tested this strategy from 2002 to 2014 on high volume stocks only. Since 2015 the members of my portfolio are available at the beginning of each month. Please look at my website and let me know what you think. www.thehedgefundproject.com/