PROTECTED SOURCE SCRIPT

SPY-2h (E.Trader) - Long-Only Strategy

10
Summary
Strategy on SPY, 2h timeframe (2000-2025).
Initial capital: 100,000 USD, 100% reinvest.
Long-only strategy with realistic commissions and slippage (Interactive Brokers: $0.005/share, 3 ticks).

Key results (2000-2025)
• Total P&L: +1,792,104 USD (+1,739.88%)
• CAGR: 11.4% (vs Buy & Hold: 6.7%) → ~1.7x higher annualized return
• Profit factor: 3.23
• Winning trades: 67.43%
• Max drawdown: 21.56%
• Time in the market: ~59% (trading days basis)
• Buy & Hold return: +358.61% → Strategy outperforms by ~4.8x

Strategy logic
• Restricted to SPY on ARCA, in 2h timeframe
• Long entries only (no shorts)
• Exploits two major biases: 1) trends and 2) overreactions
• Excludes very high VIX periods
• Implements calculated stop-losses
• Integrates commission and slippage to reflect real trading conditions (based on Interactive Brokers usage)

Focus 2008-2009 (financial crisis)
• Total P&L: +35,301 USD (+35.30%)
• Profit factor: 3.367
• Winning trades: 80%
• Max drawdown: 15.05%
Even at the height of 2008, the strategy remained profitable, while Buy & Hold was still showing a -22% loss two years later.

Focus 2020 (COVID crash)
• Total P&L: +22,463 USD (+22.46%)
• Profit factor: 4.152
• Winning trades: 72.73%
• Max drawdown: 9.91%
During the COVID mini-crash, the strategy still ended the year +22.46%, almost double Buy & Hold (+12.52%), with limited drawdown.

Observations
• Strong outperformance vs Buy & Hold with less exposure
• Robust across crises (2008, COVID-2020)
• Limited drawdowns, faster recoveries

Model validation and parameter weighting
To check robustness and avoid overfitting, I use a simple weighted-parameters ratio (explained in more detail here: Reddit post).

In this strategy:
• 4 primary parameters (weight 1)
• 5 secondary parameters (weight 0.5)
• Weighted param count = 4×1 + 5×0.5 = 6.5
• Total trades = 267
• Ratio = 267 ÷ 6.5 ≈ 41

Since this ratio is well above the 25 threshold I usually apply, it appears the model is not overfitted according to my experience — especially given its consistent gains even through crises such as 2008 and COVID-2020.

Disclaimer
This is an educational backtest. It does not constitute investment advice.
Past performance does not guarantee future results. Use at your own risk.

Further notes
In practice, systematic strategies like this are usually executed through automation to avoid human bias and ensure consistency. For those interested, I share more about my general approach and related tools here (personal site): emailtrader.app

Pernyataan Penyangkalan

Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.