Skip to content
WalkStrat Docs

Key Concepts

The ideas behind walk-forward validation and Monte Carlo stress testing.

Walk-Forward Optimization

Standard optimization finds the parameters that performed best over the entire history — but those parameters are tailored to that specific slice of market behavior, and markets change. Walk-forward optimization never lets the optimizer see the data it's about to be judged on: history is split into segments, and for each one the strategy is optimized on an in-sample (IS) window, then the winning parameters are applied, untouched, to the very next out-of-sample (OOS) window it's never seen. If the winners keep working out-of-sample, that is evidence the strategy captures something beyond noise in the data it was fitted to — evidence, not a guarantee that it will keep working.

WalkStrat's Walk-Forward mode runs this for real — a fresh in-sample optimization per segment, an automatic winner pick, then a locked out-of-sample run — rather than slicing an already-optimized trades file after the fact. The WFO Config matrix (WFO Config), by contrast, is a post-hoc slice — fast, useful for narrowing down a configuration, but not the real test. Treat it as a scouting tool; treat the actual Walk-Forward run as the verdict.

Efficiency

Efficiency = (OOS Net ÷ OOS Days) ÷ (IS Net ÷ IS Days) — out-of-sample net profit per day divided by in-sample net profit per day.

Days are calendar days, both the first and the last day of a window counted. For a whole schedule, the nets and the days of all segments are added up first and divided once. A trade counts in the window it was entered in.

A ratio of daily return out-of-sample to daily return in-sample. At 1.0, the strategy performed exactly as well per day once deployed as it did during optimization — no degradation at all. Above 1.0 means OOS actually outperformed IS. Below 1.0 is expected to some degree; how far below is where judgment comes in. Note that it measures degradation only — it says nothing about how much was earned, so read it alongside the aggregate profit. When the in-sample net is zero or negative there is nothing to compare against, and the Efficiency shows n/a.

It is one number everywhere: the WFO Config cells, hover breakdown, summary and segment table, and the Test & Validation tab (Test & Validation) all show the same Efficiency. In the WFO Config matrix and in the walk-forward test's rules verdict, a schedule fails when too many segments lose money, when one losing segment is too deep, when one segment holds too much of the profit, or when the Efficiency is above 3.0 (the in-sample profit was too small to measure against); WFO Config lists the exact tests.

Segments and OOS%

Segments — how many time slices to divide history into. More segments means a finer-grained robustness picture but shorter, thinner windows with fewer trades each; fewer segments means longer, more trade-rich windows but a coarser test.

OOS% — the fraction of each segment held back for out-of-sample testing. Higher means a more confident out-of-sample read but less data left to optimize on; lower is the reverse.

Rough starting points: under a year of history, lean toward 4–5 segments at 25–30% OOS; one to two years, 6–7 segments at 20–25%; two-plus years, 7–9 segments at 15–20%. The matrix does the actual analysis — use these as a starting search area, not a rule.

How WalkStrat Picks a Walk-Forward Winner

During the Walk-Forward mode, once each segment's in-sample optimization finishes, WalkStrat picks that segment's winning parameter set automatically rather than asking for a choice. This is deliberate: walk-forward only means anything if the parameters were chosen without any knowledge of the data they're about to be tested on. A human choosing — remembering what worked on this symbol last month, or having seen an earlier segment's out-of-sample result — would quietly undo the very thing the test is measuring. So the choice is made mechanically, the same way, every segment.

It works in three stages:

1. Minimum standards. Anything that was not profitable in that segment's in-sample window, or failed any of the Segment Winner Rules set on WFO Config (WFO Config) — Min trades per segment, Min net per day, Min net per trade — is discarded outright; the rules apply here exactly as they did there. What survives is then scored on a handful of quality signals — trade count, profit factor, pessimistic return per year on the run's Initial Capital, and average trade — and only the top tier goes forward. The minimum standards are never relaxed: if nothing in a segment meets them, the segment has no winner — the WFO Config cell is excluded, and a walk-forward test stops at that segment with a message (Walk-Forward Run (Optimization tab)).

2. Stability check. Each surviving candidate is compared against its immediate neighbours: the parameter sets one step away along each swept parameter. Two things get measured, and a candidate that fails either is rejected:

What it asks
SpikeDid this setting score far better than the settings right beside it?
SpreadDo the settings around it behave consistently, or swing wildly?

A parameter set that only works at one exact value is almost always an accident of history rather than a real edge — nudge the market slightly and the result lands on a neighbour that doesn't work. The same goes for a setting surrounded by wild swings, even when it looks fine itself.

