Agent skill

Manifoldbt Backtester

by tradermonty in tradermonty/claude-trading-skills

Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores.

MITAuto-check passedBusiness, Finance & HR

Install Manifoldbt Backtester

skills CLI
$ npx skills add tradermonty/claude-trading-skills --skill manifoldbt-backtester -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tradermonty/claude-trading-skills manifoldbt-backtester --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tradermonty/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/manifoldbt-backtester .claude/skills/manifoldbt-backtester && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
manifoldbt-backtester
GitHub stars
3k
Token cost
~1.6k tokens
SKILL.md length
785 words
Files
13 (incl. scripts, references)
Skills in repo
74
Repo updated
First seen
Licence
MIT

At a glance

Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores.

  • Works in 4 steps: Write the strategy spec → Run it → Read the warnings before the numbers → …
  • The user wants to execute a backtest
  • SKILL.md covers Purpose, When to Use This Skill, Prerequisites and Workflow, plus 4 more sections
  • Runs Python scripts from its folder; calls python3 and pip

What it does

Manifoldbt Backtester is an agent skill from tradermonty/claude-trading-skills. Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores. Use when the user wants to execute a backtest, measure a rule they have described, obtain win rate / average win / average loss / max drawdown from real bars, or feed backtest-expert with measured numbers instead of estimates.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 other files, including scripts and reference files (for example `references/metric_bridge.md`, `references/strategy_spec.md` and `scripts/bridge.py`).

It sits in Business, Finance & HR, covering Trading and backtesting. It works with Rust. The repository describes itself as: Claude Code skills for equity investors and traders — market analysis, technical charting, economic calendars, screeners, and trading strategy development. The licence is MIT.

When your agent uses it

  • The user wants to execute a backtest
  • Measure a rule they have described
  • Obtain win rate / average win / average loss / max drawdown from real bars
  • Feed backtest-expert with measured numbers instead of estimates

Example prompts

  • “/manifoldbt-backtester”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Write the strategy spec
  2. Run it
  3. Read the warnings before the numbers
  4. Hand off to backtest-expert

What it can do on your machine

Read from SKILL.md and the folder at commit c8d58f0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 9 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Manifoldbt Backtester loads about 1.6k tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 107 tokens; SKILL.md has 785 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~107
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from tradermonty/claude-trading-skills at commit c8d58f0, republished under its MIT licence (© tradermonty). 785 words, ~1,559 tokens.

