Showing posts with label momentum. Show all posts
Showing posts with label momentum. Show all posts

2013/08/05

Momentum strategies

Momentum is an age-old feature of financial markets. It is perhaps the simplest and also the most puzzling of the “anomalies” discovered.  It is simply the tendency for assets (for example shares of some company) that did well (or poorly) in the past to continue to do so for a time in the future. It has been extensively examined in academia and has been found to be present in virtually all markets and going as far back as we have data. It has even persisted some decades after being extensively investigated for the first time. And still, it seems, we do not understand it very well. In today’s post I just want to highlight some different momentum strategies and their uses.

A property and a strategy

Momentum is a property of asset prices in markets and momentum strategies try to benefit from this property. One way of understanding momentum is to consider different momentum strategies and the profits they make, which gives an indirect means of understanding how asset prices work. For investors, of course, this is perhaps the most convenient way to study momentum as they are inherently interested in the strategies. They only care about momentum as a property if they can exploit it. The distinction between momentum as a property and as a strategy is not always clear because academics have not yet, I think, deemed it important to make the distinction explicit and thus both are simply called momentum. 

How to construct a momentum strategy

Momentum strategies come in all shapes and forms. Basically all of technical analysis is some kind of momentum strategy. A very general way of thinking about constructing a momentum strategy is depicted in the picture below. One starts by identifying some kind of trend (or signal) for each of the assets you are considering. This gives the direction of the momentum for the asset (for instance up or down). One can then assign a strength (or score) to this signal, which can be related to the magnitude of the momentum or the confidence you place in it. Then based on the signal and strength one makes an allocation decision – you decide how to bet in order (hopefully) to profit.


Time-series and cross-sectional momentum

Momentum strategies come in two main forms (though they are related). The first is to consider momentum for individual assets – the tendency for an asset’s price to go up if it went up in the past.  Here the signal and strength are evaluated for assets in isolation. This is time-series momentum. This form of momentum can be contrasted with cross-sectional momentum, which considers the momentum of assets relative to each other, e.g. the tendency of one asset to perform better than other assets if it also did so in the past, for instance. Here the signal and strength depends on how assets compare to each other.

Time-series momentum (strategy) tends to do well if an asset’s return is related positively related to its own past (property), for instance in what is called an AR(1) process:


Thus a higher return in the past predicts a higher return in the future.

Cross-sectional momentum (strategy) tends to do well if one asset’s return is negatively related to the past return of another asset (property), for instance if (numbering the assets 1 and 2)



This means that a high return on the one asset predicts a lower return for the other asset in the future.


Some simple strategies

Here are some simple strategies, based on a simple taxonomy:

Signed time-series momentum: buy any asset that went up in the past; sell any asset that went down.

Signed cross-sectional momentum: this is analogous to the above, but now invest in deviations from the average return or the market return. For instance the deviation of asset i’s return from the average is



If the asset did better than the average, buy the asset and sell the market and do the opposite if it did worse. This is a bet that assets that had above average performance in the future will continue to do so in the future.

Linear time-series strategy: again buy any asset that went up and sell any asset that went down, but invest more in assets with larger returns (invest proportionally to the asset’s past return)

Linear cross-sectional strategy: the same as above, but for deviations from the average (or market) return.

Quantile cross-sectional strategy: buy, for instance, the top third of assets and sell the bottom third.


In practice only the signed time-series and quantile cross-sectional strategies are used. The other strategies are, however, useful in formulating theory. For instance the linear strategies are easier to cope with mathematically, but amplify volatility too much to make them useful in practice.


Some references


My thesis:
  • Du Plessis, J. (2013). Demystifying momentum: time-series and cross-sectional momentum, volatility and dispersion. University of Amsterdam. Retrieved from http://www.johandp.com/downloads/johandp_momentum_final.pdf?attredirects=0
Some empirical articles looking at momentum strategies:
  • Jegadeesh, N., & Titman, S. (1993). Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency. The Journal of Finance, 48(1), 65–91. doi:10.1111/j.1540-6261.1993.tb04702.x
  • Lewellen, J. (2002). Momentum and Autocorrelation in Stock Returns. (C. H. Schiller, Ed.)Review of Financial Studies, 15(2), 533–564. doi:10.1093/rfs/15.2.533
  • Moskowitz, T. J., Ooi, Y. H., & Pedersen, L. H. (2012). Time series momentum. Journal of Financial Economics, 104(2), 228–250. doi:10.1016/j.jfineco.2011.11.003


2013/07/09

Self-critique

