Skip to content
All library documents

Backtesting a Daily QDA Forecasting Strategy on SPY

Article QuantStart

Summary

The article describes a daily directional forecasting strategy for the S&P 500, with trades placed in SPY. A quadratic discriminant analysis model uses the prior two daily index returns to predict whether the market will rise or fall. The strategy takes a fixed long or short position at the open and closes it at the end of the same day. The article explains how signals are connected to a portfolio calculation that uses the open-to-close price change to produce daily profit and an equity curve.

The reported backtest covers the stated test period and shows a 4% return for both the strategy and a buy-and-hold comparison. The result is only a simple illustration: the system assumes execution at opening and closing prices, excludes commissions and other transaction costs, and makes a round-trip trade each day. The author notes that these costs could substantially reduce returns. The article also relies on previously developed backtesting and forecasting components, and does not provide evidence that the approach generalizes beyond this historical example.

Key ideas

  • The model predicts daily market direction using the previous two daily returns as inputs.
  • A forecast above or below the decision threshold triggers a fixed long or short SPY position for the day.
  • Daily profit is calculated from the difference between opening and closing prices, then accumulated into an equity curve.
  • The reported strategy and buy-and-hold returns are equal for the stated test period.
  • Ignoring execution limitations and transaction costs makes the backtest results optimistic.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.