A candidate is rejected when its Spike is above 2.0 or its Spread above 2.5, and also when the settings around it lose money on average: a profitable setting surrounded by losing ones is the isolated peak this check exists to catch (Spike and Spread show no value there). If that would reject every candidate in a segment, the check is made one step looser for that segment — Spike up to 2.5, Spread up to 3.0; losing neighbours still reject — and the winner is marked as picked on relaxed stability. If even that rejects every candidate, the segment has no winner, as in stage 1.

A setting at the very edge of a small grid can have too few neighbours to measure at all. It is not rejected for that, but its winner is marked as picked with unmeasured stability, in the same places as a relaxed one.

3. Best of what's left. Among the candidates that pass both, the one that scores highest in-sample on the run's Fitness (Settings tab; Net Profit by default) wins. The stability check itself is always measured on Net Profit. For Expectancy Score and Pessimistic Return On Capital, the segment ranking uses WalkStrat's own calculation of the same measure, so the values can differ slightly from TradeStation's columns.

The order matters: stability is a filter, not a preference. WalkStrat doesn't trade profit away for flatness — it removes the untrustworthy candidates first, then takes the best of what remains.

The outcome per segment appears on Test & Validation → Walk-Forward Test → Segments (Test & Validation), where a winner picked on relaxed stability is marked ⚠. When reading Spike: around 1.0 means the winner scored about what its neighbours scored — solid ground. Higher means it stood alone, and is worth a closer look. The Robustness tab (Robustness) applies the same rule to the whole Optimization.

If a parameter's winning value keeps landing at the very top or bottom of the swept range, widen that range and run again. It means the optimizer wanted to go further and the Start/Stop settings stopped it — so where that input actually performs best was never found.

The minimum standards in stage 1 are set on WFO Config. The stability thresholds in stage 2 are fixed.

Monte Carlo Simulation

Several simulation methods live under Candidates → Monte Carlo, and they answer different questions:

  • Shuffle — reorders the actual trades, keeping every individual P&L value unchanged. Answers: how much did trade order matter? Because the same trades are used every time, every shuffle ends at the same total profit — what changes is the path, and with it the drawdown. A tight spread of drawdowns means the historical drawdown is a fair picture; a wide spread means a different order of the same trades could have hurt considerably more.
  • Bootstrap — resamples trades with replacement rather than just reordering them. Better suited to capital-sizing questions.
  • Block bootstrap — resamples contiguous chunks of trades rather than individual ones, preserving any serial correlation (streakiness) in the results. Available on the Fan & Streaks and Risk & Scaling views.

Use the median (p50) as the realistic expectation and the 5th-percentile-worst outcome as the stress-test number for drawdown planning — not the single historical worst case, which is only one draw out of many possible outcomes.

Lucky order has one meaning everywhere in Monte Carlo: the real drawdown is shallower than in at least 95% of the reordered paths — the historical sequence of trades was kinder than almost any other order of the same trades.

Risk of Ruin

The probability, across the simulated paths, that running equity falls to minus the capital — that the whole Initial Capital is lost. Only Forensic Deep-Dive and Risk & Scaling report it under this name; the Scorecard's Drawdown ≥ capital probability and the Variance Test's drawdown beyond capital measure how often the drawdown reaches the capital. For capital planning, the worst-case (5th percentile) simulated drawdown at the intended capital level is a more realistic reference than the best historical month. A Risk of Ruin above 10% marks that capital level as high-risk — a figure to take seriously rather than round down.

Holdout Validation

A toggle on Settings, not a percentage carved out manually after the fact. When Use Holdout Validation is on, WalkStrat reserves the last Holdout % of the history before Feasibility or Optimization ever touch the data — the reserved tail simply never appears in any trades file generated during that session, and Candidates never shows it. The holdout window is fixed when the Optimization starts (Optimization): the walk-forward test then runs up to the day before the holdout, and the holdout starts the next day. This is the mechanism behind Test & Validation → Holdout Validation (Test & Validation): one final backtest, over data the entire pipeline — not just one walk-forward segment — never saw.

Pause and Resume

Optimization and Walk-Forward runs (not Feasibility) can be paused mid-batch and picked up later, even after closing and reopening TradeStation — progress is tracked on disk, not just in memory. While a run is going, its button reads Pause Optimization (or Pause Walk-Forward). Press it once to pause gracefully: the current job finishes first. The button then reads Abort — press it only to cancel the job in progress immediately. When nothing is running, the button is greyed out. A failed job behaves the same way as a pause — the app remembers exactly where it stopped, and the Start button relabels itself Continue Optimization (or Continue Walk-Forward) the next time the run is picked back up.

