S&P 500 Swing Systems: Long-Only with Extended Hold Times
In brief
- The goal
- Build long-only S&P 500 swing systems that hold for more than one day.
- What Trademaid did
- Trademaid built with Compare2 entries on 30-minute ES data from 1997, compared fitness functions, verified the systems on other index markets, then ran anchored and rolling walk-forwards in EWFO.
- What it shows
- How Trademaid chose a system for parallel walk-forward curves and results on related markets, and compared it with a 2018 benchmark.
- Main caveat
- Trademaid notes "only 140 trades in the final WF… Normally I would discard this system", and rated its anchored stability across the family "poor". Figures are hypothetical, without commission or slippage.
Want to build this yourself? Practical Build 4: S&P 500 swing systems, long only takes you through it in GSB, step by step (free with a GSB Pro account).
Scenario
Trademaid's method for long-only S&P 500 swing systems that hold for multiple days, using a $4,000 stop loss and $2,750 profit target, with fitness testing, verification on other index markets and an EWFO walk-forward.
Day trading systems exit before the close. Swing systems hold for multiple days, so they need wider stops and targets sized for bigger moves. The challenge is optimising for longer hold times without curve-fitting to a few exceptional winning days, which is why the choice of fitness function, verification on other markets and walk-forward testing all matter here.
Approach
Settings shown in Trademaid's screenshots:
• Data: 30-minute ES bars from 1997 (training end 26 Feb 2021)
• Entry type: Compare2
• Secondary filter: CloseLessPrevCloseDBPV (not normalized)
• Long only
• Max. Stop Loss: $4,000
• Profit Target: $2,750
• Trademaid compares new builds with an earlier system built in June 2018
• Its TradeStation annual returns from 1997 to 2021 are shown as a reference
• Trademaid notes this benchmark was live traded with slippage and commission included, but may have had older out-of-sample data
• Use your own benchmark in the same way: every new build should be compared with it

Benchmark system built in June 2018

TradeStation annual returns for the benchmark system, 1997-2021
Trademaid's GSB Automation spreadsheet compared many fitness functions. Two highlighted options:
• NetProfit * PFLateEntry * AvgTrade (the default)
• NetProfitPercentProfitableRatioAvgWinAvgLoss
• Fitness choice changes which systems are selected, and results can vary significantly
• Compare the walk-forward results of each

GSB Automation fitness comparison, highlighting NetProfit * PFLateEntry * AvgTrade and NetProfitPercentProfitableRatioAvgWinAvgLoss
• Add verification price data for related index markets (EMD, DAX, RTY, NQ and YM in the example)
• Systems that also work on other markets are less likely to be fitted to noise in one market
• In Trademaid's example the system did well on EMD and YM, but poorly on DAX

Verification on EMD, DAX, RTY, NQ and YM: good on EMD and YM, poor on DAX
• Trademaid chose a system whose family members all had parallel walk-forward curves and good results on EMD and YM
• It had only 140 trades in the final walk-forward. Trademaid: "Normally I would discard this system for that reason", but kept it, suspecting the fitness function caused the low count
• Across the family, rolling stability was "fair" but anchored stability "poor", although anchored is Trademaid's strongest preference
• Run the system in Enhanced Walk-Forward Optimizer with TradeStation
• Compare anchored and rolling walk-forward results
• Check the Stability Anchored Coarse score and the OOS/IS efficiency
• An alternative build with Compare3 entry used GA Generations and Population of 90

System chosen for parallel walk-forward curves across the family, despite only 140 trades in the final walk-forward

Anchored and rolling stability scores for the family: rolling fair, anchored poor in Trademaid's words

EWFO rolling walk-forward: $218,962.50 out of sample (anchored: $206,962.50)

New system vs. the benchmark on data after 26 February 2021

Compare3 build: walk-forward GA Generations 90 and Population 90

Compare3 system trades from 26 February 2021 onward
Results & Insights
In Trademaid's EWFO example, the anchored walk-forward made $206,962.50 out of sample (89.07% efficiency, Stability Anchored Coarse 62), and the rolling walk-forward made $218,962.50 (94.23% efficiency). Trademaid notes GSB systems rarely do better on a rolling walk-forward, so this was an exception. Data after 26 February 2021 was not used to build the system, and the trade list after that date shows profit-target exits of $2,750. Trademaid's own caveats matter here: the final walk-forward had only 140 trades and "Normally I would discard this system for that reason"; the GSB anchored stability across the family was "poor"; and Trademaid calls the choice of system "the biggest weakness" of the write-up. The system was chosen for its parallel walk-forward curves and out-of-sample results rather than its stability score. These are hypothetical back-test results without commission or slippage. Update from the forum: Peter Zwag (GSB's developer) later found that fitness types built on MFE or late entry can make walk-forwards misleading (2021), so walk systems like this forward with NetProfit × AvgTrade fitness. Long-only also halves the trade sample: Peter prefers building long and short, then switching off the weaker side (2022).
Hypothetical Performance Disclosure
Key Takeaways
Swing systems need wider stops and targets than day trading systems ($4,000 / $2,750 in this example)
Compare every new build with a benchmark system
Fitness function choice changes the systems you get, so test several
Verification on related markets (EMD, YM, NQ, RTY, DAX) builds confidence
Watch the trade count: too few trades in the walk-forward is normally a reason to discard a system
Compare anchored and rolling walk-forward results in EWFO
Walk forward with NetProfit × AvgTrade fitness: Peter Zwag found MFE and late-entry fitness types can mislead the walk-forward
Terms used here
- Families
- A group of systems that use the same indicators with different parameters (right-click, Create/Update Family). A family with many members, most of them good, suggests the idea doesn't depend on exact parameters. The first member shown is the best of the family, so look at all of them.
- Astab-C / PAS-C
- Anchored parameter stability (coarse) from a walk-forward. It shows how steady the best parameters stayed across the anchored walk-forward runs; higher is better. Shown as Params. Anc. Stab. Coarse on the chart. PRS-C (Params. Rol. Stab. Coarse) is the rolling version.
- Walk-forward (WF) and out of sample (OOS)
- Out-of-sample data is data the system was not built on. A walk-forward repeatedly re-optimises on one window and tests on the next unseen window, so you can see how the system copes with data it hasn't seen.
These systems were built with Genetic System Builder: its genetic algorithm search finds candidate systems, the walk-forward and robustness tests check them, and the code export puts them on your trading platform. See how GSB compares with StrategyQuant and Build Alpha.
Related case studies
S&P 500 Long/Short Systems: Bidirectional Swing Trading
Long/short swing systems were harder to build than long-only, so select more strictly.
Read case studyBuilding Nasdaq Swing Systems on 23-Hour Data
Check every indicator on its own on unseen data, and treat optimised targets and stops with suspicion.
Read case studyFree: The GSB Robustness Checklist
Every check between a good-looking backtest and a system worth watching: shortlisting, families, walk-forward thresholds, verification and the final checks before trading. One page, with links to each step.
Try this yourself
Follow the same steps on your own market. Start with these Strategy Guide pages, which have the exact settings and clicks:
Also used in this case study: Enhanced Walk-Forward Optimizer (EWFO), Selecting Systems
Want to build this yourself? Practical Build 4: S&P 500 swing systems, long only takes you through it in GSB, step by step (free with a GSB Pro account).