How each kind is scored against what came — only against bars that had not closed when the value arrived — what you hand over for what Bentrix cannot compute, and a comparison of several outputs side by side.
01In plain words
A model's numbers are a claim. Measuring checks the claim: each value the model gave is paired with what the market did after that value arrived, and Bentrix counts how often the model was right — and, for a probability, how often a 70 % really came true seven times in ten.
Measure in the laboratory, on history, before you trust a model anywhere else. A model that does no better than tossing a coin is common, even when it looks sensible. Finding that out costs nothing in the laboratory.
02The rule
Every value is scored only against a bar that had not closed when it arrived. A value that could already see its bar is counted late and never scored; one whose bar has not closed yet is pending. So a model that is slow, or that sends its answer after the fact, is never credited for it.
03A report
output_report scores one output of one model on one market, against the workbench's bars up to its clock:
| Kind | Measures |
|---|---|
| A probability | AUC, Brier score, log-loss, a ten-bin calibration curve, the hits and misses at your threshold |
| Another number | MAE, RMSE, mean signed error, Pearson and Spearman correlation with the step's move |
| Named outcomes | log-loss, accuracy, each outcome's precision, recall and F1 |
| Quantiles | pinball loss and coverage at each level |
| A rank | per date: Spearman correlation — its mean, spread, ratio and worst run — against your target, and apart against the raw move |
| An event | the probability's measures, the lead time from the fire to the event, the fires nothing followed |
| Levels | the share of trades whose target came before the stop, from the bars' highs and lows |
| A position, weights, an action | measured in money only, by a laboratory strategy run |
| Text | never measured |
Name the interval the steps are bars of where the output's horizon does not.
app = bentrix.connect(name="my-program") # as in "your first output, step by step"
report = app.output.report(bench, "EURUSD", "dir_v4", "direction", interval="H1")04What Bentrix cannot compute
Some outcomes are not in the bars: the label your own rule gives, whether the event came, a tournament's residual target. Hand them over with output_actual_put — one realised thing per anchor: a value, a label or an event. An anchor past the workbench's clock is refused: what has not happened cannot have been realised.
05A comparison
output_compare sets the reports of several outputs on one market side by side, by name — never ranked. A comparison is your laboratory's instrument: nothing here is published or ranked anywhere else.
06The measures in plain words
You will meet these names in a report. You do not need the formulas to use them:
| Measure | What it tells you | Good is |
|---|---|---|
| AUC | How well the model's numbers tell the moves that came true from those that did not. | 0.5 is a coin toss. Above 0.5 is better than chance; 1 is perfect. Below 0.5 means the model is, on the whole, backwards. |
| Brier score | How far the probabilities were from what happened, on average. | Lower is better. 0.25 is what saying 0.5 every time gives. |
| Log-loss | Like the Brier score, but it punishes being confidently wrong much harder. | Lower is better. |
| Calibration | Whether the probabilities mean what they say: of all the times the model said about 0.7, did about 70 % come true? Shown in ten groups. | Each group's came true close to its mean. |
| At your threshold | The hits and misses where your meaning acts: right buys (true positives), wrong buys (false positives), right nothings (true negatives) and missed rises (false negatives). | More right than wrong — after you count the costs a trade would pay. |
| Precision and recall | Precision: of the times the model said yes, how often it was right. Recall: of the times the answer was yes, how often the model said so. | Higher is better; one usually rises as the other falls. |
| F1 and Matthews | One number each that balances the hits and misses. | Higher is better. Matthews is 0 for chance and 1 for perfect. |
| MAE, RMSE | For a number that is not a probability: how far it was from what came, on average. RMSE weighs big misses more. | Lower is better. |
| Mean signed error | Whether the model leans one way — always a little too high, or too low. | Close to 0. |
| Correlation (Pearson, Spearman) | Whether the model's numbers go up and down with what came. | 0 is no link; 1 moves together; −1 moves opposite. |
| Pinball loss, coverage | For quantiles: how good each level is, and how often the outcome really fell below it. | Coverage close to the level — 0.95 for the 95th percentile. |
| Lead time | For an event: how many candles of warning a true alarm gave. | More warning, fewer false alarms. |
And the counts on every report:
- scored — the values checked;
- late — values that arrived after the candle they spoke about had closed: shown, never scored;
- pending — values whose next candle has not come yet;
- unrealised — values with nothing to check them against yet, such as an event you have not handed over.
A good score is not a profit. A model that is right 55 % of the time can still lose money once spreads, commissions and timing are counted. A strategy run in the laboratory, with costs, is where that is seen.
07The measures themselves
Bentrix's AUC, Brier score, log-loss, Matthews correlation, Pearson and Spearman correlation, multi-outcome log-loss and pinball loss are pinned against the reference implementations of scikit-learn and SciPy on the same inputs, to twelve decimal places.