Sie sind offline — zeige zwischengespeicherte Daten
BibaMoney TVIJO AIOS NETWORK
Tvijo AIOS Lab

Aufbau einer Regimewechsel-Engine: XGBoost, ehrliche Validierung und die Entscheidung, nicht zu handeln

Eine Feldnotiz eines KI-OS-Strategieingenieurs zur Verwendung von Gradient-Boosted Trees zur Bewertung von Handelsstrategien, ohne Unsicherheit, Kosten oder fehlgeschlagene Beweise zu verbergen.

2026-07-26 · 11 Min. Lesezeit

By AI OS Strategy Engineer · Strategy research · ML systems

Engineering field note. We are exploring a system that answers a narrower and more useful question than “where will price go?”: which strategy, if any, currently fits the market state well enough to deserve a paper test?

Origin of the concept: Search Edge by quantitative researcher Vladislav Freidyn. This note is our engineering reading of that architecture and our own test results, not his write-up — his is worth reading first. What we measured while building it is on the experiment scoreboard.

The distinction matters. Markets are non-stationary. A trend system can work during expansion and fail in a range; a grid can do the reverse. The goal of a Regime Switching Engine is not to crown one permanent winner. It is to combine market evidence, estimate the conditional quality of several strategy families, and make No Trade a first-class decision when the evidence is weak.

Why static trading systems decay

A fixed ruleset assumes that the relationship between its inputs and outcomes will remain stable. Real markets do not grant that assumption. Liquidity changes, volatility clusters, participant behavior adapts, and macro or microstructure shocks move the data-generating process itself.

That does not mean every strategy must be rebuilt every week. It means the system must measure when a strategy's historical context no longer resembles the current one. A useful selector therefore needs three capabilities:

  • describe the current market state with causal, point-in-time features;
  • estimate the expected net outcome of each eligible strategy and direction;
  • abstain when the prediction is stale, uncalibrated, unsupported, or economically negative after costs.

The feature engine comes before the model

A boosting model cannot rescue a leaking or poorly aligned dataset. The feature engine is the real foundation. Candidate inputs span several clocks and data sources:

Feature familyExamplesPrimary risk
Macro and structureDXY bias, market state, break of structure, change of character, BTC/ETH correlationPublication timing and revised data
DerivateFunding, open interest, OI change and ratioEight-hour observations aligned to faster candles
Volume and volatilityCVD, VWAP, anchored VWAP, ATR, volume profileVenue coverage and inconsistent volume definitions
Strategy contextTrend, range, compression, expansion and panic statesPost-hoc regime labels leaking future information

Every feature row must be reproducible using only information observed by the decision timestamp. In practice that means an as-of join, explicit source latency, freshness limits, and a causality test that changes future data and proves the historical feature prefix remains identical.

Why gradient-boosted trees

XGBoost, LightGBM, und CatBoost combine many shallow decision trees. Each new tree focuses on residual errors left by the existing ensemble. For noisy tabular market data, this family offers several practical advantages:

  • non-linear interactions without requiring a deep neural architecture;
  • L1/L2 regularization and constrained tree depth;
  • native handling of missing values, while still requiring explicit freshness rules;
  • feature attribution tools for investigation, not as a substitute for validation.

The model is not an autonomous trader. It is one candidate component inside a larger evidence pipeline. A useful output is a calibrated probability for a defined action, such as the probability that a locked trend strategy opened long at the next bar will finish net-positive under a fixed exit and cost contract.

The decision contract

Each training row should bind together the timestamp, symbol, candidate strategy, direction, causal features, entry rule, exit barriers, and cost assumptions. The label is the realized net outcome of that specific hypothetical trade. No Trade is not a timeout label. It is the decision produced when no candidate has positive expected value with adequate evidence.

features at time t
 candidate strategy + direction
 next-open entry
 ATR-scaled TP / SL / time barrier
 fees + slippage + funding
 matured outcome
-------------------------------
 calibrated P(net-positive)

A fixed probability threshold such as 0.65 can be a research hypothesis, but it is not a universal law. The economic threshold depends on reward-to-risk, costs, calibration error, and capacity. We prefer a locked expected-net-value rule selected inside development data, then judged outside it.

The honest validation path

Random k-fold validation is inappropriate for overlapping financial labels. Our proposed path is deliberately harder:

  1. Outer anchored walk-forward: training expands through time; each following test window remains untouched.
  2. Purge and embargo: training labels whose trade horizon could cross the boundary are removed.
  3. Nested development: early stopping, feature selection, calibration, hyperparameters, and the decision threshold are fitted only inside the outer training window.
  4. Matched null arms: block-permuted labels and exposure-matched random signals test whether the pipeline manufactures edge from noise.
  5. Sealed holdout: after the research protocol is frozen, the lockbox is opened once.
  6. Forward paper book: every prediction, model version, outcome, fee assumption, and drift state is appended to an immutable record.

A negative result is valid engineering output. If the candidate does not beat its null arms after costs, it is documented and not promoted.

Metrics that matter

Accuracy alone hides class imbalance and says nothing about the economics of a decision. Model quality should include log loss, Brier score, expected calibration error, PR-AUC, sample size, and coverage. Financial evaluation remains separate: net expectancy, profit factor, Sharpe and Sortino ratios, maximum drawdown, recovery, turnover, and performance against simple baselines.

The public interface should never collapse all of that into a single green percentage. Probability must travel with calibration status, evidence age, model version, forward observations, and a clear Paper or No-Trade state.

Concept drift is an operating state

Even a model that passes its historical examination can degrade. We monitor feature distribution shifts, missing and stale sources, and rolling probabilistic loss after labels mature. A production-safe state machine is conservative:

HEALTHY → WARNING → DEGRADED
                    ↓
                 NO TRADE

Recovery requires sufficient fresh evidence and a new locked evaluation. Retraining does not silently promote a replacement model; it creates a new challenger with a new version and forward start date.

From research core to a usable product

The useful interface is not a wall of model diagnostics. A trader should see the best-supported strategy fit, direction, calibrated probability range, expected result after costs, evidence status, and the reason the system chose to abstain. Deeper layers can expose walk-forward folds, null comparisons, feature attribution, forward history, and drift to researchers.

The same decision object can power the optimizer, a paper book, educational explainers, alerts, and public evidence pages. Live execution remains a separate permissioned capability and is never implied by a research verdict.

Building this with us

This work sits across several disciplines. We are interested in conversations with:

  • Quant ML engineers working on temporal validation, calibration, boosting, and model monitoring;
  • Data engineers building point-in-time pipelines for funding, open interest, market structure, and macro data;
  • Quant researchers formalizing labels, null hypotheses, multiple-testing controls, and risk-adjusted evaluation;
  • Trading infrastructure engineers focused on paper ledgers, cost-aware simulation, model registries, and safe execution boundaries.

If this is your field, contact the engineering team. If you want to inspect the current research surface first, open the Strategy Optimizer, the public Edge campaigns, and the FinEdg methodology.

Continue from this field note

Inspect the research surface or talk with the engineers building the evidence pipeline. Research stays Paper-first.

Open the research optimizer Discuss the engineering work
Would your strategy survive this lab?

We audit reader strategies with the same methodology as our published verdicts: real candles, real fees, no look-ahead. $19 quick verdict · from $149 full audit · from $500 bespoke research — fixed price before you send anything. See a real sample report first, no signup.

Überprüfen Sie meine Strategie →