how to identify momentum stocks
Back to topic: Using data to build factors


April 2024 · 5 min read

Momentum Stocks


The momentum style of trading is one of the most natural investing styles around and yet it lacks a lot of the things that make value and quality investing popular. First and foremost, momentum investing is based on the popular philosophy that the trend is your friend. If certain stocks are having a good run and increasing significantly in price, there must be a reason for it and all else being equal they will most likely keep increasing in value.

Secondly, momentum investing is not based on company financials explicitly - unlike value and quality factors which tend to take into account multiple balance sheet or cashflow statement items. Instead momentum is purely a price-based signal where the underlying hypothesis from momentum believers is that the price of the stock contains all the relevant financial balance sheet items and other market sensitive information.

What data goes into a momentum strategy ?

Given its reliance on price alone, it is therefore logical that all we need to construct a momentum signal is stock price data. Some investors may augment this price data with the underlying volume data and as a result, may weight certain price moves that occurred with large volume as stronger signals.

For someone who wants to start investigating momentum investing strategies themselves, they can easily use python to start downloading yahoo stock price data and start constructing their own strategies (and we give some sample code at the end of this article). However, at STRATxAI we make all this easily available to you so you don't have to, our platform handles it all for you and you can run instant backtests for your strategies.

How to construct a momentum strategy

Momentum strategies in the factor investing world are mainly based on recent stock returns and constructing portfolios that are rebalanced at a frequency that . One well-known academic paper on this subject is "Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency" by Jegadeesh and Titman.

Their paper showed that stocks that have outperformed over the previous year, have then outperformed again over the subsequent 3m and 6m periods. Since the release of that paper, quantitative hedge funds and asset managers have embraced the concept of momentum and it is an active component of most portfolios. Each implementation is different with some firms focusing on

  • sector-neutral momentum, each stocks momentum controls for the sector momentum that occurred.
  • residual momentum, where the returns used are the returns minus the benchmark market return
  • implemented varying speeds of momentum (i.e swapped out 12 month look-back window for 3 month or 6 month or a blended combination) to match their portfolio turnover

For our purposes and for this article it is ideal to focus on the simplest form of momentum, that is using the trailing 12 month return to rank our stocks to identify the stocks most likely to keep outperforming for the next 3 - 6 months.

Example of a classic momentum 12 month return score for Apple, Tesla, Amazon versus the whole technology sector..
Example of a classic momentum 12 month return score for Apple, Tesla, Amazon versus the whole technology sector..
What indicators to use if my stock universe is small ?

If someone is not interested in the large universe of stocks (i.e thousands) but instead interested in designing and investing in a momentum strategy that focuses on one particular sector - what can you do ?

You can certainly still design an overall strategy based on the method of trailing returns we discussed in the previous section. However given the smaller universe size, potentially just 10-15 stocks, an investor could now start to add other momentum indicators to their strategy builder.

This would most likely be in the form of technical indicators. By utilising the extra information from these additional indicators, it could potentially lead to extra outperformance for your strategy, especially for fast moving sectors. The reason extra indicators can be used is mainly because of the smaller universe. This universe size is critical, especially if an investor wants to visually inspect the technical indicators. Some examples of some indicators may be

  • RSI, relative strength index: measures the speed of price changes to indicate if stocks may be overbought or oversold and potential to revert in the short-term.
  • MACD, moving average convergence divergence: classic trend-following signal. It utilises a moving average of two other moving averages of different look-back windows. The two windows will be based on one shorter window and one longer window. If the moving average of the difference between these two is positive it indicates positive momentum.
  • SO, stochastic oscillator: a momentum indicator that calculates how far the current price is above the low price, in relation to the high-low range over a given historical window. It is beneficial to think of this metric as being like a percentile and if the price is at the highest point it will be at 100. In the short-term, this could potentially mean that some selling could occur as investors take profit.
  • ROC, rate-of-change: a simplistic momentum indicator that measures the percentage increase or decrease in price based on the price at the beginning of your chosen look-back window.

We will be providing all these technical indicators and tools to our users in upcoming product releases.

Example of technical indicators for Tesla.
Example of technical indicators for Tesla.
Python code for calculating trailing returns

In case anyone wants to start downloading and building their own toy strategies, here is some sample python code to try. The code uses yahoo finance to download historical stock price data for the ticker of our choice, in this case Apple. For our pre-packaged strategies at STRATxAI, to make things really easy for our users, we calculate our momentum strategies over thousands of stocks, using our premium data provider Factset.

1# Import libraries
2import pandas as pd
3import numpy as np
4import matplotlib.pyplot as plt
5import yfinance as yf
7# Download stock prices for Apple, ticker = AAPL
8stock_data = yf.download('AAPL', start='2010-01-01') 
9# Take the adjusted close price to account for any corporate actions
10stock_data = stock_data['Adj Close']
11# Calculate the daily stock returns
12stock_rets = stock_data.pct_change()
14# Calculate the rolling 12-month trailing return using 252 trading days 
15rets_12m    = (1 + stock_rets).cumprod().pct_change(252)


More in

Using data to build factors

how to identify value stocks
Value Stocks
October 19, 2022 · 5 min read