tabicl-gold-btc-finetuned

TabICL checkpoint (Tabular Foundation Model, in-context learning) fine-tuned for trading-action prediction (Buy / Sell / Hold), intended to serve as the 5th expert inside a multi-expert EARCP (Expert Aggregation with Regret Control and Performance tracking) ensemble.

⚠️ Loading and usage (read before any predict_proba() call)

This checkpoint is an in-context learning model: .fit(X, y) does two things — (1) gradient fine-tuning of the backbone (preserved by pickle) and (2) encoding of the provided (X, y) context (_X_encoder_, NOT preserved by pickle.dump()/pickle.load()).

Practical consequence: loading tabicl_finetuned.pkl with pickle.load() succeeds without error, but calling predict_proba() right after raises NotFittedError (missing _X_encoder_). You must call .fit() once, with a representative context set, right after loading — see load_reference.py in this repo for a complete script and the exact 49-column order.

import pickle
from huggingface_hub import hf_hub_download

ckpt   = hf_hub_download("AMFORGE/tabicl-gold-btc-finetuned", "tabicl_finetuned.pkl")
scaler = hf_hub_download("AMFORGE/tabicl-gold-btc-finetuned", "feature_scaler.pkl")
clf    = pickle.load(open(ckpt, "rb"))
scl    = pickle.load(open(scaler, "rb"))

# REQUIRED after every load: rebuilds the in-context encoder.
# X_context/y_context: see load_reference.py for the exact 49-column layout.
clf.fit(scl.transform(X_context), y_context)

proba = clf.predict_proba(scl.transform(X_new))  # [p_buy, p_sell, p_hold]

Model details

  • Base architecture: TabICL v2, with gradient fine-tuning of the backbone (FinetunedTabICLClassifier — see tabicl)
  • Task: 3-class classification (0=Buy, 1=Sell, 2=Hold)
  • Training symbols: XAUUSD.ecn, BTCUSD.ecn
  • Timeframes used: M1, M5, M15, M30, H1, H4, D1
  • Input dimension (state_size): 49 (= 7 base features × 7 timeframes, no asset-family one-hot on this checkpoint — 2 symbols only)
  • Exact 49-column order: see load_reference.py (7 features × [M1,M5,M15,M30,H1,H4,D1] in this order)
  • Base features per timeframe: close, trend_strength, candle_pattern, volatility, market_regime, candlestick_pattern, chart_pattern — exact formulas (windows, thresholds) documented in load_reference.py
  • Labeling: anti-lookahead triple-barrier (TP=2.0×ATR, SL=1.0×ATR, horizon=60 bars of the finest available timeframe)
  • Fine-tuning date: 2026-07-01T18:18:00Z

Training data

  • Training samples: 34000
  • Validation samples: 6000
  • Source: MT5 exports (OHLCV per granularity, per symbol)
  • Some timeframes were deliberately not exported for all symbols (deliberate choice, not a gap); in that case the corresponding features are filled with 0, exactly like the production bot's fallback when a granularity fails to fetch. Train/serve consistency guaranteed.

Results (validation set)

Overall accuracy: 0.6453

Class Precision Recall F1-score Support
Buy 0.68 0.71 0.70 1948
Sell 0.68 0.76 0.72 2058
Hold 0.55 0.46 0.50 1994

Intended use

This checkpoint is designed to serve as the 5th expert in a multi-model trading ensemble, where its contribution weight is adjusted dynamically based on its performance and consistency with the other experts. A context-rebuilding .fit() is required after every pickle load (see section above and load_reference.py) — this is not optional, skipping it raises NotFittedError at inference. It is not intended for standalone trading decisions without human supervision and upstream risk management.

Limitations

  • Trained on synthetic/historical MT5 data; past performance does not guarantee future results.
  • Some features may be zero for timeframes not exported for a given symbol (see above).
  • The pickle does not preserve the in-context encoder (see "Loading and usage" section) — a context .fit() is required on every load, in every new process.
  • TabICL inference cost is higher than a classic gradient-boosting model (XGBoost); evaluate against the target system's latency constraints.
  • Not financial advice.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support