Once a run has stopped (paused, failed, or hard-cancelled) with progress saved, there are three choices:

ButtonWhat happens
ContinueGoes on from where the run stopped. After a failure, the failed step is tried again.
RestartThe same run again from the beginning, at once — for Optimization, as a new run under a new name (Runs and the Results Tabs), every pair from the first; the stopped run keeps the pairs it finished. For the Walk-Forward, every segment's result is cleared so it's genuinely re-optimized rather than resumed. Click once to arm it (the button relabels to confirm), click again to restart — press anything else first and the arm clears itself, no accidental resets.
AbortDiscards the saved progress and runs nothing. The settings can then be changed — for example, a symbol that made the run fail — and Start begins a new run.

None of them is available while a job is actively running (only Pause / Abort is), or once a run has already finished.

Definitions Used Throughout

Each of these words means one thing everywhere in the app.

TermMeaning
Win / lossA trade with a net result above $0 is a win; below $0, a loss. A $0 trade is neither: it counts in the number of trades, but not as a win or a loss, and does not change the Profit Factor.
Profit FactorGross profit of the winners ÷ gross loss of the losers. With winners and no losing trade at all it shows No losers rather than a number.
Max DrawdownThe deepest fall of the running net equity, trade by trade in the order the trades closed, from its highest point so far — the running equity starts at 0, so a strategy that loses from the first trade has a drawdown from 0. The drawdown a trades file records during each trade is a different number, labelled Intraday DD (recorder).
Avg TradeNet profit ÷ number of trades. It is the same number some tools call "expectancy", so it is shown once, as Avg Trade. Expectancy Score (TS) in the Settings Metrics grid is TradeStation's own score, a different measure.
Initial CapitalOne value for every chart and test: the run's Settings Initial Capital, or 25,000 when the run has none (labelled default). Changed for a what-if, it changes everywhere at once (Candidates).
Capital neededThe account size at which the worst drawdown would be 25% of the account: a $10,000 drawdown needs $40,000.
Capital coverageHow many times the Initial Capital covers the worst drawdown. With no drawdown it reads n/a. Hover it for its guide values.
Annualized ROI (on Initial Capital / on Capital needed)Net profit per year as a percentage of that amount.
EfficiencyOut-of-sample net per day ÷ in-sample net per day (Efficiency).
Daily net P&LThe net results of the trades that closed on a day, summed. Every Monday–Friday from the first trade to the last counts; a day without a trade counts as 0. Sharpe, Sortino and the statistical edge (Test & Validation) are all measured on this one series.
SharpeThe average daily net P&L ÷ how much the daily results vary (standard deviation), × √252 to make it yearly.
SortinoAs Sharpe, but divided by the variation of the losing days only (downside deviation), so large winning days do not lower it.
Guide valueA reference number shown next to a result in the studies (Scorecard, Risk, Monte Carlo). Guide values were set on one test strategy: they inform, they do not decide.

Runs and the Results Tabs

A run is one Optimization, from Start Optimization to its last pair, Pauses and Continues included. It is named after the date and time it started (21 Nov 2026 13:05), and every file it writes carries that name (Working Folder). A new run never replaces an earlier one: one strategy folder can hold many runs, and each keeps its own settings, candidates, trades, walk-forward plans and walk-forwards.

The results tabs — Candidates, Robustness, WFO Config, Test & Validation and Deployment Code — all show one run at a time, the same run in each:

WhenThe results tabs show
An Optimization ends, or its trades are generatedThat run, without asking — unless a run was picked with Browse (below)
Browse on Candidates, WFO Config or Test & ValidationThe run picked: a run's own folder (Trades\B_…, Validation\B_…) for that run, or the strategy folder for every run of that strategy
After a TradeStation restart, or RefreshNothing, until a run ends or a Browse picks one

A run picked with Browse stays on screen. While another run is going, the results tabs keep showing the run picked. When that run ends, the app asks "Your latest run has finished. Show it now?" — Yes shows the new run, No keeps the picked one. Trades generated for another run ask the same way: "The trades of your run of 21 Nov 2026 13:05 are ready. Show that run now?". The Browse on Robustness changes only that tab.

A Browse never changes the work. Settings and the Optimization tab keep their strategy and Working Folder, Generate Trades works on the latest finished run of that strategy (or on the run whose trades folder is the Working Folder, Trades Generator), and Start Walk-Forward runs the plan added last with Add to WFO (WFO Config). To continue with an earlier run, Browse to it on WFO Config, pick the pair and cell, and Add to WFO.