
manifoldbt-backtester
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.
- Installs
- 1.7K
- Last 24h
- +19
- Trending rank
- #6040
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/tradermonty/claude-trading-skills --skill manifoldbt-backtester- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads manifoldbt-backtester automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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-expertis 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.
{
"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
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:
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
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.mdcovers every spec field, its default, and what validation refusesreferences/metric_bridge.mdcovers the eight inputs, how each is derived, and the trap in each conversion
Scripts
scripts/run_backtest.pyruns a spec against barsscripts/spec.pyvalidates a spec and counts its parametersscripts/round_trips.pypairs fills into round trips with net returnsscripts/bridge.pyassembles 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.
FAQ
What does the manifoldbt-backtester skill 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. 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.
How do I install manifoldbt-backtester?
Run npx skills add https://github.com/tradermonty/claude-trading-skills --skill manifoldbt-backtester in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/manifoldbt-backtester/ (personal) or .claude/skills/manifoldbt-backtester/ (project).
Which AI agents can use manifoldbt-backtester?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is manifoldbt-backtester safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains manifoldbt-backtester?
It is published by tradermonty in tradermonty/claude-trading-skills. It has 1,687 recorded installs.
More from tradermonty/claude-trading-skills
us-stock-analysis
tradermonty/claude-trading-skills
Comprehensive US stock analysis including fundamental analysis (financial metrics, business quality, valuation), technical analysis (indicators, chart patterns, support/resistance), stock comparisons, and investment report generation. Use when user requests analysis of US stock tickers (e.g., "analyze AAPL", "compare TSLA vs NVDA", "give me a report on Microsoft"), evaluation of financial metrics, technical chart analysis, or investment recommendations for American stocks.
market-news-analyst
tradermonty/claude-trading-skills
This skill should be used when analyzing recent market-moving news events and their impact on equity markets and commodities. Use this skill when the user requests analysis of major financial news from the past 10 days, wants to understand market reactions to monetary policy decisions (FOMC, ECB, BOJ), needs assessment of geopolitical events' impact on commodities, or requires comprehensive review of earnings announcements from mega-cap stocks. The skill automatically collects news using WebSearch/WebFetch tools and produces impact-ranked analysis reports. All analysis thinking and output are conducted in English.
backtest-expert
tradermonty/claude-trading-skills
Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.
technical-analyst
tradermonty/claude-trading-skills
This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs. Use this skill when the user provides chart images and requests technical analysis, trend identification, support/resistance levels, scenario planning, or probability assessments based purely on chart data without consideration of news or fundamental factors.
market-environment-analysis
tradermonty/claude-trading-skills
Comprehensive market environment analysis and reporting tool. Analyzes global markets including US, European, Asian markets, forex, commodities, and economic indicators. Provides risk-on/risk-off assessment, sector analysis, and technical indicator interpretation. Triggers on keywords like market analysis, market environment, global markets, trading environment, market conditions, investment climate, market sentiment, forex analysis, stock market analysis, 相場環境, 市場分析, マーケット状況, 投資環境.
portfolio-manager
tradermonty/claude-trading-skills
Comprehensive portfolio analysis using Alpaca MCP Server integration to fetch holdings and positions, then analyze asset allocation, risk metrics, individual stock positions, diversification, and generate rebalancing recommendations. Use when user requests portfolio review, position analysis, risk assessment, performance evaluation, or rebalancing suggestions for their brokerage account.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.