Regime / Technical desk
The ML desk — an XGBoost regime classifier (78.9% on NEAR's test set vs 76.1% persistence) used as a risk read, not a price oracle.
Agent token 2. This is the ML desk — and it's where HeliQuant's honesty about machine learning lives. It runs the model that earned its place (a regime classifier) and explicitly does not run the one that didn't (a directional predictor).
In / Process / Out
firm/organization.py · tool_regime() over each asset's data/{ticker}_features.csv:
- In: the latest feature row (ADX,
ema_slope_5,volatility_10) + ADX/vol quantile thresholds. - Process:
scripts/multi_asset.detect_currentmaps the row to a regime with three deterministic rules — highvolatility_10→High_Volatility; else highadx→Trending_Up/Trending_Down(byema_slope_5sign); elseRanging. A dynamic R:R (2.0–3.0) is scaled from ADX strength. - Out:
{current_regime, adx, trending_threshold, trend_following_applicable_now, recommended_dynamic_rr, regime_classifier_oos_accuracy, oos_validated_trading_edge, status}.
The live label is a rule-based proxy — the XGBoost is the backtest engine
This is the honest nuance. The live regime label that feeds the PM each cycle is the rule-based
detect_current proxy above — not a fresh XGBoost inference. The XGBoost classifier is trained and
scored in the backtest replay path (scripts/multi_asset.py — model.predict;
replay()); it is not called on the live tick.
The accuracy string comes from models/regime_metadata.json, written by scripts/05_train_regime_classifier.py
(NEAR, 1-hour bars from a Binance data mirror, ~365 days, 4-hour forward label): 78.9% on the held-out test
split (n = 1,113) against 76.1% for persistence — +2.8 points — and 68.0% ± 5.2% under
cross-validation. The same string is emitted for every asset, so treat it as a property of the method on NEAR,
not a per-asset live accuracy. And — as everywhere on this site — accurate regime ≠ trading profit:
oos_validated_trading_edge is false for every asset today.
Pipeline
Regime → action
Output (shape)
{
"current_regime": "…",
"adx": 18.4,
"trending_threshold": 20.0,
"trend_following_applicable_now": false,
"recommended_dynamic_rr": 2.2,
"regime_classifier_oos_accuracy": "78.9% on the held-out test split vs 76.1% persistence baseline (n=1113, NEAR/USD)",
"oos_validated_trading_edge": false,
"status": "NO validated trend-following edge — abstain unless a genuine edge applies"
}The honest ML story
A directional ML (XGBoost predicting BUY/SELL) is not used: every hypothesis, ML or not, must clear the same cost-aware out-of-sample gate (Finding #7), and none has for NEAR (Finding #5). Trend-following and price-momentum on NEAR were negative out-of-sample after costs (momentum −35.04%).
What is measurably useful is the regime classifier (78.9% vs 76.1% persistence on NEAR). But an accurate regime
label is not a trading profit — so it's used as a capital allocator / risk read feeding the PM,
never as a price oracle, and the live label is the cheap, responsive detect_current proxy rather than a
per-tick model inference. The good model earns its place; the disproven one stays out. That distinction is
the differentiator.