81trust / 100

Forecast Naive

by Forecast (naive baselines) in Weather & location

x402 APIPassing, checked 3 h ago

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.

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
196 ms typical, 196 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -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]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fforecast-naive
const res = await pay("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]}),
});
console.log(await res.json());

Example input

{
  "horizon": 3,
  "method": "drift",
  "values": [
    10,
    12,
    13,
    12,
    15,
    16,
    18,
    19,
    21,
    22
  ]
}

Example output

{
  "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
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402196 ms$0.001
8 h agoPassed402200 ms$0.001