1. Introduction
I would like to share a high-performance strategy that achieved a 376% cumulative return (Jan 2021 – Present) on QuantConnect. The strategy focuses on capturing short-term rebounds in Mag-7 stocks while employing a drastic "Total Exit" rule to Gold during market downturns.
2. Core Logic (The "Catch and Protect" System)
The algorithm operates on two primary engines:
Engine 1: RSI Bottom Fishing (2x Leverage)
It monitors Mag-7 stocks (AAPL, MSFT, AMZN, NVDA, META, GOOGL).
When an individual stock's RSI drops below 30, it enters a 2x leveraged position (15% weight).
It exits the leverage when the RSI recovers to 55, capturing the "mean reversion" effect.
Engine 2: Total Portfolio Protection (The Exit Switch)
It holds the 1x base assets during golden crosses (50/200 SMA).
Crucial Rule: If a stock drops 7% from its highest price or a Dead Cross occurs, the algorithm liquidates EVERYTHING (all tech, Tesla, defense) and shifts 90% of the portfolio into Gold (GLD).
This "All-or-Nothing" approach effectively bypassed the major drawdowns of 2022.
3. Performance & Metrics
Cumulative Return: 376.20%
PSR (Probabilistic Sharpe Ratio): 78.6%
Key Behavior: As seen in the equity curve, the strategy remains flat (in Gold) during volatile periods and spikes aggressively during tech rallies.
4. Discussion & Feedback Requested
I found that the "7% Trailing Stop + Total Liquidation" rule was the biggest driver of outperformance, but it also caused some flat periods (side-ways) in 2023-2024. I'd love to hear your thoughts on:
Regime Switching: Instead of a fixed 7% stop, would an ATR-based volatility stop be more efficient to avoid "false exits"?
Gold as a Haven: During high-interest rate environments, should I consider Cash (BIL/SHV) instead of Gold (GLD) as the primary exit asset?
Tesla Special Case: I have a separate RSI logic for TSLA/TSLL. Does anyone have experience pairing TSLA's high volatility with a Mag-7 trend-following system?

Marco Di Prima
Here some brief feedback:
Universe selection - "Mag-7" wasn't a thing in 2021, so you're kind of picking winners with hindsight. Maybe try running it on "top 7 tech by market cap" rebalanced over time instead?
Backtest length - 2021-present is a pretty short window and happens to be when buying tech dips worked great. Would love to see how it holds up through 2008 or early 2020.
Leveraged entries - RSI<30 with 2x is bold. In longer downtrends (think 2000-2002), RSI can stay oversold while prices keep falling. Maybe require a trend filter before going leveraged?
The 7% stop - Curious if you've tested other values like 5% or 10%? If results change a lot with small tweaks, might be overfit to 2022 specifically.
Jared Broad
Nice share! Please post it to the new strategies library!
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
최수정
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!