Peter's Build Rules

    How GSB's developer sets up, tests and refines a build, with the year each rule was last confirmed

    How to use this page

    These are the working rules of Peter Zwag, GSB's developer, gathered from his posts on the Trademaid forum. Where his advice changed over the years, this page gives his latest view and the year he said it.

    Read it after your first build on Building Trading Strategies. Start from a supplied settings file and change one thing at a time. Peter's experience reviewing users' settings is that many people change too much at once and can no longer tell what helped.

    This is education about how the software is used, not a recommendation of any market or system to trade.

    1. Benchmark first

    GSB's genetic search gives different results each run, even with identical settings. In one of Peter's tests, 20 identical YM runs put anywhere from 25 to 103 systems in Favorites B. So a single run tells you very little.

    • Build a benchmark with your current settings.
    • Change one setting, then run the comparison 4 times. Peter runs every comparison four times.
    • Four builds of 50,000 aren't the same as one build of 200,000: each run settles on its own indicators.
    • Keep a test log, and save each test as its own .gsboptset file.
    • Protect your master settings file. Peter once lost a month of research to an accidental date change in his.

    2. Choosing the market and session

    • Start with a market that has supplied settings. A new market is much more work, and some markets are close to impossible for GSB.
    • Three choices matter most: entry type, session time and secondary filter. Settings that suit one market don't carry across to another (Nasdaq settings won't suit gold, for example).
    • Build where the volume and range are. Trademaid's SessionTimeCalcs script (in the GSB scripts ELD for TradeStation) prints average range, movement and volume by time of day, so you can see the active hours. Peter also checks a market's daily range (average of close minus open, and of high minus low, over 5 days on day-session bars) before he commits to it.
    • Allow entries over the whole session. The best entry time is nearly always the start of the session; leaving out the last 30–60 minutes is optional.
    • Use 30-minute bars for any new market. Peter found 1-minute bars very poor and advises against anything under 5 minutes.
    • 24-hour data. In 2020 Peter warned against it. He has since relaxed that: he builds 23-hour Nasdaq swing systems and 24-hour gold 60-minute swing systems (2023–25). Day-trading systems are still built on the day session.

    3. Data periods

    • Start at 1 January 2007 for most markets (for ES Peter sometimes goes back to 2001). Start once the market was liquid, and never build on a year or so of data.
    • The in-sample period you choose indicators on must be the same as the in-sample period you build on.
    • Keep the most recent year or two completely unseen by GSB.
    • Peter leaves data after 28 February 2020 out of his builds, so the 2020–22 volatility isn't curve-fitted.
    • Never train only on 2007–2009: the financial-crisis volatility isn't typical.
    • Percentage training splits (such as the 40% files) are only for a first look at a market. Peter holds data out with Nth days and later dates instead.
    Members only
    Nth-day hold-outs on swing systems

    Peter Zwag's notes on this from Trademaid's private forum for GSB buyers, free with a GSB Pro account.

    See Validation and Robustness for how out-of-sample data and Nth-day mode fit together.

    4. Strategy settings Peter keeps fixed

    These are the Strategy panel settings he leaves alone in nearly every build. Each is explained on the Interface Reference.

    SettingPeter's ruleYear
    # of Indicators3, for both the indicator pass and the build. He isn't in favour of 5 unless a benchmark proves it, and 4–5 indicators need much bigger walk-forward GA settings.2021
    OperatorMultiply (*) only. Plus needs completely different weights and entry levels and has never beaten multiply. Plus and minus together is worse and slower.2021–22
    Entry ModesOne entry mode per build, tested separately. Peter has never seen Compare1 work well out of sample, and no longer recommends dual cross. AnyIndicatorCrossed (AIC) has its weights fixed at zero.2021–25
    WeightsAIC: 0. Compare2: 0 to 2, step 0.5. Never allow 0 in a power-weight range (anything to the power 0 is 1, so the indicator does nothing). Don't switch to the Log weight or entry-level modes.2020–24
    Normalization ModesSigmoid or ZScore (ZScore50), one at a time. The best one varies by market. Never HighestLowest3 or CenterScaling3. Every extra mode multiplies worker RAM and slows the build.2025–26
    SF (secondary filter)At least one SF must be on. Stock indices: CloseLessPrevCloseDBpv picked directly (not normalised). Energies: the normalised version through GeneticAlgorithm. Other markets: test SFs one at a time. Turn the SF off only for tick or daily data.2025
    Remove duplicate indicatorsLeave on (the default from build 67.24).2024
    Force (indicator list)Never. Forcing GSB to find something defeats the purpose of a search.2020–21

    Don't turn every option on. In one of Peter's tests, 200,000 systems built with nearly everything enabled put no systems at all in Favorites B, while honed 2,500-system tests put more than 200 there.

    The same goes for indicators, and it costs speed as well. In 2023 a member who switched on every indicator (166 at the time, against his usual 117) saw build speed fall from over 1,000 systems a minute to 100–200, and an overnight 50,000-system pass reached only about 8,000. The two-pass method below exists so the main build only carries a short list.

    Members only
    Reading the secondary filter's entry value

    Peter Zwag's notes on this from Trademaid's private forum for GSB buyers, free with a GSB Pro account.

    5. Indicator selection in two passes

    1. Pass 1 picks about 10 indicators, using the greenMax10 macro supplied with the 2025 settings files.
    2. Pass 2 builds systems with only those indicators.
    • Rank indicators in the indicator statistics by frequency first, then ratio. The marginal ones change between identical runs, so the exact cut-off isn't critical.
    • Stop after one or two reduction loops. Peter calls more than that a waste of time.
    • Don't use the green10Fav300 macro; Peter rejected it in 2023. (greenMax10 is a different macro and is fine.)
    • Using 3 indicators in pass 1 is faster, but lets weaker indicators slip through.
    • The short-cut method (build the indicator list once, then build systems from it twice) saves about half the CPU time. Peter briefly planned to remove it in 2023, then reversed that: his view is it has no downside.

    The macros are covered on Macros Overview.

    6. Stops, targets and exits

    • Build with a big stop, about $2,000 per contract for ES, NQ and most markets. Peter's earlier (2018) advice was to build without a stop; he now says not to, because a few huge trades skew the genetic search. Optimise the stop last, in TradeStation or MultiCharts, looking for a range that works rather than one best value.
    • Day trading: no profit target, or only a small one to get more test trades. Profit targets are for swing systems.
    • Day trading: leave the extra exit modes off. The market-on-close exit is, in the words of a member Peter agreed with, the most robust part of a day system.

    7. Build size and selection

    • 2,500 systems per test is enough (the 2025 supplied SysBuild files use 2,500 per pass).
    • 20,000 systems is what Peter uses when building systems he means to use.
    • Never 50,000 in one go: the top 300 end up too similar to each other, and the window struggles.
    • Put the top 300 into Favorites A, then group them into families.
    • Judge whole families. Peter's earlier advice was to walk forward only the top member of each family. Since 2021 he looks at every member out of sample and walks several forward, because the spread across members tells you something. Trade one member per family.
    • Select on NP/DD, Pearson and the walk-forward curves (see Selecting Trading Systems and Walk-Forward Optimization).
    • Test any selection rule. Split your ~300 systems into the top third and bottom third by your rule and compare their out-of-sample results. If the top third isn't clearly better, the rule isn't helping.

    8. Improving one system by hand

    Peter's preferred way to refine a chosen system is in TradeStation or MultiCharts, one module at a time:

    1. Test every logical part of the system (each indicator, filter and stop) on its own.
    2. Optimise every input by hand, or use GSB's AI walk-forward parameter analysis.
    3. Remove any part that changes only a handful of trades. Two trades out of 1,000 isn't a valid improvement.
    4. With AnyIndicatorCrossed or Cross entries, comment out 2 of the 3 indicators (//v2=…;, //v3=…;) and note net profit, drawdown and profit factor for each indicator alone. For the Cross entry type, first change the result line to result = Sign(Sign(vn1)+Sign(vn2)+Sign(vn3));. Some systems then give zero trades, so the logic may need adjusting.
    5. Use Trademaid's GSB_PerformanceMetrics strategy (October 2024) for before-and-after numbers.
    6. Keep an added filter only if its optimisation forms a smooth bell curve and it removes about 10% or more of trades while improving the results. It's more convincing if it works on several systems and on both longs and shorts.
    7. Add day-of-week filters last, and re-optimise with all days included.

    9. Long, short and day of week

    • Peter prefers to build long-and-short systems, then switch off the weaker side, rather than build long-only and short-only systems. A one-sided build has about half the trades, so a smaller sample.
    • GSB's LSR column (long/short ratio, from build 64.76) shows which side is stronger.
    • Building on day-of-week subsets is valid with more than 300 trades. Loosen the Pearson and trade-count filters, since one day is about a fifth of the data.

    10. Common traps

    • Turning everything on, instead of testing one setting at a time against a benchmark.
    • Doing serious work with the 40% InSample files. They are for newcomers to get a feel; use the SysBuild files.
    • Trusting crude oil (CL) builds made before build 65.21 (January 2023). Earlier builds assumed prices couldn't go below zero, so they mismatch TradeStation from April 2020.
    • Filtering on the full period. Every system that survives becomes an in-sample pick.
    • Acting on out-of-sample results, then calling them out of sample. Once you've used them to choose, they're in-sample.
    • Following old videos. Peter's view is that methodology videos more than about three years old are out of date; the written guide takes precedence.

    Risk warning. GSB results are hypothetical backtests on past data, and past or hypothetical results don't guarantee future performance. This page describes how GSB's developer uses the software; it is general education, not trading advice.

    Further reading on the Trademaid forum

    Next Steps

    Put your shortlist through its paces on data it hasn't seen: