backtest-guard

Detect backtest biases and generate a severity-ranked integrity report.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/paidaxing1234/latency-hunter-toolkit --skill backtest-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backtest-guard
Source: https://github.com/paidaxing1234/latency-hunter-toolkit/tree/main/skills/backtest-guard
Command: npx skills add https://github.com/paidaxing1234/latency-hunter-toolkit --skill backtest-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

量化回测代码的照妖镜——逐项审查会让回测虚高、实盘亏钱的工程陷阱(未来函数/前视偏差、过拟合/数据窥探、成交真实性/成本、收益口径错误),按严重度(致命/高危/中/低)输出一张“回测体检报告”。

Core Features & Use Cases

  • 自动化审查四大类陷阱:未来函数/数据泄漏、过拟合/数据窥探、成交真实性/成本、收益口径错误,覆盖 48 条细则,能定位到具体文件和行号。
  • 按严重度分级汇总,输出可操作的改进建议与风控要点,帮助工程团队改正回测偏差,提升实盘可信度。
  • 适用于回测代码、数据加载、信号生成、参数寻优等全流程的尽职调查,支持生成结构化体检报告以供评审。
  • 快速定位到可疑模式的上下文并给出可执行的修复方向,避免主观臆断。

Quick Start

将你的策略代码提交给 backtest-guard 以生成结构化的体检报告。

Frequently Asked Questions about backtest-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect look-ahead bias and data leakage in my backtest code?

To detect look-ahead bias and data leakage in backtest code, you can submit your strategy scripts to an automated audit that enforces point-in-time checks and outputs a severity-ranked integrity report with precise file and line references.

What is data snooping and overfitting in quantitative strategy backtesting?

Data snooping and overfitting in quantitative backtesting occur when parameter sweeps or signal generation fit historical noise rather than genuine market signals. An automated pitfall encyclopedia can audit your code to expose these execution realism flaws and rank their severity.

How do I audit execution realism and transaction cost assumptions in a backtest?

You audit execution realism and transaction cost assumptions by running your strategy code through an automated review that checks成交真实性 against 48 specific rules, generating a structured health check report with actionable risk control points.

Can I audit backtest integrity without connecting to external market data?

Yes, you can audit backtest integrity without external data. The review enforces deterministic evaluation and traceability by analyzing your code logic for suspicious patterns directly, requiring no external market data feeds to generate the severity-ranked report.

How do I fix return calculation errors in my quantitative trading backtest?

To fix return calculation errors in a trading backtest, run your code through an automated audit that identifies收益口径错误 (return caliber mistakes) and provides executable repair directions without subjective assumptions.

Does backtest overfitting detection work on data loading and signal generation scripts?

Yes, overfitting detection works on data loading and signal generation scripts. The audit covers the entire workflow including parameter optimization, applying point-in-time checks to expose data-snooping traps across all processing stages.