Confidence That's
Actually Calibrated

Calibrus is an open-source hybrid model based on DistilBERT and MLP for trading decisions typed routes, a continuous score and confidence that means what it says. Built on PyTorch, Transformers, Pandas/Pandas-ta and Numpi.

3
Typed Routes — Long / Short / Hold
ECE
Calibration Error Measured, Not Assumed
CSV/DB
Bring Your Own Data
MIT
Free & Open Source

Decisions, Not Guesses

One command in, one typed decision out with a confidence score you can actually trust

terminal — calibrus.infer
# Feed it market features + optional text context
python3 -m calibrus.infer \
  --checkpoint checkpoints/calibrus_model_calibrated.pt \
  --features '{"feat_rsi_14": 28.4, "feat_macd": 0.12}' \
  --text "Fed signals rate cut, market rallies"

{
  "route": "long",
  "score": 0.73,
  "confidence": 0.88,
  "probs": { "short": 0.03, "hold": 0.06, "long": 0.91 }
}

# 0.88 confidence means: right ~88% of the time — measured on your own validation set, not marketing copy

Built to Be Honest About Uncertainty

Most classifiers are overconfident by default. Calibrus measures and corrects for that, with your own data.

Temperature Scaling

A single learned parameter recalibrates raw model confidence on a held-out validation set no architecture changes, no retraining, just honest probabilities.

ECE Measured Every Run

Expected Calibration Error is computed before and after calibration and logged in every checkpoint you see exactly how well-calibrated your model is, not just its accuracy.

Hybrid Architecture

A transformer text encoder and a numeric MLP encoder fused into shared decision heads — handles market features and news/sentiment text in a single pass.

Bring Your Own Data

CSV, Parquet or MariaDB as source. Auto-computes technical indicators (RSI, MACD, Bollinger Bands, EMA, ATR, OBV) from raw OHLCV, or plug in your own features directly.

Temporal Split, Always

No random shuffling of time-series data. Train/validation/test splits are strictly chronological, the way it has to be done for any honest backtest.

MIT Licensed

Fork it, modify it, run it commercially — no restrictions. Self-host on your own infrastructure, your data never leaves your machine.

How Calibrus Works

From raw market data to a calibrated decision — five stages, each runnable on its own

Load
CSV, Parquet or MariaDB as source
Features
Auto technical indicators or your own feat_* columns
Train
Hybrid text + numeric model, temporal split
Calibrate
Temperature scaling on validation set, ECE logged
Infer
Typed route + score + calibrated confidence

Why Calibration Matters

A model that's wrong about its own confidence is more dangerous than one that admits uncertainty

The Problem

A standard classifier says "long" at 99% confidence even when it's wrong half the time — there's no way to know when to trust it.

The Fix

Calibrus fits a temperature parameter post-training so "90% confidence" actually means right 9 times out of 10, measured on your data.

Automate Safely

Set a confidence threshold for autonomous action and escalate everything below it to human review — informed by real numbers, not guesswork.

Fully Transparent

Every checkpoint logs ECE before and after calibration. You can verify the model's honesty yourself — it's not a black box claim.

Clone It, Train It, Own It

Calibrus is free and open source under the MIT license. Self-host on your own data.