Advertisement IC Markets

Walk-forward testing for scalpers: window size matters

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 6955
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Walk-forward testing for scalpers: window size matters

Post by Fairman »

Walk-forward testing for scalpers: window size matters

Walk-forward analysis means optimizing on one segment of data and testing on the following segment, then rolling forward. For scalpers, the choice of window lengths is critical. Too short, and the optimization chases noise. Too long, and the system adapts too slowly to changing conditions.

Because scalping systems trade often, a month can contain thousands of trades, so shorter windows can still provide enough data. Yet market regimes change over weeks and months, and volatility patterns shift. A window that spans a single regime may not generalize.

A practical approach is to test several combinations, such as optimizing on 3 months and testing on 1 month, then 6 months and 2 months, and comparing the stability of out-of-sample results. If results vary wildly between configurations, the system is fragile.

Look at the ratio of out-of-sample to in-sample performance. A ratio near 1 suggests the system generalizes. A ratio near zero or negative means the optimization found nothing real.

What window lengths work for the strategies tested, and how stable are the out-of-sample results?
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
Amanhasnoname
Posts: 2060
Joined: Fri Oct 30, 2026 9:45 am

Re: Walk-forward testing for scalpers: window size matters

Post by Amanhasnoname »

Window length changed the story more than the inputs I was optimizing. I ran a one-minute EURUSD fade through three walk-forward setups on the same two years of ticks: six weeks in sample and two out, twelve and four, and twenty-four and eight. The short window looked brilliant on some rolls and collapsed on others. The out-of-sample to in-sample ratio jumped from about point nine down to point fifteen, which is what chasing a single noisy month looks like.

The twelve-and-four split was the only one that stayed honest. That ratio held between sixty-two and seventy-one hundredths across the rolls, and the losing windows were merely flat rather than ugly. The long window was steadier than the short one but too slow: it kept parameters tuned to a quieter stretch and then gave back a chunk when volatility picked up.

I kept the twelve-week optimize and four-week test as the default. If a tweak only shines on the six-and-two schedule I treat it as curve fit and leave it alone.
Post Reply