Backtest Configurator
Write a rotation strategy as a short spec file, check it, confirm it, and run it on your own price files. Your AI assistant can draft the spec from your words through the MCP server; you review every line, and nothing runs until you confirm.
Every result this tool produces is hypothetical:
Hypothetical backtest. These results were simulated with hindsight and didn't come from real trading. They don't reflect actual costs, slippage or market impact beyond what's stated, and hypothetical results have well-known limits. Past results, simulated or live, don't guarantee future results.
Not investment advice; not tailored to you; we are not a registered investment adviser or broker-dealer.
Terms of use: https://nothingbutalpha.app/terms#backtest-configurator
What it does
- A versioned spec (v1). Rotation strategies only: on scheduled dates, rank and hold the top N (or all eligible assets), with equal, inverse-volatility or fixed weights. Adjusted prices only. A JSON Schema defines every field, and a fill on the same bar as the decision cannot be written.
- Validation before anything runs. The tool turns the spec into plain English, lists every assumption with its origin (your answer, filled in by the assistant, or a default), and flags values that your own text does not state.
- A local engine. It runs the spec on your own CSV or Parquet files (
date,ticker,open,high,low,close) against a pinned NYSE calendar. It needs no API key and calls no data vendor. - A disclosure block with every output, and a receipt with hashes of the spec, the data and every result file. The receipt holds no return figures.
- A Python export.
strategy.pyreproduces the engine's run in plain pandas and NumPy, on files the configurator accepts. The tool includes the Backtest Auditor's static checks, which catch some common errors and miss many. - Run counting. Every run is counted in the project folder, and the count goes with every result, so you can see how many variants were tried before this one.
Install
Python 3.12. The command-line tool and the MCP server need the mcp extra:
pip install "backtest-configurator[mcp]"
Command-line quick start
Run these from your project folder, or pass --project-dir:
backtest-configurator validate my_strategy.yaml
backtest-configurator run my_strategy.yaml
backtest-configurator export my_strategy.yaml --out strategy.py
backtest-configurator verify .nba-configurator/results/<run>/receipt.json
backtest-configurator explain momentum
validatereads no price data and runs nothing.runshows the rendering, the assumptions, the flags and the run count, then asks you to typeyesat an interactive terminal. A plain pipe or redirect is refused, and there is no flag that skips the question.verifyre-runs a logged receipt and reports whether the results reproduced. It is not a run and is not counted.
MCP quick start
The server is nba-configurator-mcp, a local stdio server. Always pass the project folder: the run log and all
results live there.
Claude Code:
claude mcp add nba-configurator -- nba-configurator-mcp --project-dir /path/to/project
Claude Desktop or Cursor (mcpServers in the client's config file):
{"mcpServers": {"nba-configurator": {"command": "nba-configurator-mcp",
"args": ["--project-dir", "/path/to/project"]}}}
A run needs a client that supports MCP elicitation, because the server asks for confirmation through it. A client
without it gets the plain-English rendering and a refusal, and nothing runs. Then save the spec to a file and use
backtest-configurator run in your own terminal.
Threat model and accepted risks
What the tool protects:
- Nothing is read or run before you confirm. Validation opens no price file and no membership file.
- Writes stay inside the project folder. A symlink, a reparse point or a file with more than one hard link is refused as a write target (item 1 below is the limit of that check).
- No network requests, no model calls. It never runs your code or the exported code.
What it does not protect against, accepted for this release:
- Races in the project folder. A process that can write in the project folder at the same moment can swap a folder for a link between the path check and the open, or replace a data file between its check and its read. Closing this fully needs handle-relative file access.
- The confirmation records a channel, not a person. A program that runs the command-line tool inside a
pseudo-terminal can answer the prompt, and an MCP client that accepts elicitation requests automatically can
confirm without showing the request. The receipt records the channel (
cli_prompt,mcp_elicitation), never "user confirmed". - Reads may be anywhere your account can read. Once you confirm, a data path may point outside the project folder. That is by design: the files are yours.
- Run counts are per project folder. A new folder starts a new count.
- The
mcpextra installs server packages the tool never uses (an HTTP server and its dependencies). They are pinned, but an advisory on any of them concerns this package too. - The wheel is not byte-reproducible. Only files built and tested in CI are published, with PyPI attestations.
- No hash-locked install from PyPI. Direct dependencies are pinned exactly; transitive ones are not.
- Developer regeneration commands ship in the package.
python -m nba_configurator.schema_source --writeandpython -m nba_configurator.nyse_calendar --writerewrite the installed schema and calendar with the same generated content.
License
Apache-2.0.
Metadata
Release files for backtest-configurator 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| backtest_configurator-0.3.0.tar.gz | 219.7 kB | With provenance | Details for backtest_configurator-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| backtest_configurator-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for backtest_configurator-0.3.0-py3-none-any.whl |
Total release size: 457.0 kB
Release files / backtest_configurator-0.3.0.tar.gz
| Download URL | backtest_configurator-0.3.0.tar.gz |
|---|---|
| Size | 219.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e58cf2fcc2124e8c0e8f1aae89195348a022c479f5f73ef0c9d9c65b21f349a
|
|
BLAKE2b-256 checksum How to use checksums |
cf7933737bb5b5fd3fc09b892e6bff14671382ec13b08c3a2a5da38d4235fc75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / backtest_configurator-0.3.0-py3-none-any.whl
| Download URL | backtest_configurator-0.3.0-py3-none-any.whl |
|---|---|
| Size | 237.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c70cf669670e209b2fe8de04449b1318c1d39b47b2274bb89508eb68746a345
|
|
BLAKE2b-256 checksum How to use checksums |
37df1295775bc113dc1ff8f3a94885fd884cf037e00a94627a592d5fe9f46adf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for backtest-configurator 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for backtest_configurator-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.