Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Momentum Indicators

I'm working on an algorithm that trades on momentum. So far the returns are fairly decent, however I'm getting a lot more signals than my portfolio limit (10 stocks) allows. I'm trying to think of different indicators that I could test, such that it could rank all the signals and pick the best ones.

Any tips on what I should be looking at or what you guys have been experimenting with?

3 responses

With factor approaches, the usual rule is to use lots of different measures and look for the stocks that get broad agreement, even if individual measures are mild, rather than the ones that get great scores by a few measures, or trying to figure out which are the best measures.

For example, you might use raw price momentum, price versus industry momentum, earnings momentum, price/earnings ratio momentum; each one over three different periods, for a total of 12 momentum indicators; and you could use more, 50 or 200 if you like. Say you standardize each one (so it has mean zero and standard deviation one over the universe of stocks). Floor each measure at -2 (however bad the momentum is, it gets no worse than a -2 score) and cap at +2. Add up the measures.

This kind of thing tends to work better than optimizing a smaller set of measures, or using complicated logic, or looking for extreme outliers in one particular kind of momentum.

I noticed that Wes McKinney mentioned in his book on 'pandas' that often people want to created standardized z-scores of the factor ranks, but I thought I must have misread. You are suggesting standardizing the factor itself, which to me makes more sense, if I understand correctly.

Can you suggest any references for taking the next step from a rank-and-chop algorithm on sums of standardized factors, to ongoing portfolio rebalancing with turnover reduction? The former seems to generate a lot of reversal orders, and though I have tried things like allowing some laziness in dropping things, ie. if our minimum z-score sum for inclusion is 1.5*n, don't drop something until it's 1.2*n, I am wondering if there are some simpler or more clever ways of smoothing the holdings through time...

Simon.

You can do it either way, ranks or raw scores. If you do ranks, there's less need to cap and floor, since the distribution is uniform.

The key to remember with factors is you think there is some true underlying effect. In the case of momentum there are several candidates. The simplest is that people who bring information to market lack the capital to take full advantage of their knowledge, so that if there has been net good news about a security in the recent past then there is likely also net good news not yet incorporated into the price. Anyway, whatever your theory, it doesn't argue for one particular measure of momentum versus another. A security that has true momentum, in the sense of lots of unincorporated good or bad news, is more likely than not to stand out on all momentum measures, but not necessarily likely to stand out by a lot on any. So you like the securities that show a lot of agreement, that have the same direction momentum however you measure momentum.

For your second question, I do not have references. Unfortunately, there are not good references on this stuff. But I recommend separating the issue of signal from the issue of trading triggers. Design the most accurate signal you can, ignoring trading costs. Use that to compute your ideal portfolio at any time. Then design a separate algorithm to tell you when to rebalance your existing portfolio to get closer to the ideal.

One reason I suggest this is that it seems to work best for most people. Another is that it makes it easy to manage your strategy. You can add new strategies, or move up and down in size, or make other adjustments and only work with the half of your strategy that is affected by the changes.