PlainBacktest skill
Turns a trading strategy into rules, runs a backtest and reconciles orders and balances against an independent ledger.
- 529 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The agent runs Python scripts, installs dependencies and writes reports and data in the project folder.
- Backtest results are easy to mistake for forecasts: this is a historical calculation, not investment advice.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/plainbacktestDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The agent runs Python scripts, installs dependencies and writes reports and data in the project folder.
- Backtest results are easy to mistake for forecasts: this is a historical calculation, not investment advice.
This is third-party code. Review the repository files before installing.
What it does
PlainBacktest is a project with three skills for researching trading strategies on historical data. The agent clarifies rules in words, freezes the experiment, checks data, runs trades through the PyBroker engine and keeps an independent ledger of orders and daily balances alongside. The output is an HTML report and a research record with code and data hashes. `quant-backtest` leads from description to report, `data-update` checks data snapshots and updates, and `quant-tidy` keeps experiment structure tidy. The repository holds 1,303 daily price CSVs, trading calendars and 83 experiment definitions. A QQQ moving-average crossover example runs offline.
Who it is for. Analysts and private investors testing a strategy idea on history who want a reproducible report instead of a black box.
Good fit when
- The idea "hold QQQ when SMA20 is above SMA100" must be tested with costs and next-session execution.
- A backtest result looks suspiciously good and orders are reconciled against an independent ledger.
- A report must show rules, data, code hashes and daily account state.
- A researcher runs a series of experiments and wants one record structure.
- Price data is updated in an isolated copy and replacement candidates are reviewed apart.
Not a fit when
- You want live trading with real money: the project only tests strategies on history.
- You need advice on what to buy: a backtest is neither a forecast nor a recommendation.
- You need intraday ticks or markets outside the bundled set.
Example request
Use quant-backtest: test the SMA20 versus SMA100 rule on QQQ with 5 bps costs and explain the result and ledger reconciliation.Limitations
The verified environment is macOS with Python 3.13 and other systems were not fully tested. Dependencies install over the network while the example runs offline on bundled data. Detailed documents and report text are mostly in Chinese. Historical runs are not bundled and some experiments need archives absent from the repository. The PyBroker dependency uses Commons Clause, so the stack is not fully MIT. A backtest does not prove future returns.
How to disable. Delete the repository clone together with the `backtest/.venv` environment. Reports sit in the clone `outputs/` folder and go with it.
FAQ
Are market API keys needed?
No. The example uses bundled data and runs without keys or market service connections.
What does the independent ledger do?
It recomputes orders and daily balances apart from the engine and compares them. A mismatch points to a calculation error.
Where are the skills?
In `.agents/skills/`: `quant-backtest`, `data-update` and `quant-tidy`. Agents without that folder can read the needed `SKILL.md` by hand.
How do I open the result?
After `quickstart.py` the console prints a path to `outputs/example_…/report.html`, which opens in a browser.
Can I trade on the result?
The project does not trade and gives no recommendations. A backtest tests a hypothesis, it is not advice to invest.
Discussion
No questions or reviews yet.
Related
SkillsSkill for the QMT terminal: turns a strategy description or research PDF into a daily factor backtest script
Thirteen skills for quantitative trading on China's A-share market: AKShare and BaoStock data, Backtrader and RQAlpha backtests, QMT and JoinQuant docs
MCP server for backtesting trading strategies: the agent fetches quotes, runs a test from YAML and reads the metrics on the Backtrader engine
A skill and CLI that test a trade log with statistics, scan investment group chats for scam signs and scaffold a trading bot
JoinQuant API references, templates and a linter: the agent checks platform functions before it writes strategy code.
A skill connects agents to FinLab data and its Python engine for stock research and local historical strategy backtesting.
README in short
The README covers the pipeline from strategy text to report, an offline QQQ example, repo contents (code, 1,303 price CSVs, 83 experiments), checks and code and data licenses.