Shared conversation

Dynamic Stock Trading Strategy: Combining Momentum and Mean Reversion

Explore a dynamic stock trading strategy that blends momentum and mean reversion techniques for the top 25 market cap stocks of 2021. Learn how to identify buying opportunities within established uptrends using moving averages and RSI.

Open interactive viewStart a new chat

Read the conversation below. Open the interactive view for charts, attachments, and continuing this conversation.

Aurora

Hello. Would you like to perform some financial analysis? Maybe on Target or Apple?

User

What is the difference between mean reversion, break out, and momentum strategies?

Aurora

Here's a breakdown of the differences between mean reversion, breakout, and momentum strategies:

  • Mean Reversion: This strategy is based on the idea that prices and returns eventually move back towards their historical average or mean. Traders using this strategy look for assets that have deviated significantly from their average price, expecting them to revert. They might buy an asset that has dropped sharply below its average or sell an asset that has risen significantly above its average.

  • Breakout: This strategy focuses on identifying price movements that break through predefined levels of support or resistance. The assumption is that once a price breaks out of a range (either above resistance or below support), it will continue to move in that direction, often with increased volume. Traders might buy when the price breaks above a resistance level or sell (or short) when the price breaks below a support level.

  • Momentum: This strategy operates on the principle that existing trends are likely to continue. Momentum traders buy assets that have shown strong upward price trends recently and sell (or short) assets that have shown strong downward trends. They aim to ride the trend until it shows signs of reversal.

In summary:

  • Mean Reversion bets on prices returning to their average.
  • Breakout bets on prices continuing in a new direction after breaking a key level.
  • Momentum bets on existing trends continuing.

User

  • A simple moving average is above a longer simple moving average
  • A simple moving average is above a price
  • A simple moving average is below a price
  • A stock is below a lower bollinger band
  • A stock is above a lower bollinger band
  • Relative strength index is below a value (30)
  • Relative strength index is above a value (30)
  • A stock’s rate of change increases (and is positive)
  • A stock’s rate of change decreases (and is negative)

These are all different market conditions. Which ones are breakout, which are momentum, and which are mean reverting?

Aurora

Here's how those market conditions generally align with the trading strategy types:

Mean Reversion:

  • A simple moving average is above a price (Suggests price is below average and might revert up)
  • A simple moving average is below a price (Suggests price is above average and might revert down)
  • A stock is below a lower Bollinger band (Indicates an oversold condition, expecting a bounce back towards the mean)
  • A stock is above a lower Bollinger band (Indicates the stock is moving away from the extreme low, potentially reverting towards the mean)
  • Relative strength index (RSI) is below a value like 30 (Typically indicates an oversold condition, expecting a price increase)

Momentum:

  • A shorter simple moving average is above a longer simple moving average (Indicates an upward trend is in place)
  • Relative strength index (RSI) is above a value like 30 (Indicates the stock is not oversold; if rising, suggests upward momentum)
  • A stock’s rate of change increases (and is positive) (Indicates accelerating upward price movement)
  • A stock’s rate of change decreases (and is negative) (Indicates accelerating downward price movement)

Breakout:

  • None of these conditions directly represent a classic breakout strategy. Breakouts typically involve price crossing significant support or resistance levels, or trading range boundaries. While momentum indicators might confirm a breakout, these specific conditions focus more on trend continuation (momentum) or reversal to the average (mean reversion).

User

  • A simple moving average is above a longer simple moving average
  • A simple moving average is above a price
  • A simple moving average is below a price
  • A stock is below a lower bollinger band
  • A stock is above a lower bollinger band
  • Relative strength index is below a value (30)
  • Relative strength index is above a value (30)
  • A stock’s rate of change increases (and is positive)
  • A stock’s rate of change decreases (and is negative)

These are all different market conditions. Which ones are breakout, which are momentum, and which are mean reverting?

Aurora

Here's how those market conditions generally align with the trading strategy types:

Mean Reversion:

  • A simple moving average is above a price (Suggests price is below its average and might revert upwards)
  • A simple moving average is below a price (Suggests price is above its average and might revert downwards)
  • A stock is below a lower Bollinger band (Indicates an oversold condition relative to recent volatility, expecting a bounce back towards the mean)
  • A stock is above a lower Bollinger band (Indicates the stock is moving away from the extreme low, potentially reverting towards the mean)
  • Relative strength index (RSI) is below a value like 30 (Typically indicates an oversold condition, suggesting a potential price increase)

Momentum:

  • A shorter simple moving average is above a longer simple moving average (Indicates an upward trend is in place, often called a 'golden cross' if specific MAs are used)
  • Relative strength index (RSI) is above a value like 30 (Indicates the stock is not oversold; if the RSI is rising and above 30 (or especially above 50 or 70), it suggests upward momentum)
  • A stock’s rate of change increases (and is positive) (Indicates accelerating upward price movement)
  • A stock’s rate of change decreases (and is negative) (Indicates accelerating downward price movement)

Breakout:

  • None of these conditions directly represent a classic breakout strategy. Breakouts typically involve price crossing significant, predefined support or resistance levels, or trading range boundaries. While momentum indicators might confirm a breakout after it happens, these specific conditions focus more on trend continuation (momentum) or reversal to the average (mean reversion).

User

What are the top 25 stocks by market cap as of the end of 2021?

Aurora

Okay, here's a summary of the top 25 stocks by market capitalization based on the data available as of December 31, 2021.

Top 25 Stocks by Market Cap (as of 2021-12-31)

