OpenHedgeDocs
Menu

Part III · S&P 500 Algorithmic Strategy

Section 030 Coming soon

Trend and Regime Filter

Three regimes from the 200-day average and the 50-day slope set the trend factor to 1.0, 0.5 or 0, with hysteresis against whipsaw.

3 closes3 closesrecoveryRISK_ONTrend factor 1.0NEUTRALTrend factor 0.5RISK_OFFTrend factor 0RE_ENTRYBack via NEUTRAL first
Figure 30Regime transitions with staged re-entry.

Long-term trend is the first and strongest filter. Large equity drawdowns have historically unfolded while the index traded below its long-term average, so the strategy holds less, or nothing, in that state. The filter uses daily closes of the cash index:

  • MA200: simple 200-day moving average of the close.
  • slope50: change of the 50-day moving average over the last 20 trading days, divided by its value 20 days ago.
RegimeConditionTrend factor
RISK_ONClose above MA200 and slope50 above 01.0
NEUTRALClose above MA200 with slope50 at or below 0, or close below MA200 by less than 2%0.5
RISK_OFFClose more than 2% below MA200 and slope50 below 00

Hysteresis. A regime change takes effect only after the new condition holds for three consecutive daily closes. One close across the average does not move exposure. The single exception is an immediate move to RISK_OFF when the close is more than 5% below MA200, because waiting would be costly in a fast fall.

Re-entry. After RISK_OFF, the book passes through NEUTRAL before returning to RISK_ON, even if the conditions for RISK_ON are met directly. This stages re-entry at half size first.

The regime and the number of confirming closes are shown on the strategy dashboard every day.

© 2026 HedgeFund DAO · OpenHedgeNot investment advice. Trading leveraged perpetuals can lose all deposited funds.