Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Deptho

    1

    Replay crypto perp backtests against historical trade prints to audit slippage, funding, and fee drag.

    Free

    Security scanned
    Deptho

    Deptho

    Example session with this skill installed

    I have a BTCUSDT perp backtest. Replay these orders against the aggTrades file and give me a tearsheet with 5bps fees and the calculated slippage. BTC price is 65000.

    • Read your context and instructions
    • Compiled the deptho
    • Generated the document

    I have replayed your 3 market orders against the provided historical trade data. The simulation shows a mean slippage of 2.45 bps. I have calculated the net PnL by accounting for this slippage, a 5.0 bps flat fee, and the funding rates found in the data.

    Backtest Audit Results

    MetricValue
    Total Orders3
    Fill Rate100% (3/3)
    Mean Slippage2.45 bps
    Median Slippage1.80 bps
    P90 Slippage4.10 bps
    Total Fees-15.00 USDT
    Total Funding-2.10 USDT
    Total Slippage Cost-7.35 USDT
    Net PnL+145.55 USDT

    Performance Breakdown

    Gross PnL:   170.00
    Fees:        -15.00
    Funding:      -2.10
    Slippage:     -7.35
    -------------------
    Net PnL:     145.55
    

    Next steps

    1. Review the report.html file for the full interactive tearsheet and equity curve.
    2. Check the fill_gap_card.svg to see the visual spread between your backtest and reality.
    3. If the fill rate drops, try increasing the max_wait parameter in the replay settings.

    report.html

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

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

    About this skill

    Backtests often report unrealistic returns because they ignore execution slippage, funding rates, and tiered fees. This tool replays market orders against historical trade prints to calculate actual execution costs and net PnL.

    What it does

    • Simulate fills by replaying market orders against historical trade data using a VWAP-based trade print model.
    • Calculate slippage by comparing the replayed fill prices to the reference price at the time of the order.
    • Analyze cost drag by decomposing strategy returns into gross PnL, trading fees, funding payments, and slippage.
    • Generate tearsheets in a self-contained HTML format containing performance metrics and fill statistics.
    • Visualize gaps between theoretical and realistic returns using shareable fill gap cards.

    How it works

    1. Load data: Import your strategy's market orders and historical trade data from Binance archives or Tardis.dev CSVs.
    2. Replay orders: Run the fill simulation to find the realized price for every trade in the sequence.
    3. Audit costs: Calculate the mean slippage in basis points and apply it alongside funding and flat fees to your positions.
    4. Export reports: Generate a full HTML tearsheet or a fill gap card to document the impact of market friction.

    Frameworks & tools

    Built for Python environments using pandas and numpy. It integrates via a standalone library or through deptho-mcp for LLM-native workflows. Supports Binance archive formats (aggTrades, klines, fundingRate) and Tardis trades.

    Why this beats prompting it yourself

    Writing reliable fill simulators requires complex logic to handle base unit quantities and time-series alignment without lookahead bias. This skill provides a tested execution model that accurately handles basis point calculations and funding-time accounting.

    Use cases

    • Auditing a crypto perpetual strategy to see if slippage kills the edge.
    • Creating an investor-ready report that shows net returns after all friction costs.
    • Identifying how many orders fail to fill within a specific time window.
    • Splitting performance attribution into market alpha vs. execution cost.

    Known limitations

    Does not model order book depth or queue position; orders are replayed against the tape without market impact. Requires local CSV or ZIP files for trades and bars. Only flat fee rates are supported.

    Uses trade prints, not order book depth. No market impact modeling. Requires local data files. Mean slippage < 0 is treated as 0 cost. Supports flat fees only.

    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 any payment.

    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 forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 10 days ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Write Files
    Network Access
    Listed10 days ago
    Updated7 days ago

    What's inside

    Frequently Asked Questions

    Deptho bridges the gap between theoretical backtests and real-world trading by replaying orders against actual historical trade prints to calculate slippage, funding rates, and fee drag accurately.

    It supports standard Binance archive formats (aggTrades, klines, fundingRate) and Tardis.dev CSVs, allowing you to audit crypto perpetual strategies using industry-standard data sources.

    The skill includes the core Python library for manual analysis and the `deptho-mcp` integration, which allows LLM-native agents to perform automated audits via the Model Context Protocol.

    Deptho assumes your orders are 'price takers' and executes them against the historical tape; it does not currently simulate limit order queue priority or the market impact your own trades might have on price.

    You receive the standalone Python library, the MCP server for AI agent integration, documentation on data schemas, and templates for generating HTML performance tearsheets.

    Yes, because it calculates funding payments and slippage at the trade level, you can generate a detailed attribution report showing exactly how much alpha was lost to market friction versus trading fees.

    New in Trading & Investing