backtest

backtest is a skill for Claude Code, Codex from MangroveTechnologies/mangrove-agent. It costs 132 tokens per session (3,014 once invoked), scanned A, original, MIT.

A tool for testing an existing trading strategy against historical market data; this process is called backtesting.

In plain words
What is it for?
Use it to choose a data window, run a historical evaluation, and receive a result for an existing strategy.
Why use it?
It helps avoid judging a strategy from a short or unsuitable period that produces too few trades or reflects only one market condition.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mangrovetechnologies/mangrove-agent/backtest
Any agent
npx skills add MangroveTechnologies/mangrove-agent --skill backtest
Clone the repo
git clone --depth 1 https://github.com/MangroveTechnologies/mangrove-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for backtest

README.md
[![agentmods](https://agentmods.dev/badge/skills/mangrovetechnologies/mangrove-agent/backtest.svg)](https://agentmods.dev/skills/mangrovetechnologies/mangrove-agent/backtest)
Your own site
<a href="https://agentmods.dev/skills/mangrovetechnologies/mangrove-agent/backtest"><img src="https://agentmods.dev/badge/skills/mangrovetechnologies/mangrove-agent/backtest.svg" alt="Measured on agentmods" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00132 $0.03014
Opus 5 $0.00066 $0.01507
Sonnet 5 $0.00026 $0.00603
Haiku 4.5 $0.00013 $0.00301

Measured 5d ago against content hash 8a0ec91753b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

backtest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/backtest/SKILL.md · 253 lines

How it starts

The opening of the file, as written. The whole thing — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Backtest Skill

This skill exists because picking the backtest window well is more important than picking the strategy. A strategy that looks great over the last 30 days of a grinding uptrend tells you nothing about how it behaves when the market turns. A window that's too short produces <10 trades and makes every ratio meaningless. A window that's too long bleeds across regime changes and flatters overfit strategies.

The /create-strategy skill hands off here after Phase B-bulk (or earlier, for single-candidate builds). Users can also invoke /backtest directly on any existing strategy_id.

Trigger

Activate when the user:

  • Explicitly asks to backtest ("run a backtest on ref-004 with ETH 1h", "how would this have done over the last year", "test this")
  • Has just promoted a draft from /create-strategy and needs a verdict
  • Asks to re-evaluate a paper or live strategy on a new window
  • Asks "is this strategy any good"

Do NOT activate for:

  • Promotion decisions → /promote-strategy
  • Live monitoring / evaluations → /monitor-trades
  • Authoring new strategies → /create-strategy

Phase A — Collect

Required inputs:

  1. strategy_id — UUID from list_strategies or a create_strategy_manual response. If the user says "the one I just made" and there's only one draft, infer it. Otherwise call list_strategies(status="draft") and present choices.

Optional overrides (skill proposes defaults in Phase B — don't ask the user for these cold):

  • lookback window — days, hours, or explicit start/end dates. If user volunteers one, respect it.
  • slippage_pct / fee_pct — override trading_defaults.json. Only touch if the user mentions they want realistic frictions tuned.

Pull the strategy's asset + timeframe via get_strategy(strategy_id) so the window sizing can reason about bar counts.

Phase B — Size the window

Target bar count: 2000–5000. That's the range where ratio metrics stabilize (enough for 20–100 trades) without the window spanning so much history that regime drift dominates. Translate to wall-clock via the timeframe:

Read the full file on GitHub · 253 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 253 lines · 132 tokens per session scan A 8a0ec91753b1

Subscribe to this mod's changes

backtest is a skill published in the GitHub repository MangroveTechnologies/mangrove-agent (5 stars, last pushed 1mo ago), licensed MIT. It adds 132 tokens to every session and 3,014 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

t2000-job

Escrow USDC for agent-to-agent deliverable work (A2A jobs). Use when hiring another agent for async work (research reports, builds, SLA tasks) or when selling deliverable work yourself (list a service: fixed price + SLA, no server needed), or posting/claiming open jobs on the board (t2 job open / claim) — anything…

mission69b/t2000 · 164 tokens

t2000-receive

Generate a payment request for the t2000 Agent Wallet — print the wallet address, an ANSI QR code, and (via MCP) a Payment Kit URI (sui:pay?…). Use when asked to receive a payment, share a wallet address, create a payment link, or set up a fund-me link.

mission69b/t2000 · 71 tokens

t2000-send

Send USDC, USDsui, or SUI from the t2000 Agent Wallet to another Sui address. Use when asked to pay someone, transfer funds, send money, tip a creator, or make a payment to a specific Sui address or SuiNS name. Do NOT use for API payments — use the t2000-pay skill for x402-protected services.

mission69b/t2000 · 83 tokens

t2000-swap

Swap tokens on Sui via Cetus Aggregator (20+ DEXs, best-route across SUI, USDC, USDsui, USDT, USDe, ETH, GOLD, NAVX, WAL, vSUI, and more). Use when asked to swap, trade, convert, exchange, or "turn X into Y". Do not use for sending — use the t2000-send skill for transfers.

mission69b/t2000 · 93 tokens

t2000-financial-amounts

Money and token-metadata safety — floor display amounts (never round up), per-token decimal precision, preset/chip amount math, and the canonical token registry that owns every coin type and decimal count. Use when formatting or displaying a balance, computing a max/percentage/preset amount, converting between display…

mission69b/t2000 · 106 tokens

t2000-check-balance

Check the t2000 Agent Wallet balance on Sui. Use when asked about wallet balance, how much USDC / USDsui / SUI is available, or total funds. Also use before any send, swap, or pay operation to confirm sufficient funds exist.

mission69b/t2000 · 61 tokens