# Backtest Auditor

> Backtest Auditor is a free MCP server for finance and payments. Red-team checks for trading backtests: lookahead lint, Deflated Sharpe, costs, local. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free
- **Platforms:** CLI, self-hosted
- **Website:** https://nothingbutalpha.app/backtest-audit
- **MCP Registry name:** app.nothingbutalpha/backtest-auditor
- **Categories:** finance and payments, developer tools
- **Listing updated:** 2026-11-16

## About

Backtest Auditor reads your strategy code, return series or trade log and reports the errors that most often make a backtest look better than it is. It reads code without executing it. The seven areas are lookahead bias, survivorship bias, ticker reuse, unrealistic costs, overfitting and multiple testing, sub-period instability and concentration.

Findings carry a rule ID, severity, exact line and a one-line reason; for a few unambiguous patterns it suggests a minimal edit and rechecks it. Return and trade-log audits compute break-even cost, Sharpe significance, the Deflated Sharpe Ratio for the number of variants tried, drawdown and a benchmark comparison. Verdicts range from major red flags to no red flags found, which the site says does not mean a strategy will make money.

Version 0.7 is a free MCP server and Python library on PyPI that runs on your machine, with three bundled prompts. Its hosted web check is off for now.

## Features

- **Lookahead lint:** Flags code that uses future data, with line and reason.
- **Return series audit:** Costs, Sharpe significance, Deflated Sharpe and drawdown.
- **Trade log audit:** Rebuilds daily results and adds survivorship hints.
- **Combined verdict:** One verdict with reasons for each part.
- **Read-only code checks:** Code is read, never executed.
- **Prompts included:** Three one-click prompts for audits and drafting.

## Good for

- Find look-ahead bias in a strategy repository
- Check whether costs erase a strategy's edge
- Adjust a Sharpe for the number of variants tested
- Audit a broker trade log for concentration

## Install

### Claude Code (Terminal)

```sh
claude mcp add backtest-auditor -- uvx backtest-auditor
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "backtest-auditor": {
      "command": "uvx",
      "args": [
        "backtest-auditor"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "backtest-auditor": {
      "command": "uvx",
      "args": [
        "backtest-auditor"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "backtest-auditor": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "backtest-auditor"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "backtest-auditor": {
      "command": "uvx",
      "args": [
        "backtest-auditor"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "backtest-auditor": {
      "command": "uvx",
      "args": [
        "backtest-auditor"
      ]
    }
  }
}
```

## Tools

- `check_path`: Reads Python files or folders without running them and flags bias patterns.
- `audit_backtest`: Runs every applicable check and gives one combined verdict.
- `check_code`: Lints pasted strategy code for lookahead and survivorship leaks.
- `audit_returns`: Audits a return series for costs, Sharpe significance and drawdown.
- `audit_trade_log`: Rebuilds daily results from a trade log and runs the audit.
- `explain`: Explains what a check does and how to fix it.

## FAQ

### Does it run my code?

No. The site says code is read, never executed.

### Is it free?

Yes, free on PyPI and runs on your machine.

### Does a clean report mean the strategy works?

No. It only means these checks found no common errors.

### How do I add it?

claude mcp add backtest-auditor -- uvx backtest-auditor.

### Is Backtest Auditor free?

Yes. Backtest Auditor is free to use.

### How do I add Backtest Auditor to Claude Code?

Run this command in your terminal: claude mcp add backtest-auditor -- uvx backtest-auditor

### What are the best alternatives to Backtest Auditor?

The closest alternatives to Backtest Auditor are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/backtest-auditor