I recently finished my masters thesis and I would now like to do something that most people never do. I am going to critique my work. I believe that being self-critical is essential not only in research, but in life in general. In research it is necessary to further the truth. It is not enough that others are critical of you (though it is necessary). You must be critical of yourself – only then will you be willing to remedy your flaws, change your convictions and pursue truth and goodness rather than your own prejudiced agenda.

I write this post as much to myself as for any reader who may come across it. It is another public reminder of a lesson I fear I may forget in the future, and of which I may need to be reminded. Even if you are not interested in my thesis, some of the points of criticism here may be useful for your own writing. I found in writing this post that self-criticism is hard. It’s really hard to come up with anything but weak flaws in your own work. I reckon it will take time to cultivate a truly self-critical nature.

My thesis was about momentum. I looked at time-series and cross-sectional momentum and their relationship with volatility and cross-sectional dispersion, specifically considering volatility weighting as a means of improving momentum strategies. If this sounds like Greek, do not fear, for I will be explaining all of this in later posts. Today I just want to list my critiques, starting with the more serious ones.

Subjective conclusions drawn from mixed results
I often found when I ran some numbers that I got results that were not clear-cut for any any one conclusion. Then I had to be satisfied with making a qualified conclusion if I thought there was enough support for it in the data. “Enough support” is subjective and others may feel differently. It may be a wiser course of action not to draw any conclusion at all, but it may also be far too conservative.

A lack of focus
Good academic research tends to focus on one thing and examine it thoroughly. My thesis, I think, tried to look at somewhat too much, and as a result ended up being huge and with not one aspect being treated quite as it deserved.

Strict assumptions (that I violate)
In order to prove things easily you need to make assumptions. Often you end up assuming independence or normality where it is clearly not the case in the data. In my case I needed to make such assumptions to prove things about volatility weighting and in at least one case I am not even certain there is a non-trivial (that is to say, interesting) process that satisfies my assumptions. I have little choice but to violate my assumptions (there are for instance no volatility estimators that satisfy the assumptions I had to make).

Overly detailed results that are hard to interpret
I have lots and lots and lots of tables in my thesis.  They are big and make your eyes sore. Ideally one should find a way of presenting just the right numbers, without hiding ambiguity and evidence that doesn’t support your conclusions. It is hard to read text referring to specific numbers in very large tables and keep track of what is happening. Making a graph is even better as it gives an immediate impression (but you may still want to report the numbers so that people can check them). I had relatively few graphs as I could think of no good way to convert my tables into something visual. This is a weakness. You may think that academics should be able to read such dense material, that they should take the time and effort. It is, however, a simple fact that academics are human and that they do not. Even if they do,  they are less likely to get the right picture if the information is not presented in accessible manner.

Use of advanced techniques without necessarily having the appropriate understanding
I used what are called “Robust regressions” in my thesis in order to cope with the fact that financial data contains so many extreme values. I had never used robust regressions before and only briefly looked up what the robust regressions did, then used them. I did not take the time to get well acquainted with their theory (as this would have been quite a task, I think) and I simply used a standard weighting function with a standard parameter.  Most likely this is still better than simply using OLS regressions (which I think are absolutely a no-go in financial research, except as a baseline comparison), but it is still possible that the version of robust regressions I used were not the most appropriate (deciding what is appropriate is of course more an art than a science) and it would have been preferable to have had more training in using them.

Linearity
I used linear models for the theoretical and empirical investigations. One thing that is clear from finance, though, is that nothing is linear and so results from linear models can be misleading. We have, however, I think, only poor substitutes and thus linearity is still common in academia. This is thus only a weak criticism on my part, but I would like to see a move away from linear models, if only we could find an accessible and preferably tractable alternative.

Little thought for practicalities
I did not consider that I was basing my results on markets that closed at different times (essentially I assumed they closed at the same time); I did not include transaction costs, commissions, taxes, etc. This is not unreasonable. To include all these things meticulously would detract from the main purpose of the study. But they are important and their inclusion could potentially change the nature of the relationships found (though this is unlikely).

If you read my thesis and you think there are other criticisms, then please let me know. Perhaps I'll include them in a further post.

2012/11/17

Backtest blindness


Suppose you have to find a “brilliant” strategy for making money in the markets. You come up with a strategy you think will work. How do you “know” that it will work? One way is to perform backtests. This means you take past investment data, notably share prices, and pretend that you could use your strategy in the past and then see how much money you make.

So let’s suppose your strategy makes a lot of money. In fact, it seems to always make money. What could possibly go wrong? In this post, I will look at a few things that common sense dictate one should consider. A more academic investigation of backtesting will need to wait until a later post.

The curse of finite data

