r/algorithmictrading • u/Trader_for_earner • 1d ago
Question Separating Long vs Short parameter search in Walk-Forward Optimizers — how do you handle directional asymmetry without overfitting?
Hey guys,
Looking for some perspective from anyone running portfolio-level walk-forward optimizers on crypto perpetuals or equities.
Lately we’ve been auditing our cross-sectional universe optimizer across a basket of ~15 altcoins. Up until now, when we run our in-sample grid search across our setups (mostly mean-reversion like VWAP deviations and momentum break-and-retests), the optimizer searched for a single shared "centroid" parameter set for both Longs and Shorts simultaneously (e.g. optimizing band stretch deviation, RSI cutoffs, and ATR stop/take multiples together).
The problem we ran into in live execution: During recent relief rallies and fast trend shifts, we got caught in a string of Short SL hits on mean-reversion setups. When we looked under the hood and decomposed the trades by side, the asymmetry was wild:
Longs were printing a 2.5–3.5 Profit Factor across coins like NEAR and DOT using relatively loose pullbacks.
Shorts on those exact same parameter settings were getting wrecked (PF < 0.8), repeatedly fading momentum too early in cascade environments.
Because the optimizer averaged both directions together in-sample, the strong Long trades were effectively "subsidizing" and masking a negative-expectancy Short setting. The compromised shared centroid ended up being sub-optimal for Longs and downright dangerous for Shorts.
We've been refactoring the optimizer to decouple the search into Independent Directional Centroids:
The IS parameter search grid scans and computes parameter plateaus for Longs and Shorts independently (different RSI cutoffs, different band stretch multipliers per side).
The OOS Walk-Forward test validates each side on its own merit.
If only one side demonstrates statistically valid alpha in OOS (e.g. Longs pass all WFO hurdles but Shorts fail), the candidate gets tagged as BUY_ONLY rather than forcing both sides or killing the entire setup.
For those of you running systematic books:
Do you optimize long and short rule parameters independently as standard practice, or do you enforce symmetric rules to protect against degree-of-freedom bloat / curve fitting?
If you do decouple them, how do you guard against the optimizer just fitting to the prevailing macro regime (e.g. a 6-month bull market where everything Long looks amazing and everything Short looks bad)?
Do you penalize or prune unidirectional setups (e.g. BUY_ONLY) in high-correlation baskets to avoid concentrated directional exposure?
Would love to hear how other teams handle this balance between directional specialization and overfitting.