What Matters: A forecast becomes useful evidence only after it faces a credible comparison on the same targets. Yesterday’s value is a demanding, inexpensive starting point for many price-level questions. This article uses an authored four-row fixture to show how the chosen baseline changes the apparent improvement, and how a baseline fitted with future observations can mislead.
Evidence checked 28 November 2026: The arithmetic below was executed on invented forecasts and observations. No AI model generated these predictions, and no trading return was measured. Official scikit-learn documentation supplies the definitions and implementation context for dummy predictors, mean absolute error and chronological evaluation. The 2027 edition describes a research method, not a forecast for 2027 markets.
Ask what the model must beat
“The AI predicted the price accurately” leaves several decisions unresolved. Which price, at what horizon, using information available at which cutoff? Is accuracy measured in currency units, percentage changes, direction or another loss? What could a simpler rule have achieved with the same information? A comparison cannot answer a question that the evaluation never specified.
For this demonstration, the target is the next observation’s price level. The persistence forecast uses the preceding observed level. A second baseline uses a fixed mean calculated from an earlier training sample. These rules are intentionally transparent: a reviewer can reconstruct every forecast without fitting a complex model or judging a narrative explanation.
Scikit-learn’s DummyRegressor documentation describes simple prediction strategies, including a mean fitted from training targets. Such a baseline is a comparison tool, not evidence that a constant mean is the appropriate benchmark for every financial series. Persistence has a different information pattern because it updates with each newly observed value.
The four observations that define the example
The invented training sample is 98, 99 and 100, so its mean is 99. The evaluation observations are 101, 102, 101 and 103. The starting level is 100; after each evaluation observation occurs, that value becomes available for the following persistence prediction. The candidate predictions were authored specifically for this worked example.
| Target | Actual | Persistence | Candidate | Persistence absolute error | Candidate absolute error |
|---|---|---|---|---|---|
| T1 | 101 | 100 | 101.5 | 1 | 0.5 |
| T2 | 102 | 101 | 102.5 | 1 | 0.5 |
| T3 | 101 | 102 | 103 | 1 | 2 |
| T4 | 103 | 101 | 102 | 2 | 1 |
Mean absolute error, or MAE, averages the absolute differences between actual and forecast values. The official metric documentation defines this loss. Persistence has total absolute error 5 across four targets, giving MAE 1.25. The candidate has total error 4, giving MAE 1.00. Its error is 20% lower relative to this persistence baseline: 1 − 1.00 / 1.25.
The candidate is better on three rows and worse on one. That detail matters because an aggregate improvement can conceal a particularly poor outcome at a relevant time. Four invented rows do not establish a distribution of future forecast errors. They let us inspect the arithmetic and see exactly where the difference comes from.
The baseline changes the headline
The fixed training mean predicts 99 for all four targets. Its absolute errors are 2, 3, 2 and 4, for MAE 2.75. Against that weaker comparator, the same candidate appears to reduce error by about 63.64%. Against persistence, it reduces error by 20%. Nothing about the candidate changed; only the comparison changed.
| Predictor | MAE in the fixture | Eligibility and interpretation |
|---|---|---|
| Fixed earlier training mean, 99 | 2.75 | Declared available before evaluation; relatively weak here |
| Persistence | 1.25 | Uses the immediately preceding observation |
| Authored candidate | 1.00 | Illustrative numbers; no model or timestamp verified |
| Mean of the evaluation actuals, 101.75 | 0.75 | Ineligible hindsight comparator for an earlier forecast |
The final row deliberately shows a mistake. Averaging the evaluation observations gives 101.75. Predicting that value on every evaluation row produces MAE 0.75, which beats the candidate. But the complete evaluation sample was unavailable when the first forecast had to be made. A convenient retrospective number has entered a supposedly prospective comparison.
This does not make a training mean invalid. It makes the fitting boundary essential. Scikit-learn’s guidance on data leakage explains why transformations and fitting must respect the training and evaluation separation. A baseline deserves the same scrutiny as the sophisticated model it is meant to judge.
Calculate the paired errors yourself
The worksheet accepts an identifier, actual value, persistence forecast and candidate forecast on each row. It also accepts the earlier training mean as a declared input. Replace the example with a small aligned table, then check the row errors before interpreting the aggregate. The tool cannot determine whether your predictions existed before their targets.
If persistence has zero MAE, the relative improvement formula would divide by zero. The worksheet reports that comparison as undefined. A perfect baseline cannot be improved under this loss on those rows; a candidate can tie it or make an error. Reporting an infinite percentage improvement or silently adding a denominator would obscure that boundary.
Match targets before comparing scores
A candidate predicting a five-minute closing price cannot be compared fairly with a baseline scored on the next daily close. Both forecasts need the same target definition, horizon, unit, timestamp convention and evaluation rows. Corporate actions, missing bars and differing session boundaries can change what a row means even when its date label looks identical.
Keep a forecast ledger containing the decision cutoff, target time, forecast value and version of the input data. Preserve failed or missing predictions rather than dropping them only for the candidate. If an evaluation excludes a row, document the exclusion and apply a comparison policy that was chosen before inspecting which model benefits.
A useful paired loss record stores candidate error minus baseline error for every common target. In this fixture, those differences are −0.5, −0.5, 1 and −1. Their sum is −1, explaining the 0.25 reduction in average error. The signs expose both improvements and deterioration without inventing a confidence statement from four examples.
Chronological splitting is necessary but incomplete
The TimeSeriesSplit interface provides chronological splits and an optional gap between training and evaluation indices. That is useful machinery, but the number of rows in a gap must be interpreted in relation to the actual feature and target construction. A split utility cannot inspect every economic timestamp or decide whether a future revision entered your features.
For overlapping forecast horizons, a training target may extend beyond the nominal cutoff even when its starting row appears earlier. Inspect target end times as well as feature timestamps. For revised financial data, confirm that each feature uses a version available at its decision. The existing data-vintage analysis explains why an old observation date is insufficient evidence of availability.
Preprocessing also belongs inside the boundary. A normalisation fitted on the entire dataset, a feature selected after inspecting evaluation results or a missing-value rule informed by later records can change the comparison. Record which operations were fitted, when they were fitted and which observations they could see.
Lower price error does not supply a trade
The metric answers how far the predictions are from the supplied price levels. It does not specify a position, holding period, execution venue or cost. A smaller average level error can coexist with poor decisions near a trading threshold. A system might make its largest mistakes precisely when its intended position is largest.
If the research question later becomes financial, define the decision rule separately and preserve the forecast evaluation. A return comparison would need executable timing, position sizing, costs and a consistent portfolio accounting convention. Adding those requirements changes the study; it cannot be inferred from the 20% error reduction in this authored fixture.
A practical baseline ladder
Begin with the simplest rule that matches the target and information set. For a level forecast, inspect persistence and an earlier fitted constant. For a different target, choose an appropriate equally transparent comparator and explain why it addresses that question. Then add complexity one step at a time, preserving the common target ledger.
Before testing another model, write down what result would justify the added complexity. That might be a stable reduction in a specified loss across several preselected periods, fewer severe errors or better performance in a defined operational condition. The criterion is a research decision, not a number supplied by this four-row example.
Choose the loss before selecting the winner. The script also records root mean squared error, which gives larger deviations more weight through squaring. In the fixture, persistence has RMSE about 1.3229 and the candidate about 1.1726. Those numbers answer a different loss question from MAE. Reporting both is informative; switching the headline metric after seeing which one flatters a candidate is a separate selection decision.
Methodology and limitations
A standard-library script reads the authored training values, observations and forecasts, calculates absolute errors, MAE and root mean squared error, and checks the four expected MAEs. The browser module independently calculates MAE from reader entries. Its tests include hand-calculated normal cases, a zero-error baseline, missing values, duplicate identifiers and nonfinite inputs.
No forecasting package or model was run, and no forecast timestamp was authenticated. The fixture contains no statistical sample of market behavior. It demonstrates a comparison protocol, a denominator boundary and a leakage example. Use the Trading Tool Lab to examine the arithmetic, then bring genuinely timestamped predictions to the same protocol before making an empirical claim.
Download the dated source and scenario record (JSON) · Download the reproducible calculation pack (ZIP).
Frequently asked questions
Did an AI model generate the candidate forecasts?
No. All candidate values were authored for the example. The executed script verifies error arithmetic, not model quality.
Why use persistence as a baseline?
It is a transparent rule for this price-level target: predict the next level using the preceding observed level. Other targets may need other baselines.
Does 20% lower MAE mean 20% higher profit?
No. It describes the relative reduction in average absolute forecast error in the invented fixture. No position, execution or trading return was calculated.
Why is the evaluation-sample mean ineligible?
Its value uses actual observations from the evaluation period, including observations that would be in the future at earlier forecast times.
What happens when baseline MAE is zero?
Relative improvement is undefined because the formula divides by the baseline error. The worksheet reports that boundary explicitly.
Primary sources and evidence
- scikit-learn DummyRegressor. Simple fitted baseline strategies, including training-target mean. Checked 2026-11-28.
- scikit-learn mean_absolute_error. Definition and calculation of mean absolute error. Checked 2026-11-28.
- scikit-learn TimeSeriesSplit. Chronological split interface and optional gap; does not establish full financial causality. Checked 2026-11-28.
- scikit-learn common pitfalls. Training/evaluation separation and data-leakage precautions. Checked 2026-11-28.
Editorial disclosure: This research explains documented capabilities and original worked examples. Inclusion does not imply endorsement, a commercial relationship or verified trading performance. No placement in this article was purchased.
Corrections and updates: Send source-backed corrections to press@decentralised.news. This 2027 edition was checked on 28 November 2026; documentation, permissions and product availability can change.