One problem is that you have only tested your strategy on a finite amount of past data. You only “know” it makes money if the future is exactly like this past. How likely is that?

A momentum strategy (involving buying companies whose shares have gone up and selling those whose shares have gone down) is one strategy that seems to perform very well over a very long time period. For instance if you were a quant at a trading desk in 2008 and you backtested such a strategy as far back as say 1940, you might have concluded you had a money-printing machine.

If, however, you had gone as far back as 1930 you would have seen this strategy could wipe out nearly all your capital in just a two month period. And had you implemented the strategy you would have experienced just that in 2009.

The lesson of this is not that you should have backtested all the way to 1930 (although you probably should have). You can only conceivably backtest about that far in any case – we simply do not have data going back much further. Of course a longer backtest is good, but you still have only a finite amount of data.

Markets can and do change

Markets do change, and sometimes quite abruptly. The by-now well-documented implied volatility smile observed in prices did not exist before 1987. Backtesting options strategies on pre-1987 data may not be very useful. The big crash in October seems to have permanently changed the way the market views options. But it could change again.

The problem with “successful” strategies

There is a lot of backtesting going on in financial institutions, I am quite certain. Lots of strategies will never see the light of day because they don’t produce high retrospective returns (they fail the backtest). However, the only strategies you are likely to come across as a potential investor are the ones that succeeded. These strategies have, by process of elimination, been optimised to produce excellent results in past conditions. This is collective data-mining.

These are the most misleading strategies. They are the most likely to disappoint because the past will not repeat itself exactly. This is much like trying to fit a curve to a number of data points – you can fit a curve that matches the data perfectly if you want, but it will have absolutely no predictive power.

Calibration

Calibrating a strategy can be a very dangerous thing to do. If your strategy has a few parameters and you try to find the ones that result in the most profit, you run into exactly the data-mining problem described above. The more parameters the more dangerous this becomes. It helps if you calibrate on one part of the data and test on a separate part. But this does not eliminate the problem – try enough strategies and you will find one that works both in and out of sample and completely fails in real life.

The problem with theories

You may think that if you come up with some brilliant idea, some model of market behaviour, that leads to a great strategy, all will be well. Not necessarily. The problem is that your idea is probably based on working with and observing markets and market data over a period. You are probably more likely to come up with a strategy that works well on past data merely because you know the past data better – even if only intuitively. This does not mean you have found a fundamental market law (perhaps the only fundamental market law is that any trading strategy will fail).

Strategies for which backtests do not work

You cannot backtest everything. Backtests assume you can take the past market prices as given and that you can trade at those prices. This only holds if the amounts you wish to trade are small compared to the volumes traded in the market. Thus backtesting will not work very well in illiquid markets and it will not work if you need buy or sell a large amount of stock that could potentially influence the market price. It is probably good practice to compare the volumes you wish to trade against the volumes actually traded in the past (noting that this changes from day to day).

How to keep the windscreen clear

One way to avoid at least some of the nasties of backtest blindness is to just conceive of a scenario in which your strategy would not make money (or better yet, in which it would lose a lot of money). It does not matter if it’s never happened. It doesn’t matter if it seems unlikely – you are bound to underestimate the probability of it occurring. Prepare for it anyway.

It is useful if whatever strategy you want to implement is based on some underlying theory – a theory that is likely to remain valid even if markets change. For instance, human behaviour is unlikely to change. If your strategy exploits fear and greed, it is more likely to succeed. However, this is no panacea. How do you know you’re actually exploiting human behaviour?

It helps if a strategy works in many markets – it is far more likely you are exploiting some fundamental human behaviour. However, more data is problematic if it gives you false confidence. More data is useful, but it does not negate the problems mentioned.

I admit I am not certain how to avoid all the pitfalls I mentioned above, at least not yet. But being aware of them is much better than not and that is a start.

Some references
  • Barroso, P. & Santa-clara, P., 2012. Managing the Risk of Momentum. Business, (April), pp.1–26. Available at: http://ssrn.com/paper=2041429. Investing Answers, 2012. 
  • Backtesting. Investing Answers . Available at: http://www.investinganswers.com/financial-dictionary/stock-market/backtesting-865 [Accessed November 17, 2012]. 
  • Investopedia, 2012. Backtesting Definition. Investopedia. Available at: http://www.investopedia.com/terms/b/backtesting.asp#axzz2CNdPITKg [Accessed November 17, 2012]. 
  • Wikipedia, 2012. Backtesting. Wikipedia. Available at: http://en.wikipedia.org/wiki/Backtesting [Accessed November 16, 2012]. (not a very good Wikipedia article)