80trust / 100

Forecast Holt Winters

by Forecast (Holt-Winters seasonal) in Weather & location

x402 APIPassing, checked 1 h ago

Holt-Winters triple exponential smoothing - level + trend + seasonal component. Use for series with a repeating cycle (weekly retail traffic, monthly utility usage, quarterly revenue). Additive seasonality (constant amplitude) or multiplicative (amplitude grows with level). `period` is optional - if omitted, the kit auto-detects via autocorrelation on first differences and surfaces what it picked (with the ACF strength) so you can audit. Needs at least two full seasonal cycles to fit reliably.

POST https://agent402.tools/api/forecast-holt-winters

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
191 ms typical, 312 ms slowest 5%
Last check
1 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-holt-winters" \
  -H "content-type: application/json" \
  -d '{"horizon":4,"period":4,"values":[10,14,18,22,11,15,19,23,12,16,20,24]}'
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-holt-winters
const res = await pay("https://agent402.tools/api/forecast-holt-winters", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"horizon":4,"period":4,"values":[10,14,18,22,11,15,19,23,12,16,20,24]}),
});
console.log(await res.json());

Example input

{
  "horizon": 4,
  "period": 4,
  "values": [
    10,
    14,
    18,
    22,
    11,
    15,
    19,
    23,
    12,
    16,
    20,
    24
  ]
}

Example output

{
  "alpha": 0.5,
  "beta": 0.1,
  "forecast": [
    {
      "lower95": 11.6958,
      "point": 12.5324,
      "step": 1,
      "upper95": 13.369
    },
    {
      "lower95": 15.5421,
      "point": 16.7253,
      "step": 2,
      "upper95": 17.9084
    },
    {
      "lower95": 19.4972,
      "point": 20.9462,
      "step": 3,
      "upper95": 22.3952
    },
    {
      "lower95": 23.5098,
      "point": 25.1831,
      "step": 4,
      "upper95": 26.8563
    }
  ],
  "gamma": 0.1,
  "horizon": 4,
  "method": "holt-winters",
  "n": 12,
  "period": 4,
  "periodSource": "provided",
  "seasonality": "additive"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402312 ms$0.001
5 h agoPassed402188 ms$0.001
8 h agoPassed402191 ms$0.001
12 h agoPassed402185 ms$0.001
15 h agoPassed402187 ms$0.001
20 h agoPassed402256 ms$0.001
23 h agoPassed402347 ms$0.001
26 h agoPassed402190 ms$0.001
32 h agoPassed402270 ms$0.001