Momentum

Calculate the price momentum and reversal signals of the asset pricing literature: each ticker’s return over a window of past months, or its average return in the same calendar month of earlier years.

Stocks that rose most over the past year, leaving out the most recent month, kept outperforming over the next months (momentum, Jegadeesh and Titman, 1993), while the winners of the last month (Jegadeesh, 1990) and of the three to five years before the last (De Bondt and Thaler, 1985) underperformed (reversal). Novy-Marx (2012) found that the return of months 12 to 7 drives most of the momentum, and Heston and Sadka (2008) that a stock’s return in a calendar month repeats in that month of later years (seasonality), while its return in the other months reverses.

With month t the month the signal predicts, the month after the last one used, the formula is as follows:

\[\text{Return}(a, b) = \prod_{m=b}^{a} (1 + R_{t-m}) - 1\] \[\text{Momentum}_{12,2} = \text{Return}(12, 2)\] \[\text{Momentum}_{6,2} = \text{Return}(6, 2)\] \[\text{Intermediate Momentum} = \text{Return}(12, 7)\] \[\text{Short Term Reversal} = \text{Return}(1, 1)\] \[\text{Medium Term Reversal} = \text{Return}(18, 13)\] \[\text{Long Term Reversal} = \text{Return}(60, 13)\] \[\text{Seasonal} = \frac{\sum_{k=K_{1}}^{K_{2}} R_{t-12k}}{K_{2} - K_{1} + 1}\] \[\text{Off Season} = \frac{\sum_{m=12 \cdot K_{1} - 11}^{12 \cdot K_{2}} R_{t-m} - \text{Seasonal} \cdot (K_{2} - K_{1} + 1)}{11 \cdot (K_{2} - K_{1} + 1)}\]

Where \(R_{t - m}\) is the monthly return of month t-m, so Return(a, b) compounds months t-a to t-b, and (\(K_{1} , K_{2}\)) are the first and last year of years. The Seasonal signal averages the returns of the same calendar month in those years and the Off Season signal the returns of the other months of those years. The value of a month is the signal at its end, which predicts the next month’s return.

Also known as: momentum, 12-1 momentum, 2-12 momentum, price momentum, intermediate momentum, echo momentum, short-term reversal, long-term reversal, return seasonality, Heston-Sadka seasonality.

Example · AAPL, MSFT, NVDA, KO, XOM · 2024 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_momentum:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "NVDA", "KO", "XOM"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2024-01-01",
    end_date="2025-12-31",
)

toolkit.performance.get_momentum()

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

What was the 12-month momentum, leaving out the latest month, of Apple, Microsoft, Nvidia, Coca-Cola and ExxonMobil at the end of each of the last five months of 2025?

Which returns:

Parameters

get_momentum accepts the following parameters.

ParameterTypeDescriptionExample
methodstrThe signal. Options are: “twelve_minus_one” (momentum 12-2), “six_minus_one” (momentum 6-2), “intermediate” (12-7), “short_term_reversal” (1-1), “medium_term_reversal” (18-13), “long_term_reversal” (60-13), “seasonal” (the same calendar month), “off_season” (the other months). Defaults to “twelve_minus_one”."twelve_minus_one"
yearstuple[int, int]The first and last year back of the seasonal and off-season averages, such as (1, 1) for the last year or (6, 10). Defaults to (2, 5), the years of Heston and Sadka’s main result.(2, 5), the years of Heston and Sadka's main result
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the values. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
transformstr | list[str] | NoneTime series steps applied in order, such as “sma:12” (moving average), “ema:12”, “std:12”, “zscore:60”, “percentile:120”, “yoy”, “pct_change:3,annualize:3”, “log”, “diff”, “cumsum” or “hp_trend” and “hp_cycle” (Hodrick-Prescott), before growth. A window needs that many periods of history, so the first periods can be empty. Defaults to None.None
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Paper Jegadeesh, N. and Titman, S. (1993). “Returns to Buying Winners and Selling Losers: Implications for Stock Market Efficiency.” The Journal of Finance, 48(1), 65-91.
  • Paper Jegadeesh, N. (1990). “Evidence of Predictable Behavior of Security Returns.” The Journal of Finance, 45(3), 881-898.
  • Paper Novy-Marx, R. (2012). “Is Momentum Really Momentum?” Journal of Financial Economics, 103(3), 429-453.
  • Paper De Bondt, W.F.M. and Thaler, R. (1985). “Does the Stock Market Overreact?” The Journal of Finance, 40(3), 793-805.
  • Paper Heston, S.L. and Sadka, R. (2008). “Seasonality in the Cross-Section of Stock Returns.” Journal of Financial Economics, 87(2), 418-445.
  • Paper Chen, A.Y. and Zimmermann, T. (2022). “Open Source Cross-Sectional Asset Pricing.” Critical Finance Review, 11(2), 207-264.
Share