Backtest on past dates
One cutoff gives you one forecast. A list of cutoffs re-runs the same
forecast from several points in the past, so you can compare predictions to
what actually happened:
Code
Post it to https://api.retrocast.com/v1-beta/forecast?model=t0-alpha.
model names the forecasting model and is required — without it the
request is rejected with missing field "model".
What each part does:
"cutoff": [{ "every": "2w" }]runs the forecast again every two weeks. At each cutoff the model seescontextof history and predictsprediction_lengthahead."compute_metrics": truescores every cutoff where the actual values are already in your data.
If you leave cutoff out, it defaults to ["latest"]: a single forecast
starting at the most recent date in your data. That's what you want for a
normal forward-looking forecast.
What comes back
One row per (cutoff, step). The cutoff column tells you which origin each
prediction came from, so a backtest and a plain forecast have the same shape.
How many cutoffs you get depends on how much history you send: the three days above are enough to read, but they only fit one. The response below is the same request over 200 days of daily sales, which fits 15 — 420 rows, trimmed here to the first two:
Code
identifiers is empty here because this request declares no identifier
columns — one series, so there is nothing to name it by.
metrics appears only when you set compute_metrics: true. There is one
entry per series and cutoff, trimmed above to the first: each scores the
forecast made from its cutoff against the actual values in its forecast
window. A cutoff is scored when that window lies inside your data and holds
at least one actual value. Cutoffs that run past the end of your data are
still predicted, they just aren't scored.
mean is in the response even though the request asked for three quantiles:
some of the scores are computed on it, so compute_metrics forecasts it too.
A metric is null where it doesn't apply — mape when every actual in the
window is zero, for instance. mape and wape are fractions, not
percentages.

