---
name: pretick-forecasting
description: Forecast the next numeric values in chronological time-series data using the Pretick API. Use for sales, revenue, demand, costs, pricing, or historical market-data forecasts when the user wants numerical predictions, uncertainty ranges, or to connect Pretick as a forecasting provider.
license: MIT
metadata:
  version: "1.1.0"
  website: https://pretick.ai/agents
---

# Pretick forecasting

Use Pretick to generate numerical forecasts from observed history. The current model is Amazon Chronos-2, pretrained on real-world and synthetic time series. It returns predictions and quantiles, not prose or trading instructions. It does not fetch market data or permanently train on requests.

## Connect

For MCP-capable agents, use the live Streamable HTTP endpoint https://pretick.ai/mcp. Setup: https://pretick.ai/docs/mcp. Use OAuth; the human enters their emailed key only on pretick.ai, never into chat. Tools are `forecast`, `forecast_advanced`, and `get_usage`. Use the same request fields below with those tools. Forecasts use the existing account balance; checking usage is free. Revoke connections at https://pretick.ai/connections.


- Use the customer's existing `PRETICK_API_KEY` from their environment or secret manager. Keep it out of source, URLs, shell arguments and chat output.
- If they need a key, direct them to https://pretick.ai/start. With their instruction to send a trial email, you can call `POST https://pretick.ai/v1/trial` with `{"email":"their-email"}`. The response does not contain the key; the user retrieves it from email and configures it securely.
- A trial includes 5 forecasts. Each successful request costs $0.02. Forecast within the user's requested scope/budget; don't start repeated experiments or backtests implicitly. Check balance with `GET /v1/usage` when needed. A human buys additional credit at https://pretick.ai/pricing using the same email; the existing key continues working.
- HTTP-capable agents can call the API directly. The bundled helper requires Node.js 20+ and no installed packages. Resolve paths below relative to this skill folder.

```sh
node scripts/pretick.mjs usage
node scripts/pretick.mjs forecast --file examples/sales.txt
node scripts/pretick.mjs forecast --file history.txt --horizon 7
```

## Forecast

1. Use the user's actual chronological observations, oldest first. When obtaining data from another source, identify its source, date range and units. Never substitute example data for their data.
2. Send `POST https://pretick.ai/v1/timeseries/forecast` with `Authorization: Bearer YOUR_KEY`, `Content-Type: application/json`, and `{"data":"102, 108, 111, 104, 99, 106"}`. A numeric array also works. Simple input supports 3-1,024 observations. Omit `horizon` to predict the same number of entries; set it to 1-1,024 when requested.
3. Pasted input accepts common separators, time/value columns or rows, and alternating date/value lines. The first set is time/key, the second is the value. Slash dates mean month/day[/year]; missing years start in the current year. Numeric keys and regular dates are continued. Some weekday-only daily patterns infer a weekday schedule: weekends are skipped but future holidays are NOT excluded. Preserve and explain any returned `time_schedule`; do not describe it as an exchange calendar. Do not silently fill missing data.
4. Read `predictions` first: a flat median array for one target. Pair it with `times` when returned. Present a solid observed-history line and a dotted forecast when graphing; keep predictions distinct from observations. Include copyable numbers in a layout similar to the input. Report the forecast horizon and units. Quantiles describe possible variation, not guaranteed confidence coverage.
5. Retain `request_id`, `cost_cents` and `balance_cents` when useful for accounting. Forecast calls are not idempotent: do not automatically retry after a timeout. Inspect usage to determine whether a charge/request completed; usage does not recover the forecast values. If another call is needed, make the additional cost clear.

The helper prints the complete JSON response to stdout and errors to stderr. It makes one API request per invocation, refuses redirects, and never automatically retries. `--file -` reads pasted text from stdin. `--json request.json` sends an advanced request. Run `--help` for commands.

## Errors and advanced work

Use model pretick-default or omit model; provider IDs such as chronos-2 are not valid API model IDs. Simple data must be text or a flat numeric array, not date/value objects. Advanced history.values must be a numeric matrix. Chat messages and provider-specific payloads are not supported. Shared tested examples: https://pretick.ai/forecast-examples.json.

Read [the API reference](references/api.md) for multiple value columns, quantiles, error handling and market-research examples. Canonical contract: https://pretick.ai/openapi.json. Human guide: https://pretick.ai/docs.

For market research, evaluate forecasts on chronologically held-out observations and compare with a last-value baseline. A numerical forecast alone does not establish profitable trading performance. Pretick supplies neither live prices nor corporate-action adjustment nor exchange holiday calendars. Use the user's chosen data provider/calendar and do not imply those capabilities are included.
