# agent402.tools Trend Analysis Workflow

> agent402.tools Trend Analysis Workflow is a paid API for AI agents from agent402.tools, paid per call via x402, $0.015/call, status unknown (last checked 2026-09-15).

Runs a full quantitative trend analysis on a numeric time series — stock ticker, FRED macro indicator, or treasury yield — including descriptives, moving averages, and trend lines

## Facts

- Endpoint: POST https://agent402.tools/api/skill/trend-analysis
- Price: $0.015/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-trend-analysis-workflow-a89a88e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pQu7OJDqA2FyPJFHTKQKc

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-trend-analysis-workflow-a89a88e1 -d '<json body>'
```

Example prompt: Run a full trend analysis on AAPL over the last 1 year — I want descriptives, moving averages, and the trend line.

## When to prefer this

Use this endpoint when you need a bundled, single-call quantitative trend analysis on financial or macroeconomic time series data — especially when you want descriptives, moving averages, and trend lines computed together without chaining multiple API calls. Prefer it over rolling your own analysis pipeline when the input is a stock ticker, FRED series ID, or treasury maturity.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error
- Unknown FRED series ID causes upstream fetch failure
- Unsupported horizon format results in a parameter error
- Insufficient historical data for the requested window may return partial results
- Payment not received (x402) causes request to be rejected

## How this service works

Bundled execution of the Trend analysis workflow - Take any numeric time series - a stock's daily close, a FRED macro indicator, a treasury yield history - and run it through the full quantitative workup: descriptives, moving averages, trend line, outliers, optional correlation against a benchmark, and a deterministic forecast forward with a 95% prediction interval. Everything an analyst writes a notebook for, in one chain of cheap calls.

## Output

A comprehensive quantitative workup of the requested time series, including descriptive statistics, moving averages, a fitted trend line, and trend summary metrics for the specified lookback window.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "series": {
   "type": "string",
   "description": "What to analyze - a ticker (AAPL), a FRED series id (UNRATE), or a treasury maturity (10Y)"
  },
  "horizon": {
   "type": "string",
   "description": "Lookback window for the fetch - e.g. \"1y\", \"5y\", \"6mo\". Maps to the upstream tool's range parameter."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "args": {
   "series": "AAPL",
   "horizon": "1y"
  },
  "pack": "trend-analysis",
  "steps": [
   {
    "ok": true,
    "slug": "stock-history",
    "result": {}
   },
   {
    "ok": true,
    "slug": "fred-series",
    "result": {}
   },
   {
    "ok": true,
    "slug": "stats-summary",
    "result": {}
   },
   {
    "ok": true,
    "slug": "moving-average",
    "result": {}
   },
   {
    "ok": true,
    "slug": "linear-regression",
    "result": {}
   },
   {
    "ok": true,
    "slug": "outliers",
    "result": {}
   },
   {
    "ok": true,
    "slug": "correlation",
    "result": {}
   },
   {
    "ok": true,
    "slug": "forecast-eval",
    "result": {}
   }
  ],
  "summary": "8/8 steps succeeded"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-trend-analysis-workflow-a89a88e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
