Forecast (naive baselines) · Forecast Naive

by Forecast (naive baselines)

POSTBaseSolanaArbitrumPolygonMonadAvalancheeip155:1329OptimismFraxtaleip155:42220stellar:pubnetalgorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

$0.001

per call · USD Coin on Base

Three textbook baseline forecasts: mean (forecast = average of history), naive (forecast = last value), drift (linear extrapolation from first to last point). Use as a sanity floor - any sophisticated method (SES, Holt, Holt-Winters) should beat the best of these on a backtest, otherwise the extra complexity isn't earning its keep. Returns point forecasts + 95% prediction intervals per Hyndman §3.1.

Endpoint

POST https://agent402.tools/api/forecast-naive

3

Calls / 30d

2

Unique payers / 30d

Aug 31

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agent402.tools/api/forecast-naive", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "horizon": 3,
    "method": "drift",
    "values": [
      10,
      12,
      13,
      12,
      15,
      16,
      18,
      19,
      21,
      22
    ]
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://agent402.tools/api/forecast-naive" \
  -H "Content-Type: application/json" \
  -d '{"horizon":3,"method":"drift","values":[10,12,13,12,15,16,18,19,21,22]}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "forecast": [
    {
      "lower95": 21.8037,
      "point": 23.3333,
      "step": 1,
      "upper95": 24.863
    },
    {
      "lower95": 22.3979,
      "point": 24.6667,
      "step": 2,
      "upper95": 26.9355
    },
    {
      "lower95": 23.0977,
      "point": 26,
      "step": 3,
      "upper95": 28.9023
    }
  ],
  "horizon": 3,
  "method": "drift",
  "n": 10
}

Payment details

Pay to0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana, Arbitrum, Polygon, Monad, Avalanche, eip155:1329, Optimism, Fraxtal, eip155:42220, stellar:pubnet, algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
Schemesexact, upto

Is this your API?

Pin it to the top of Data & Enrichment and the homepage with a featured placement.

Get featured →

More from Forecast (naive baselines) & similar services