Shared conversation on NexusTrade
Mswing Trading Strategy: Portfolio Creation and Backtesting
A conversation detailing the creation and backtesting of various portfolios based on the Mswing momentum indicator, using top stocks by market cap from 2018, 2020 and 2022, and backtesting from 2019 to present.
User: what are the top 100 stocks by market cap as of 2018?
Aurora: Here's a summary of the top stocks by market capitalization as of December 31, 2018: ### Top Stocks by Market Capitalization (December 31, 2018) | Ticker | Market Cap (USD) | Date | | :----- | :---------------- | :---------- | | [MSFT](https://nexustrade.io/stock/MSFT) | $788,792,620,000 | 2018-12-31 | | [AAPL](https://nexustrade.io/stock/AAPL) | $764,652,063,780 | 2018-12-31 | | [AMZN](https://nexustrade.io/stock/AMZN) | $752,486,970,000 | 2018-12-31 | | [GOOGL](https://nexustrade.io/stock/GOOGL) | $735,504,206,431.51 | 2018-12-31 | | [GOOG](https://nexustrade.io/stock/GOOG) | $728,923,127,414.00 | 2018-12-31 | | [BRK-B](https://nexustrade.io/stock/BRK-B) | $503,371,644,366.06 | 2018-12-31 | | [BRK-A](https://nexustrade.io/stock/BRK-A) | $502,124,274,000 | 2018-12-31 | | [META](https://nexustrade.io/stock/META) | $382,618,937,500 | 2018-12-31 | | [JNJ](https://nexustrade.io/stock/JNJ) | $351,996,780,000.00 | 2018-12-31 | | [JPM](https://nexustrade.io/stock/JPM) | $331,574,237,220 | 2018-12-31 | | [V](https://nexustrade.io/stock/V) | $304,253,640,000 | 2018-12-31 | | [XOM](https://nexustrade.io/stock/XOM) | $291,442,191,798.57 | 2018-12-31 | | [WMT](https://nexustrade.io/stock/WMT…
User: Meet Mswing: The Trading Tool That Does It All Algo Insights Algo Insights 5 min read · Mar 26, 2025 Ever wished for one indicator that could cut through the noise and just tell you what’s up with a stock? Say hello to Mswing — a little gem inspired by Sakata Homma, the Japanese trading legend who probably forgot more about markets than we’ll ever know. They call it the “one indicator to rule them all,” and honestly, it’s not hype. It’s a momentum tracker, a strength gauge, a signal machine, and even a market mood ring. Let’s unpack it step by step. Press enter or click to view image in full size So, What’s Mswing Anyway? Mswing is like a speedometer for stock prices. It looks at how fast a stock’s moving over 20 and 50 days — two windows that give you the short and long of it. Simple rule: if it’s above zero, the stock’s got some upward juice. Below zero? It’s slumping. But here’s where it gets fun. Slap an EMA — exponential moving average, for the uninitiated — on top of Mswing, and you’ve got a cheat sheet for momentum. I break it down like this: Mswing’s above zero and above its EMA: The stock’s not just climbing — it’s picking up speed. Green light, baby. Above zero but below…
Aurora: **Description**: Based on the provided article, we've created two distinct portfolios that utilize the "Mswing" momentum indicator. Both portfolios trade the top 100 stocks by market cap from the end of 2018 (excluding GOOGL and BRK-A), rebalance monthly, and are limited to holding the top 7 qualifying stocks, weighted by market capitalization. Each portfolio interprets the Mswing indicator in a unique way to capture momentum. The Mswing indicator is defined as the sum of the 20-day Price Rate of Change and the 50-day Price Rate of Change: `Mswing = PriceRateOfChange(asset, 20) + PriceRateOfChange(asset, 50)`. 1. **Mswing "Green Light" Momentum Portfolio**: This strategy is based on the article's "Green light, baby" condition, which identifies stocks with strong and accelerating upward momentum. It filters for stocks where the Mswing indicator is not only positive (above zero) but also trading above its own 9-day Exponential Moving Average (EMA). This dual condition ensures the portfolio selects stocks that are in a confirmed uptrend and are gaining strength. 2. **Mswing "Breakout" Portfolio**: This strategy interprets the "Getting In" section of the article, focusing on breakout…
User: Create two more which excludes the position filter and implements MSwing as stated in the original article
Aurora: **Description**: Here are two new portfolios based on the Mswing momentum indicator, as described in the article. Both strategies use the list of top stocks from 2018 (excluding GOOGL and BRK-A) and rebalance monthly to invest in the top 7 qualifying stocks, weighted by market capitalization. Crucially, these versions remove the previous position-keeping filter, adhering strictly to the Mswing entry signals for each rebalance. The Mswing indicator is calculated as the sum of the 20-day and 50-day price rates of change: `Mswing = PriceRateOfChange(asset, 20) + PriceRateOfChange(asset, 50)`. 1. **Mswing "Green Light" Strategy (Pure Signal)**: This portfolio implements the core "Green light, baby" condition from the article. It selects stocks that are exhibiting strong, accelerating momentum by filtering for companies where the Mswing indicator is both above zero and also above its own 9-day Exponential Moving Average (EMA). This ensures the portfolio only holds stocks in a confirmed and strengthening uptrend, without retaining any positions that fall out of favor. 2. **Mswing "Breakout" Strategy (Pure Signal)**: This portfolio focuses on the "double whammy" breakout signal mentioned…
User: Backtest all 4 portfolios from 01/01/2019 to 01/01/2021
Aurora: I'll create a backtest configuration for the four Mswing-based portfolios you've defined, covering the period from January 1, 2019, to January 1, 2021. Here's the JSON configuration:
User: Backtest all 4 portfolios from 01/01/2020 to 01/01/2022
Aurora: I'll create a backtest configuration for all four of your Mswing-based portfolios, covering the period from January 1, 2020, to January 1, 2022.
User: what are the top 100 stocks by market cap as of 2020?
Aurora: Here is a summary of the top stocks by market capitalization as of the end of 2020. ### Top Stocks by Market Capitalization (December 31, 2020) | Ticker | Market Cap (USD) | Date | | :--- | :--- | :--- | | [AAPL](https://nexustrade.io/stock/AAPL) | $2,289,767,771,490 | 2020-12-31 | | [MSFT](https://nexustrade.io/stock/MSFT) | $1,698,621,540,000 | 2020-12-31 | | [AMZN](https://nexustrade.io/stock/AMZN) | $1,667,548,160,000 | 2020-12-31 | | [GOOGL](https://nexustrade.io/stock/GOOGL) | $1,202,049,415,803 | 2020-12-31 | | [GOOG](https://nexustrade.io/stock/GOOG) | $1,201,528,169,252 | 2020-12-31 | | [META](https://nexustrade.io/stock/META) | $789,705,560,000 | 2020-12-31 | | [TSLA](https://nexustrade.io/stock/TSLA) | $779,765,338,950 | 2020-12-31 | | [BABA](https://nexustrade.io/stock/BABA) | $640,618,416,250 | 2020-12-31 | | [TSM](https://nexustrade.io/stock/TSM) | $565,489,736,963 | 2020-12-31 | | [BRK-B](https://nexustrade.io/stock/BRK-B) | $551,861,266,020 | 2020-12-31 | | [BRK-A](https://nexustrade.io/stock/BRK-A) | $537,013,490,845 | 2020-12-31 | | [V](https://nexustrade.io/stock/V) | $482,955,840,000 | 2020-12-31 | | [JNJ](https://nexustrade.io/stock/JNJ) | $420,094,434,000 | 2…
User: Recreate the "Mswing Breakout Strategy" and the "Mswing Breakout Strategy (Pure Signal) " using the updated list of stocks
Aurora: **Description**: Here are the two "Mswing Breakout" portfolios, recreated using the updated list of the top 100 stocks by market cap from the end of 2020. Both strategies maintain their original logic, rebalancing monthly to hold the top 7 qualifying stocks, weighted by their market capitalization. The core of the Mswing indicator remains the same, defined as the sum of the 20-day and 50-day price rates of change: `Mswing = PriceRateOfChange(asset, 20) + PriceRateOfChange(asset, 50)`. 1. **Mswing Breakout Strategy (2020 Stocks)**: This portfolio uses the combined filter. It selects stocks for rebalancing if they meet the primary breakout criteria: the Mswing indicator is above its 9-day EMA, and the stock's price is above its 50-day SMA. Additionally, it includes the position-keeping filter, which allows a stock to remain in the portfolio if it's already held (`PositionValue > 0`) and has not incurred a loss of 10% or more (`PositionPercentChange > -10`), even if it no longer meets the primary breakout signal. This helps to reduce portfolio turnover. 2. **Mswing Breakout Strategy (Pure Signal, 2020 Stocks)**: This portfolio adheres strictly to the breakout signal from the article,…
User: Backtest these 2 portfolios from 01/01/2020 to 01/01/2022
Aurora: Of course. I'll set up a backtest for the "Mswing Breakout Strategy (2020 Stocks)" and "Mswing Breakout Strategy (Pure Signal, 2020 Stocks)" portfolios to run from January 1, 2020, to January 1, 2022.
User: Backtest these 2 portfolios from 01/01/2021 to 01/01/2023
Aurora: Of course. I'll set up a backtest for your two Mswing portfolios using the 2020 stock list, running from January 1, 2021, to January 1, 2023.
User: what are the top 100 stocks by market cap as of 2022?
Aurora: Of course. Here is a summary of the top 100 stocks by market capitalization as of December 30, 2022, the last trading day of that year. ### Top Stocks by Market Capitalization (December 30, 2022) | Ticker | Market Cap (USD) | Date | | :--- | :--- | :--- | | [AAPL](https://nexustrade.io/stock/AAPL) | $2,094,272,157,450 | 2022-12-30 | | [MSFT](https://nexustrade.io/stock/MSFT) | $1,795,052,700,000 | 2022-12-30 | | [GOOG](https://nexustrade.io/stock/GOOG) | $1,162,096,810,000 | 2022-12-30 | | [GOOGL](https://nexustrade.io/stock/GOOGL) | $1,155,548,310,000 | 2022-12-30 | | [AMZN](https://nexustrade.io/stock/AMZN) | $856,632,000,000 | 2022-12-30 | | [BRK-A](https://nexustrade.io/stock/BRK-A) | $684,192,855,774 | 2022-12-30 | | [BRK-B](https://nexustrade.io/stock/BRK-B) | $681,391,512,233 | 2022-12-30 | | [UNH](https://nexustrade.io/stock/UNH) | $502,610,640,000 | 2022-12-30 | | [DFLI](https://nexustrade.io/stock/DFLI) | $480,329,427,060 | 2022-12-30 | | [JNJ](https://nexustrade.io/stock/JNJ) | $470,118,645,000 | 2022-12-30 | | [XOM](https://nexustrade.io/stock/XOM) | $463,354,273,520 | 2022-12-30 | | [V](https://nexustrade.io/stock/V) | $439,620,160,000 | 2022-12-30 | | [TSLA](https://…
User: Recreate the "Mswing Breakout Strategy" and the "Mswing Breakout Strategy (Pure Signal) " using the updated list of stocks
Aurora: **Description**: Here are the two "Mswing Breakout" portfolios, updated to use the list of the top 100 stocks by market capitalization from the end of 2022. Both strategies maintain their original logic, rebalancing monthly to invest in the top 7 qualifying stocks, weighted by market capitalization. The Mswing indicator is defined as the sum of the 20-day and 50-day price rates of change: `Mswing = PriceRateOfChange(asset, 20) + PriceRateOfChange(asset, 50)`. 1. **Mswing Breakout Strategy (2022 Stocks)**: This portfolio uses the combined filter. It selects stocks that meet the primary breakout criteria (Mswing > 9-day EMA of Mswing AND Price > 50-day SMA). It also includes a position-keeping rule, allowing a stock to be held if it's already in the portfolio (`PositionValue > 0`) and hasn't dropped by 10% or more (`PositionPercentChange > -10`), which helps to reduce unnecessary trades. 2. **Mswing Breakout Strategy (Pure Signal, 2022 Stocks)**: This portfolio adheres strictly to the breakout signal. It will only invest in stocks that meet the dual condition at the time of rebalancing: the Mswing indicator must be above its 9-day EMA, and the price must be above its 50-day SMA. Thi…
User: Backtest these 2 portfolios from 01/01/2023 to 01/01/2025
Aurora: I'll set up a backtest for your two Mswing portfolios, using the 2022 stock list, to run from January 1, 2023, to January 1, 2025.
User: Backtest these 2 portfolios from 01/01/2024 to today
Aurora: I'll set up a backtest for your two Mswing portfolios using the 2022 stock list, running from January 1, 2024, to today, August 15, 2025.