3.15 Optimization Comes After Testing, Not Before
Right order: hypothesis, prototype at structural priors, parameter-stability map, then small validated optimization. Optimization first is search-width bias dressed as rigor. Test first, then tune.
Aligrithm is an independent research publication on systematic trading, quantitative research, market microstructure, and adaptive systems. Long-form essays, code notebooks, and architecture breakdowns across eight pillars, built for traders who care more about how markets behave than about hype.
More about the publication →Read in order. Each pillar walks you out of one trap with one new ability. The newest article is the worst place to begin.
Right order: hypothesis, prototype at structural priors, parameter-stability map, then small validated optimization. Optimization first is search-width bias dressed as rigor. Test first, then tune.
Markets have personalities: efficiency ratio, autocorrelation, skew, vol regime, macro driver. Six families, six framework fits. SPX is not gold, gold is not BTC. Match framework to personality.
"Works on all markets" usually hides per-market tuning, cherry-picking, or long-bias. Real edges are family-specific. Demand the full matrix: fixed parameters, after costs, multi-test corrected.
Optimization climbs the sharpest peak. Robustness picks the widest plateau. The IS-optimal set is rarely robust. The robust set is rarely IS-optimal. OOS is the true distribution. Pick the plateau.
A backtest is informative about regimes it covers, silent about the rest. Stratify by vol, trend, correlation, macro, microstructure. Report cell Sharpe with CI. Ship when every required cell passes.
The rolling window is a hyperparameter. Picking W by IS Sharpe inflates the estimate. Pick from a structural prior matched to the strategy timescale. Audit for look-ahead. Do not retune on live P&L.
Stationarization destroys signal when the strategy lives in the non-stationary part. 12-1 momentum raw Sharpe 0.55, time-series z-scored 0.18. Find the signal axis, transform only the orthogonal one.
Raw indicators have non-stationary distributions that break threshold rules across decades. Match the violation to the transformation. Eight classes, eight recipes. Verify causally. Do not stack.
Returns are a near-random walk daily. Volatility has long memory: ACF +0.27, variance ratio 1.8 at 252 days. Vol is structurally easier to predict than direction. Build feature hierarchies around it.
Lifetime Sharpe is regime-weighted, not favorable-year. Each strategy has a vol regime where it lives and one where it dies. Gate at deployment, calibrate against the full distribution.
Most OOS failures get blamed on overfitting. Often it is regime change between IS and OOS. Run the diagnostic flow: permutation, pipeline audit, sample size, regime overlap test, in order.
A trading system never dies without warning. Eight diagnostic metrics flash months before the equity curve. Read the metrics. Hard kill switches written at deployment, automatic at threshold.