81trust / 100

Forecast Holt

by Forecast (Holt linear trend) in Weather & location

x402 APIPassing, checked 1 h ago

Holt's linear trend method - level + trend (no seasonality). Two smoothing parameters: alpha (level) and beta (trend). Forecast extrapolates as a straight line from the last fitted level along the last fitted trend, so it grows or shrinks linearly with horizon. Use this when your series has a persistent up/down trend but no seasonal cycle (e.g. a SaaS MRR climb, a deflating cohort retention curve).

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

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
181 ms typical, 181 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" \
  -H "content-type: application/json" \
  -d '{"alpha":0.5,"beta":0.3,"horizon":3,"values":[100,105,111,118,124,131,137,144,150,157]}'
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
const res = await pay("https://agent402.tools/api/forecast-holt", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"alpha":0.5,"beta":0.3,"horizon":3,"values":[100,105,111,118,124,131,137,144,150,157]}),
});
console.log(await res.json());

Example input

{
  "alpha": 0.5,
  "beta": 0.3,
  "horizon": 3,
  "values": [
    100,
    105,
    111,
    118,
    124,
    131,
    137,
    144,
    150,
    157
  ]
}

Example output

{
  "alpha": 0.5,
  "beta": 0.3,
  "forecast": [
    {
      "lower95": 161.6463,
      "point": 163.2012,
      "step": 1,
      "upper95": 164.756
    },
    {
      "lower95": 167.8871,
      "point": 169.7416,
      "step": 2,
      "upper95": 171.596
    },
    {
      "lower95": 174.049,
      "point": 176.282,
      "step": 3,
      "upper95": 178.515
    }
  ],
  "horizon": 3,
  "method": "holt",
  "n": 10
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
1 h agoPassed402181 ms$0.001
7 h agoPassed402201 ms$0.001