Ticker Market Cap (USD) Price Date
AAPL $2,963,222,636,670 2021-12-31
MSFT $2,533,019,152,992 2021-12-31
GOOG $1,926,437,348,800 2021-12-31
AMZN $1,683,872,000,000 2021-12-31
TSLA $1,054,666,440,000 2021-12-31
META $946,488,900,000 2021-12-31
NVDA $735,250,000,000 2021-12-31
TSM $623,936,814,508 2021-12-31
TM $562,881,338,711 2021-12-31
UNH $472,941,186,675 2021-12-31
JPM $471,455,455,000 2021-12-31
V $463,644,829,324 2021-12-31
JNJ $450,495,054,233 2021-12-31
HD $437,984,412,427 2021-12-31
WMT $401,352,474,088 2021-12-31
PG $400,481,919,134 2021-12-31
BAC $365,996,985,000 2021-12-31
MA $358,215,216,043 2021-12-31
PFE $331,624,800,000 2021-12-31
DIS $281,536,729,786 2021-12-31
AVGO $273,889,478,035 2021-12-31
ACN $272,251,353,921 2021-12-31
ADBE $269,807,148,000 2021-12-31
CSCO $267,277,925,060 2021-12-31
NFLX $266,637,466,767 2021-12-31

Summary & Observations

  • Mega-Cap Dominance: The list clearly shows the dominance of mega-cap stocks at the end of 2021, with Apple (AAPL) and Microsoft (MSFT) leading with market caps well over $2 trillion. Several others, including Alphabet (GOOG), Amazon (AMZN), and Tesla (TSLA), surpassed the $1 trillion mark.
  • Tech Heavy: The top of the list is heavily weighted towards technology companies (AAPL, MSFT, GOOG, AMZN, TSLA, META, NVDA, TSM). This reflects the significant growth and market influence of the tech sector during that period.
  • Sector Diversity: While tech is prominent, the list also includes companies from various other sectors like healthcare (UNH, JNJ, PFE), finance (JPM, V, BAC, MA), consumer discretionary (HD, DIS, NFLX), consumer staples (WMT, PG), and industrials (TM).
  • Date Specific: It's important to remember this data reflects market capitalizations specifically on December 31, 2021. Market caps fluctuate constantly, and this list would look different today.

Disclaimers

  • This analysis is based on historical data from a specific point in time (December 31, 2021). Market conditions and company valuations change frequently.
  • As an AI, I can process and present data, but my analysis might contain inaccuracies or overlook nuances. Always verify information from reliable financial sources.
  • This information is not financial advice. Consult with a qualified financial advisor before making any investment decisions.

User

Using everything from this conversation, create a mean reverting AND (momentum or breakout) strategy for all of these stocks. You can either have one strategy or multiple. We should be looking at technical indicators to see what the market looks like and dynamically changing the strategies. You create the rest of the rules but it must be a rebalancing strategy

Aurora

Description:
This portfolio implements a dynamic rebalancing strategy that combines elements of both momentum and mean reversion for the top 25 stocks by market cap as of the end of 2021. The core idea is to identify stocks currently exhibiting strong upward momentum (a momentum characteristic) but experiencing a short-term pullback (a mean reversion characteristic), suggesting a potential buying opportunity within an established uptrend.
The strategy operates on the following universe of 25 stocks: Apple (AAPL), Microsoft (MSFT), Alphabet (GOOG), Amazon (AMZN), Tesla (TSLA), Meta Platforms (META), NVIDIA (NVDA), Taiwan Semiconductor Manufacturing (TSM), Toyota Motor (TM), UnitedHealth Group (UNH), JPMorgan Chase (JPM), Visa (V), Johnson & Johnson (JNJ), The Home Depot (HD), Walmart (WMT), Procter & Gamble (PG), Bank of America (BAC), Mastercard (MA), Pfizer (PFE), Walt Disney (DIS), Broadcom (AVGO), Accenture (ACN), Adobe (ADBE), Cisco Systems (CSCO), and Netflix (NFLX).
The rebalancing logic works as follows:

  1. Momentum Filter: It first identifies stocks from the list where the 50-day Simple Moving Average (SMA) is currently above the 200-day Simple Moving Average. This condition suggests the stock is in a medium-to-long-term uptrend.
  2. Mean Reversion Entry Signal: From the stocks that pass the momentum filter, it then looks for those where the 14-day Relative Strength Index (RSI) is below 40. An RSI below 40 (a slightly less extreme level than the typical 30) indicates a recent pullback or consolidation within the broader uptrend, potentially offering an attractive entry point before the price reverts towards its upward trajectory.
    The portfolio rebalances monthly (approximately every 30 days), selecting only those stocks that meet both the momentum and mean reversion criteria at the time of rebalancing. The selected stocks are weighted equally within the portfolio. This dynamic approach aims to capitalize on dips within established uptrends across this list of large-cap stocks. The portfolio starts with an initial value of $10,000. Note that the strategy evaluates all 25 stocks each month to determine eligibility based on the defined technical conditions.
    JSON:

User

Backtest across the past year

Aurora

Okay, I will generate the backtest configuration for the "Momentum-Mean Reversion Hybrid Rebalance" portfolio using the strategy you just created. The backtest will cover the past year, from April 18, 2024, to April 18, 2025.

User

Backtest YTD

Aurora

Okay, I will set up a backtest configuration for your "Momentum-Mean Reversion Hybrid Rebalance" portfolio to run from the beginning of this year (Year To Date) until today.
Here is the configuration:

Open interactive viewStart a new chat