SPY (SPDR S&P 500 ETF) EMA(30)/EMA(50) crossover strategy - with 3.0x leverage via call options
Backtest a SPY (SPDR S&P 500 ETF) crossover strategy: it buys when 30-day EMA crosses above 50-day EMA by 1.0% of the stock price, it sells when 30-day EMA falls below 50-day EMA by 1.0% of the stock price. Uses 3.0x leverage via call options with 3.0% annual time decay. Uninvested cash earns 4.0% risk-free interest.
Backtest Assumptions and Key Details
- If the strategy involves regular stock positions, we use the adjusted close price for backtesting. This reflects total return by incorporating dividends.
- If the strategy uses call options to simulate leveraged exposure, we instead use the close price (not adjusted), because dividends are not received when holding options.
- When using call options, we simulate time decay in a simplified way. You can specify a time decay rate (e.g., 3%), which means that if the stock price stays flat for one year, the strategy loses 3% of the current stock price per share of exposure due to decay.
- If leverage is applied via margin borrowing, we enforce a 25% maintenance margin requirement (as set by FINRA). This places a hard cap at 4x leverage, beyond which a margin call is immediate. In practice, 3x leverage is the more realistic limit, since the risk of a margin call increases sharply beyond that.
- All trades are assumed to execute at the closing price on the day a signal occurs.
- The backtest includes realistic cash flow effects, such as interest earned on idle cash and borrowing costs incurred when using margin.
Performance Overview
Portfolio Value Trend (Normalized)
Over 32.43 years, portfolio value grew from $10,000.00 to $1,889,526.88.
Beginning with an initial investment of $10,000.00 on 1993-01-29, the portfolio value reached a value of $1,889,526.88 by 2025-07-05. This represents a 18,795.27% total gain over 32.43 years, equivalent to 17.54% annualized. The return is strong and meaningfully higher than long-term market averages. It suggests effective asset selection or strategy execution during a favorable environment.
Drawdown and Risk
The maximum drawdown recorded during this period was 50.76%. This drawdown began after a peak portfolio value of $249,008.72 on 2011-04-29, and reached its lowest point on 2012-06-04 when the portfolio value fell to $122,599.83. The drawdown lasted for 402 days.
Maximum Drawdown
Max drawdown: 50.76% over 402 days.
The drawdown was substantial, though not uncommon for long-term equity strategies that span full market cycles. This level suggests exposure to significant corrections or crashes. The maximum drawdown lasted over a year, indicating an extended period of underperformance. This duration is typical of major corrections or bear markets.
The Calmar Ratio โ annualized return divided by maximum drawdown โ was 0.35, reflecting the tradeoff between return and volatility. A moderate return-to-risk profile. The strategy handled risk reasonably well while delivering decent returns.
What the Strategy Suggests Today
The 30-day EMA is $600.54, and the 50-day EMA is $592.01, for a difference of $8.54. The current stock price is $625.34, and 1.0% of that is $6.25. Since the difference is sufficient and exceeds the threshold, the buy signal is active.
The 30-day EMA is $600.54, and the 50-day EMA is $592.01, for a difference of $8.54. The current stock price is $625.34, and 1.0% of that is $6.25. Since the difference is insufficient and does not exceed the threshold, the sell signal is not active.
If you have been following this strategy, you are currently holding stocks or call options. No sell signal is active. The strategy suggests continuing to hold the current position.
Transaction Timeline
We began our backtest on 1993-01-29 with $10,000.00 starting capital.
On 1995-03-17, the 30-day EMA at $48.64 crossed above the 50-day EMA at $48.14, exceeding it by 1% of the stock price ($49.56). We invested $10,870.16 โ which includes $870.16 in interest earned while holding cash for 777 days โ gaining exposure to 657.97 equivalent shares.
On 1998-08-31, the 30-day EMA at $108.72 fell below the 50-day EMA at $109.91 by 1% of the stock price ($96.00), triggering our exit. After holding the position for 1263 days, we exited leaving $37,914.95 in available cash.
On 1998-11-13, the 30-day EMA at $108.74 crossed above the 50-day EMA at $107.58, exceeding it by 1% of the stock price ($113.22). We invested $38,217.44 โ which includes $302.48 in interest earned while holding cash for 74 days โ gaining exposure to 1,012.66 equivalent shares.
On 2000-10-12, the 30-day EMA at $143.58 fell below the 50-day EMA at $144.97 by 1% of the stock price ($133.13), triggering our exit. After holding the position for 699 days, we exited leaving $51,702.95 in available cash.
On 2003-05-05, the 30-day EMA at $89.60 crossed above the 50-day EMA at $88.64, exceeding it by 1% of the stock price ($93.03). We invested $57,163.61 โ which includes $5,460.67 in interest earned while holding cash for 935 days โ gaining exposure to 1,843.39 equivalent shares.
On 2008-01-15, the 30-day EMA at $144.47 fell below the 50-day EMA at $145.88 by 1% of the stock price ($138.17), triggering our exit. After holding the position for 1716 days, we exited leaving $114,825.66 in available cash.
On 2009-05-04, the 30-day EMA at $84.40 crossed above the 50-day EMA at $83.41, exceeding it by 1% of the stock price ($90.88). We invested $120,834.49 โ which includes $6,008.83 in interest earned while holding cash for 475 days โ gaining exposure to 3,988.81 equivalent shares.
On 2010-06-04, the 30-day EMA at $112.39 fell below the 50-day EMA at $113.55 by 1% of the stock price ($106.82), triggering our exit. After holding the position for 396 days, we exited leaving $172,610.54 in available cash.
On 2010-10-13, the 30-day EMA at $113.85 crossed above the 50-day EMA at $112.66, exceeding it by 1% of the stock price ($117.92). We invested $175,055.83 โ which includes $2,445.29 in interest earned while holding cash for 131 days โ gaining exposure to 4,453.59 equivalent shares.
On 2011-08-08, the 30-day EMA at $128.36 fell below the 50-day EMA at $129.52 by 1% of the stock price ($112.26), triggering our exit. After holding the position for 299 days, we exited leaving $136,985.60 in available cash.
On 2012-01-20, the 30-day EMA at $127.16 crossed above the 50-day EMA at $125.81, exceeding it by 1% of the stock price ($131.95). We invested $139,434.36 โ which includes $2,448.76 in interest earned while holding cash for 165 days โ gaining exposure to 3,170.16 equivalent shares.
On 2015-09-01, the 30-day EMA at $203.21 fell below the 50-day EMA at $205.35 by 1% of the stock price ($191.77), triggering our exit. After holding the position for 1320 days, we exited leaving $281,913.54 in available cash.
On 2016-04-21, the 30-day EMA at $204.92 crossed above the 50-day EMA at $202.81, exceeding it by 1% of the stock price ($208.97). We invested $289,056.04 โ which includes $7,142.50 in interest earned while holding cash for 233 days โ gaining exposure to 4,149.73 equivalent shares.
On 2018-11-23, the 30-day EMA at $273.38 fell below the 50-day EMA at $276.11 by 1% of the stock price ($263.25), triggering our exit. After holding the position for 946 days, we exited leaving $445,306.07 in available cash.
On 2019-03-20, the 30-day EMA at $276.87 crossed above the 50-day EMA at $274.03, exceeding it by 1% of the stock price ($281.55). We invested $450,936.09 โ which includes $5,630.02 in interest earned while holding cash for 117 days โ gaining exposure to 4,804.86 equivalent shares.
On 2020-03-10, the 30-day EMA at $313.85 fell below the 50-day EMA at $316.88 by 1% of the stock price ($288.42), triggering our exit. After holding the position for 356 days, we exited leaving $444,403.20 in available cash.
On 2020-06-04, the 30-day EMA at $294.40 crossed above the 50-day EMA at $291.10, exceeding it by 1% of the stock price ($311.36). We invested $448,526.23 โ which includes $4,123.03 in interest earned while holding cash for 86 days โ gaining exposure to 4,321.62 equivalent shares.
On 2022-02-24, the 30-day EMA at $445.09 fell below the 50-day EMA at $449.55 by 1% of the stock price ($428.30), triggering our exit. After holding the position for 630 days, we exited leaving $883,512.23 in available cash.
On 2023-02-15, the 30-day EMA at $403.64 crossed above the 50-day EMA at $399.49, exceeding it by 1% of the stock price ($413.98). We invested $917,941.23 โ which includes $34,428.99 in interest earned while holding cash for 356 days โ gaining exposure to 6,652.07 equivalent shares.
On 2025-03-28, the 30-day EMA at $575.28 fell below the 50-day EMA at $580.94 by 1% of the stock price ($555.66), triggering our exit. After holding the position for 772 days, we exited leaving $1,682,866.07 in available cash.
On 2025-06-11, the 30-day EMA at $584.05 crossed above the 50-day EMA at $577.93, exceeding it by 1% of the stock price ($601.36). We invested $1,696,474.09 โ which includes $13,608.02 in interest earned while holding cash for 75 days โ gaining exposure to 8,463.19 equivalent shares.
As of 2025-07-05, we hold an options position equivalent to 8,463.19 shares using call options (leveraged exposure). The net liquidation value of $1,889,526.88 accounts for all time decay costs.