Backtest Sanity Checker

    by Mohd Jaun Rizvi

    1

    Audits a trading backtest or order-book replay for fake profit. Checks data holes, unrealistic fills, look-ahead, missing fees, and profit concentrated in a few days, then returns a PASS/WARN/FAIL report with numbers.

    Free

    Security scanned

    Works with the AI Agents you already use

    backtest-sanity-checker

    Example session with this skill installed

    Here is my market-making backtest script and the order book data. It shows +$4,000 over 12 days. Is it real?

    • Read your context and instructions
    • Compiled the backtest-sanity-checker

    Verdict: WARN, profit partly real. Data integrity: FAIL (6 gaps over 30s, 38% of trades fall inside or right after a gap). Fill realism: WARN (passive orders fill on touch, no queue model). Costs: PASS. Stability: WARN (best 2 days = 59% of profit). Adjusted PnL: $4,000 original vs $1,150 after removing gap trades and adding queue-based fills. Top fixes: 1) fill the book gaps or drop those periods, 2) add a queue/trade-through rule, 3) re-test on a separate period.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Use this skill when the user has a backtest, replay, or paper-trading result and wants to know if the profit is real. Most "great" backtests are wrong because of bad data or generous fill rules, not because the strategy works. Your job is to try to break the result before real money does.

    Ask only for what is missing:

    • The result (PnL, trade list, or equity curve) and the code or script that produced it.
    • The raw data used (trades, order book snapshots/updates, candles) and its source.
    • Fee, latency and fill assumptions the backtest uses.
    • Optionally, real exchange records (fills, order history) to reconcile against.

    If you cannot read the code or data, say so and list which checks you could not run. Never mark a check PASS that you did not run.

    Return a short report:

    Audits a backtest; it does not build strategies or guarantee live profit. Cannot check data or code it cannot read. Exchange reconciliation needs the user to provide real fill records.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 12 days ago

    • Free with an Agensi account

    Software
    Backtest code
    orresults
    Market data files

    Permissions

    Read Files
    Terminal / Shell

    File Scopes

    Backtest
    scripts
    and
    data
    files
    the
    user
    points
    to

    Reads local files only. No network access, no API keys.

    Listed12 days ago

    What's inside

    Frequently Asked Questions

    Yes. It works with any backtest, replay or paper-trading result, as long as your AI agent can read the code and the data files. It is not tied to one exchange, language or framework.

    No. A clean report only means the test was not obviously wrong. It cannot promise live profit. It looks for problems that make backtests look better than reality.

    Holes and errors in the market data, fills that would not have happened in real life, look-ahead bias, missing fees, positions that grow too large, profit that comes from only a few days, and results that do not match real exchange fills.

    No. It only audits and reports. It gives you the top fixes in order of impact, and you decide what to change.

    No. It reads only the local files you point to. It needs no API keys and makes no network calls.

    The backtest result or trade list, the code that produced it, and the market data it used. Real exchange fill records are optional, but they allow the strongest check.

    It will list the checks it could not run and mark them NOT RUN. It never marks a check as passed when it did not run it.

    Yes. It has specific checks for resting-order fills, queue position, one-leg fills, inventory build-up and book gaps, which matter most for those strategies. It also works for directional and candle-based strategies.

    New in Trading & Investing

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.

    Free