Strategy Backtester
/install strategy-backtester
Strategy Backtester
Purpose
Use this skill to test whether a ranking, factor mix, or portfolio-selection rule had useful historical behavior before treating it as an investment signal.
Scope
- Equity ranking and selection strategies.
- Periodic rebalance backtests from local CSV inputs.
- Benchmark comparison when benchmark data is available.
- Bias and robustness review.
Non-goals
- Do not claim that historical performance predicts future returns.
- Do not optimize parameters until a preferred result appears.
- Do not issue absolute buy/sell instructions.
- Do not fetch live market data.
Input contract
Required inputs:
SIGNAL_CSV: rows withdate,ticker, andscore.PRICE_CSV: rows withdate,ticker, andclose.REBALANCE_FREQUENCY:monthly,quarterly, oryearly.TOP_N: number of selected names per rebalance.
Optional inputs:
BENCHMARK_CSV: rows withdateandcloseorreturn.FEE_BPS: round-trip fee assumption in basis points.SLIPPAGE_BPS: slippage assumption in basis points.UNIVERSE_HISTORY: point-in-time membership if available.
Execution workflow
- Validate input files and required columns.
- Estimate whether the test window and symbol coverage are sufficient.
- Run
scripts/backtest_strategy.pywith explicit rebalance, fee, slippage, and top-N assumptions. - Review performance metrics and benchmark comparison.
- Identify bias risks and robustness gaps.
- Return the required output sections.
Required output format
Backtest Setup
- Strategy name, test window, rebalance frequency, top-N, fees, slippage, benchmark.
Performance Summary
- Total return, CAGR, volatility, max drawdown, Sharpe, Sortino, turnover, hit rate when available.
Benchmark Comparison
- Relative return, relative drawdown, and tracking observations when benchmark data exists.
Robustness and Bias Warnings
- Survivorship bias, lookahead bias, data-snooping risk, liquidity assumptions, fee/slippage sensitivity.
Confidence and Data Gaps
- Confidence level and missing inputs that could change the conclusion.
Handoff Bundle
- Include
strategy_name,test_window,rebalance_frequency,fee_assumption,slippage_assumption,benchmark,metrics,bias_warnings,confidence, anddata_gaps.
Shared confidence rubric
High: point-in-time signals, adequate price coverage, benchmark available, fees/slippage included, and test window covers multiple market regimes.Medium: usable history and price coverage, but one major robustness input is missing.Low: short history, missing benchmark, sparse price coverage, likely survivorship/lookahead risk, or no fee/slippage assumptions.
Guardrails
- Separate observed backtest results from assumptions and inference.
- Always state that backtests are historical simulations, not forecasts.
- Downgrade confidence if the test appears overfit or data is not point-in-time.
- Treat backtest output as one input to
stock-picker-orchestrator, not as a trading command.
Trigger examples
- "Backtest this VN30 value-quality ranking."
- "Check whether this stock ranking strategy beat VNINDEX historically."
- "Validate this screening rule before using it for shortlist selection."
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install strategy-backtester - After installation, invoke the skill by name or use
/strategy-backtester - Provide required inputs per the skill's parameter spec and get structured output
What is Strategy Backtester?
Validates historical behavior of stock ranking, factor, and portfolio-selection strategies using reproducible backtests, benchmark comparison, turnover, draw... It is an AI Agent Skill for Claude Code / OpenClaw, with 32 downloads so far.
How do I install Strategy Backtester?
Run "/install strategy-backtester" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Strategy Backtester free?
Yes, Strategy Backtester is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Strategy Backtester support?
Strategy Backtester is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Strategy Backtester?
It is built and maintained by Nguyễn Đức Thành (@ndtchan); the current version is v1.0.0.