Download SKILL.mdSave it as .claude/skills/manifoldbt-backtester/SKILL.md (or your agent's skills folder). This skill also uses 12 other files; get the full folder from GitHub.
name
manifoldbt-backtester
description
Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores. Use when the user wants to execute a backtest, measure a rule they have described, obtain win rate / average win / average loss / max drawdown from real bars, or feed backtest-expert with measured numbers instead of estimates.

manifoldbt Backtester Skill

Purpose

Execute what backtest-expert teaches. That skill grades a backtest on five dimensions, and its prerequisites say "metrics are user-provided": it scores numbers it never produces. This skill produces them. It runs a strategy over real bars and returns the eight inputs its evaluator asks for.

The two chain in one direction: spec, run, evaluate.

When to Use This Skill

  • A user describes a rule and wants it measured
  • backtest-expert is about to run and the numbers do not exist yet
  • A win rate, average winner, average loser or drawdown must come from bars
  • A strategy's parameter count must be established for scoring

Leave the verdict to backtest-expert. It owns the thresholds and the red flags, and this skill does not duplicate them.

Prerequisites

  • Python 3.9+
  • pip install manifoldbt (Apache 2.0 with Commons Clause; the free tier covers everything this skill does)
  • OHLCV bars as CSV or Parquet with columns timestamp, open, high, low, close, volume
  • No API key required

Workflow

1. Write the strategy spec

A spec names indicators and one entry condition. Keep it to the smallest rule that states the hypothesis. Every added knob makes an in-sample fit easier to reach by accident, and the evaluator penalises the count.

json
{
  "name": "sma_cross_costed",
  "indicators": {
    "fast": { "type": "sma", "period": 20 },
    "slow": { "type": "sma", "period": 60 }
  },
  "entry": { "left": "fast", "op": ">", "right": "slow" },
  "size": 1.0,
  "stop_loss_pct": 1.5,
  "fees_bps": 5.0,
  "slippage_bps": 2.0
}

Field reference: references/strategy_spec.md.

Set fees_bps and slippage_bps to realistic values before you read any result. A frictionless run scores 0 on execution realism, and over short holding periods costs decide whether an edge survives.

2. Run it
bash
python3 scripts/run_backtest.py \
  --spec strategy.json \
  --data bars.csv \
  --symbol BTCUSDT \
  --json-out result.json

The script validates the spec before it touches the data, so you see a spec mistake in a second instead of after a long load.

3. Read the warnings before the numbers

The run prints warnings that change how you should read the result: a sample under 30 trades, a span under a year, no friction modelled, or a gap between the engine's win rate and the paired one. Each one is a reason to fix the setup and run again.

Three conditions stop the handoff instead of producing a score: no completed round trips, missing or non-finite maximum drawdown, and scratch trades. The evaluator has no scratch input, so passing a population that contains them would make its derived expectancy disagree with the completed trades.

4. Hand off to backtest-expert

The run ends with a command you can paste. Run it, or invoke the backtest-expert skill with the same figures:

bash
python3 skills/backtest-expert/scripts/evaluate_backtest.py \
  --total-trades 3854 --win-rate 20.24 \
  --avg-win-pct 0.2917 --avg-loss-pct 0.2342 \
  --max-drawdown-pct 99.2893 --years-tested 0 \
  --num-parameters 3 --slippage-tested
Show full SKILL.md (392 more words)Show less

Four conversions that fail without an error

Between an engine's output and the evaluator's inputs sit four conversions. Each one yields a plausible number and scores the strategy wrongly. None of them raises.

A fill is one execution, a round trip is two. The raw trade count runs at about twice the number of round trips. Feed fills to the sample-size dimension and you double the apparent sample, which can lift a thin backtest over a threshold it should not clear.

Buy and sell alternate only in the simplest case. That holds for a single-symbol long-only strategy that never scales a position. Shorting breaks it, because a sell can open. Scaling breaks it, because one exit answers several entries. A universe breaks it, because fills interleave. This skill tracks position per symbol and closes a trip when it crosses back through flat. Entry and exit quantities and cash values accumulate across that whole lifecycle; their weighted-average prices are display values, while PnL comes from the cash flows themselves.

Costs decide small trades. At 7 bps a side, a trade that gains 0.1% on price loses money. Expectancy comes from the win rate and the average winner together, so a gross win rate beside net averages misstates the edge. Percentages here are net of fees, and gross_return_pct sits alongside for inspection.

The engine signs drawdown negative. The evaluator wants a positive magnitude. Pass the raw value and a 38% fall scores as a flawless run.

Scope

Supported: sma, ema, rsi over any OHLC column; one entry condition using >, <, >=, <= against another indicator, a price column or a number; optional stop-loss and take-profit; fees and slippage in basis points; long-only.

Refused: multi-condition entries, shorting, multi-asset universes, and indicators outside the three above. The engine does all of these. This skill covers the shapes a one-sentence hypothesis produces, and rejects the rest instead of half-handling it.

Reference Files

  • references/strategy_spec.md covers every spec field, its default, and what validation refuses
  • references/metric_bridge.md covers the eight inputs, how each is derived, and the trap in each conversion

Scripts

  • scripts/run_backtest.py runs a spec against bars
  • scripts/spec.py validates a spec and counts its parameters
  • scripts/round_trips.py pairs fills into round trips with net returns
  • scripts/bridge.py assembles the evaluator's eight inputs

spec.py, round_trips.py and bridge.py carry no dependencies and import without the engine, so you can test the logic without running a backtest.

© tradermonty, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 12 other files (scripts, references) in skills/manifoldbt-backtester of tradermonty/claude-trading-skills.

  • SKILL.md
  • references/metric_bridge.md
  • references/strategy_spec.md
  • requirements.txt
  • scripts/bridge.py
  • scripts/round_trips.py
  • scripts/run_backtest.py
  • scripts/spec.py
  • scripts/tests/conftest.py
  • scripts/tests/test_bridge.py
  • scripts/tests/test_round_trips.py
  • scripts/tests/test_run_backtest.py
  • scripts/tests/test_spec.py

Open the folder on GitHubat commit c8d58f0

Compare with similar skills

Manifoldbt Backtester next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Manifoldbt Backtester compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Manifoldbt Backtester this skilltradermonty/claude-trading-skills3k—~1.6kAutomated safety check: PassMIT
Trader Backtestruvnet/ruflo74k—~1.4kAutomated safety check: NotesMIT
lo2cin4bt Backtesting Assistantlo2cin4/lo2cin4bt289—~2.6kAutomated safety check: PassCustom licence
lo2cin4bt Backtestinglo2cin4/lo2cin4bt289—~1.8kAutomated safety check: PassCustom licence
Tushare Datazillionare/zillionare3222 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT

Similar skills

  • Trader Backtest

    ruvnet/ruflo

    Run a historical backtest using npx neural-trader with Rust/NAPI engine (8-19x faster) and walk-forward validation; Ed25519-sign the result for paper→live tamper evidence (ADR-126 Phase 4)

    74k GitHub stars~1.4k tokensUpdated yesterday
    Business, Finance & HRAuto-check: notes
  • Guides an agent through installing, configuring and running local backtests in the lo2cin4bt repo, then explaining the results and fixing setup problems.

    289 GitHub stars~2.6k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • lo2cin4bt Backtesting

    lo2cin4/lo2cin4bt

    Runs and troubleshoots local lo2cin4bt backtests: strategy runs, Parameter Matrix, WFA, rolling validation, frontend startup, payload refresh and generated artifacts.

    289 GitHub stars~1.8k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    322 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    878 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed

More from tradermonty/claude-trading-skills

All 74 skills in this repo
  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Auto-check passed
  • Theme Detector

    tradermonty/claude-trading-skills

    Detect and analyze trending market themes across sectors. An agent skill from tradermonty/claude-trading-skills.

    3k GitHub starsUsed in 2 repos~4.9k tokens
    Auto-check passed
  • Trader Memory Core

    tradermonty/claude-trading-skills

    Track investment theses across their lifecycle — from screening idea to closed position with postmortem.

    3k GitHub starsUsed in 2 repos~4.3k tokens
    Auto-check passed
  • Edge Strategy Reviewer

    tradermonty/claude-trading-skills

    Critically review strategy drafts from edge-strategy-designer for edge plausibility, overfitting risk, sample size adequacy, and execution realism.

    3k GitHub starsUsed in 1 repo~988 tokens
    Auto-check passed
  • Sector Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing sector rotation patterns and market cycle positioning.

    3k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Stanley Druckenmiller Investment

    tradermonty/claude-trading-skills

    Druckenmiller Strategy Synthesizer - Integrates 8 upstream skill outputs (Market Breadth, Uptrend Analysis, Market Top, Macro Regime, FTD Detector, VCP Screener, Theme Detector, CANSLIM Screener)…

    3k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed

Works with

Questions about Manifoldbt Backtester

What does Manifoldbt Backtester do?

Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores. Manifoldbt Backtester is an agent skill from tradermonty/claude-trading-skills. Runs a declarative strategy spec over OHLCV bars with the manifoldbt Rust engine, pairs the fill log into round trips, and emits the eight inputs the backtest-expert skill scores.

When should I use Manifoldbt Backtester?

Manifoldbt Backtester fits situations like: the user wants to execute a backtest; measure a rule they have described; obtain win rate / average win / average loss / max drawdown from real bars; feed backtest-expert with measured numbers instead of estimates.

How do I install Manifoldbt Backtester in Claude Code?

Run `npx skills add tradermonty/claude-trading-skills --skill manifoldbt-backtester -a claude-code`. Or copy the skill folder (skills/manifoldbt-backtester in tradermonty/claude-trading-skills) into .claude/skills/manifoldbt-backtester in your project. Claude Code loads it when a task matches its description.

How do I install Manifoldbt Backtester in Codex?

Run `npx skills add tradermonty/claude-trading-skills --skill manifoldbt-backtester -a codex`. Or copy the skill folder (skills/manifoldbt-backtester in tradermonty/claude-trading-skills) into .agents/skills/manifoldbt-backtester in your project. Codex loads it when a task matches its description.

Can I use Manifoldbt Backtester in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tradermonty/claude-trading-skills --skill manifoldbt-backtester -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/manifoldbt-backtester, .gemini/skills/manifoldbt-backtester, .github/skills/manifoldbt-backtester and .opencode/skills/manifoldbt-backtester in your project.

What does Manifoldbt Backtester need to run?

Going by SKILL.md and its folder, Manifoldbt Backtester needs Python for the scripts in its folder and the command-line tools its instructions call (python3 and pip). Our summary lists: Python 3.

Does Manifoldbt Backtester access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Manifoldbt Backtester safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Manifoldbt Backtester use?

Manifoldbt Backtester is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Manifoldbt Backtester use?

About 1.6k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.1k tokens, read only when the agent opens those files.

What are the alternatives to Manifoldbt Backtester?

Skills that share tags, products or a category with Manifoldbt Backtester: Trader Backtest (ruvnet/ruflo, 74k stars), lo2cin4bt Backtesting Assistant (lo2cin4/lo2cin4bt, 289 stars), lo2cin4bt Backtesting (lo2cin4/lo2cin4bt, 289 stars) and Tushare Data (zillionare/zillionare, 322 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Manifoldbt Backtester?

tradermonty (a GitHub user) maintains it in tradermonty/claude-trading-skills, which has 2,982 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.

Source: tradermonty/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.