# ath backtest

> Replay past results to evaluate one or more models.

Website: https://ath.fit/docs/backtest/
Markdown: https://ath.fit/docs/backtest.md

ATH v0.4.3 · MIT license. Documentation source: [cd89f72](https://github.com/mwhitham/ath/blob/cd89f72eceae3961ef1a05694226515c9e4321d2/src/program.ts). If your installed version differs, check its command help.

Checked 27 September 2026: v0.4.3 is available on npm.

## Usage

```text
ath backtest
```

## What it does

Runs predictions using evidence available before historical attempts and compares them with the actual outcomes. Writes a separate report; it does not change the training record.

## Examples

Configure a gateway key and a model first. Repeat --model to compare model IDs from ath models. --all uses every eligible model and asks before the run. These runs make gateway model calls and can incur provider usage charges.

```text
ath backtest --json
```

## Options

| Argument or option | Description |
| --- | --- |
| `-m, --model <name>` | a model to run; pass more than once to compare |
| `--all` | run every live text model that can reason, after showing the count |
| `--gateway <name>` | vercel or openrouter, when both keys are available |
| `--file <path>` | read a file other than the one in this folder |
| `-y, --yes` | do not ask before a long --all run |
| `--json` | structured output, for an agent rather than a person |

## Related commands

- [ath models](https://ath.fit/docs/models/)
- [ath share](https://ath.fit/docs/share/)
