# Replay and backtest

> Replay and backtest is an open-source agent skill for finance and payments. Lets an agent validate rule changes against recorded fixtures before paper trading. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/swcstudiospace/PumpGrok/tree/main/skills/replay-and-backtest
- **Repository:** https://github.com/swcstudiospace/pumpgrok
- **GitHub stars:** 93
- **License:** AGPL-3.0
- **Skill name:** replay-and-backtest
- **Collection:** https://github.com/swcstudiospace/PumpGrok
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments)
- **Listing updated:** 2026-12-04

## About

This skill gates any rule change behind a deterministic replay run. The agent executes a candidate rule against recorded market history through a supervisor, the rule itself, and a paper trading adapter, all driven by a fixture clock so that ids and fills reproduce exactly. Replay ledgers are kept separate from live metrics, and the candidate must beat a pinned baseline on a scorecard covering fills, drawdown and halt behavior before it can move forward.

The workflow picks a dataset matching the market regime under test, defaulting to a smoke fixture set, and runs a one-shot replay command. The agent then checks that the ledger contains only replay-sourced rows and fails the run if replay data leaks into paper metrics. Failure modes such as nondeterminism, missing datasets or regime drift are addressed by pinning divergences, adding fixtures or restoring recorded data rather than substituting live traffic.

It expects a repository that contains the replay runner and recorded fixtures, along with the PumpGrok command-line tool. Event-mode replay on a seeded random generator is also covered in the notes, with related pin tests for hashes.

## When your agent uses it

> Validate every rule change on deterministic replay fixtures through the supervisor, the rule, and the paper adapter on a fixture clock before it may touch a ticket.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/swcstudiospace/PumpGrok/tree/HEAD/skills/replay-and-backtest)
- [License: AGPL-3.0](https://github.com/swcstudiospace/PumpGrok/tree/HEAD/skills/replay-and-backtest)

## Features

- **Deterministic replay execution:** Runs candidate rules against recorded fixtures on a fixed clock so results reproduce byte-for-byte.
- **Baseline comparison scorecard:** Checks fills, drawdown and halt behavior against a pinned baseline before promotion.
- **Replay ledger isolation:** Keeps replay-sourced rows separate so they never feed live paper metrics.
- **Dataset selection guidance:** Chooses the fixture set matching the market regime being tested.
- **Failure mode triage:** Lists common replay failures such as nondeterminism, regime drift and missing datasets with actions.
- **Explicit paper promotion:** Requires a passing replay before a paper trial with a fresh ticket series.

## Good for

- Validate a new entry signal rule against recorded history before paper trading
- Backtest an exit rule change and compare fills and drawdown to the baseline
- Check that a replay run leaves no replay rows in live paper metrics
- Diagnose why a replay passes but the paper trial fails

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/replay-and-backtest` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/replay-and-backtest &&
cp -R "$tmp/skills/replay-and-backtest" ~/.claude/skills/replay-and-backtest &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/replay-and-backtest` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/replay-and-backtest` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/replay-and-backtest &&
cp -R "$tmp/skills/replay-and-backtest" ~/.agents/skills/replay-and-backtest &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/replay-and-backtest` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/replay-and-backtest` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/replay-and-backtest &&
cp -R "$tmp/skills/replay-and-backtest" ~/.cursor/skills/replay-and-backtest &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/replay-and-backtest` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/swcstudiospace/PumpGrok.git --path skills/replay-and-backtest
```

Or copy the folder to `~/.gemini/skills/replay-and-backtest` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/replay-and-backtest`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/replay-and-backtest &&
cp -R "$tmp/skills/replay-and-backtest" ~/.copilot/skills/replay-and-backtest &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/replay-and-backtest` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/swcstudiospace/PumpGrok.git
```

Then copy `PumpGrok/skills/replay-and-backtest` into your agent's skills folder as `replay-and-backtest`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs the PumpGrok runner and recorded fixtures under tests/fixtures/replay, such as the smoke dataset, and it runs a one-shot replay command against them.

### Does Replay and backtest touch live endpoints?

No. The workflow uses recorded fixtures only and states that replay should never run against live endpoints.

### Where are replay results stored?

Replay ledgers are written under var/replay/<dataset>/ with source=replay rows and are not meant to feed live metrics.

### Does Replay and backtest replace the lighter replay checkpoint?

No. The lighter run_replay checkpoint only writes its verdict row and does not run the paper adapter, so the full command is the one the skill uses.

### How do I install Replay and backtest in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/replay-and-backtest to use it in all your projects, or to .claude/skills/replay-and-backtest in one project.

### Does Replay and backtest run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Replay and backtest?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Replay and backtest?

The closest alternatives to Replay and backtest are Desk strategy lab, Live gate procedure, Grokbot pipeline, Pumpgrok setup and Desk post trade review.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Desk strategy lab](https://ai-powered.com/skills/desk-strategy-lab): Desk strategy lab is an open-source agent skill for finance and payments.
- [Live gate procedure](https://ai-powered.com/skills/live-gate-procedure): Live gate procedure is an open-source agent skill for finance and payments.
- [Grokbot pipeline](https://ai-powered.com/skills/grokbot-pipeline): Grokbot pipeline is an open-source agent skill for finance and payments.
- [Pumpgrok setup](https://ai-powered.com/skills/pumpgrok-setup): Pumpgrok setup is an open-source agent skill for finance and payments.
- [Desk post trade review](https://ai-powered.com/skills/desk-post-trade-review): Desk post trade review is an open-source agent skill for finance and payments.
- [Desk operating model](https://ai-powered.com/skills/desk-operating-model): Desk operating model is an open-source agent skill for finance and payments.
- [Paper broker](https://ai-powered.com/skills/paper-broker): Paper broker is an open-source agent skill for finance and payments.
- [Desk doctor](https://ai-powered.com/skills/desk-doctor): Desk doctor is an open-source agent skill for finance and payments.

---
Source: https://ai-powered.com/skills/replay-and-backtest
