surfaceanalysisforecast
Analysisscalar · returns json

FORECAST

Forecast a univariate time series via zero-shot Chronos-Bolt

Per-row — runs once for each row.

analysisdeterministicjson

Arguments

nametypedescription
valuesJSONOrdered array of numeric historical values
horizonINTEGERNumber of future steps to predict

About

Zero-shot time-series forecasting via Amazon Chronos-Bolt on the specialist zoo GPU. Takes an ordered array of historical values and a prediction length, returns a JSON struct with quantile trajectories (10th / 50th / 90th percentiles by default) for the next `horizon` steps. Important: Chronos does NOT see the timestamps — it only sees the sequence of values in the order you provide them. Use ARRAY_AGG with an explicit ORDER BY in the caller to guarantee temporal order: SELECT forecast(ARRAY_AGG(close ORDER BY ts), 12) FROM prices; If you pass values out of order, the forecast will be garbage. Chronos-Bolt is pretrained and stateless — no fit step, no blob to persist, nothing scoped per-tenant. Just a foundation model. Output shape: { "horizon": 12, "model": "amazon/chronos-bolt-base", "quantiles": { "0.1": [...], "0.5": [...], "0.9": [...] }, "median": [...], # alias for quantiles["0.5"] "n_context": 204 }

Examples

Forecast a trended sinusoid, verify quantile struct shape

WITH
  series AS (
    SELECT
      i,
      SIN(i * 0.3) + 0.05 * i AS y
    FROM
      range (0, 48) t (i)
  )
SELECT
  forecast (
    ARRAY_AGG(
      y
      ORDER BY
        i
    ),
    6
  ) AS fc
FROM
  series;

Nearby rabbit holes

same domain
Climb back to The Looking Glass