Bentrix Docs
HomePricingDashboard

The record and the evaluation

Every forecast kept with what came, a report and a comparison of models, an evaluation over years of history at machine speed, and the one sheet that asks you before anything is downloaded.

01The journal

Each forecast a workbench receives is written to its journal with its anchor, its arrival and its steps. Journal on Settings › Forecast says where: Laboratory and paper (the default), Also REAL, or Off. The journal is what history is replayed from, by arrival.

02The report and the comparison

forecast_report scores a model's recorded forecasts on one market against what actually came, per step and overall:

MeasureWhat it says
mean absolute error, its percentage, root mean square errorhow far the closes were
mean signed errorwhether it leans too high or too low
direction hit ratehow often it got the move from the anchor's close right
each band's coveragehow often the price stayed inside a band, against the probability the band claimed
pinball loss, CRPShow good its quantiles and sampled paths were
mean latencyhow long after the close its forecasts arrived

A step is scored only if it had not closed when its forecast arrived: what the model could already see is not counted for it. forecast_compare sets several models side by side over the same journal and the same bars; a comparison is a laboratory's instrument, never published or ranked anywhere.

03An evaluation over history

An evaluation runs a model over a span of history at machine speed, close after close, without moving the workbench's clock. forecast_eval_make starts it; at each close forecast_eval_next hands the window cut there and scores the forecast handed back for the close before; forecast_eval_close answers the report.

Bentrix can drive it for you. Give forecast_eval_make a run_model — the name of a model in your models folder — and Bentrix hands the model each window itself, scores each answer, and walks the run to its end with no program in the loop; forecast_eval_state says when it has walked, and forecast_eval_close answers the report. The model runs on the engine you chose, in its host, and each run is logged on bentrix://models/runs.

Latency in an eval — None, Measured (the model's own mean delay on this workbench's journal), or a fixed number of milliseconds — stamps each forecast's arrival as close plus that delay, so a step the model could already see is late and unscored, as live.

04The sheet: when history is not on this computer

When an evaluation asks for days the workbench's laboratory does not hold, nothing is made and nothing is downloaded until you say so. A sheet stands in Bentrix's window:

i

Evaluate over days this workbench does not hold — the laboratory, the days, the markets that would be downloaded, and whether MetaTrader would be started for it.

  • Make it and run — Bentrix makes a workbench over those days in that laboratory, downloads them as any workbench's are, and starts the evaluation there once they are in.
  • No — nothing happens. This is your decision, not a failure, and it is recorded as yours.

Only you answer the sheet. No tool can press it. A program learns the answer from the bentrix://forecasts/eval event or from forecast_eval_state; every SDK has a helper that waits for it — eval_started in Python (raising DeclinedByThePerson for No and EvalFailed with its reason), evalStarted in JavaScript, EvalStarted in Go and C#, and the same name in the other languages.

05Training on the same windows

extract_windows writes the window at every close over a span as one CSV in the export folder — the input bars and, marked as the target, the bars of the interval after each close — so you can train on exactly what the model will be handed.

06What the record does not tell you

A good score over one stretch of history is not a good model: the market changes, and a model tried many times on the same history will look better than it is. Test on days the model never saw, and read testing honestly.

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed