Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    trading pnl reconciliation

    1

    Reconstruct positions and cash from fills to identify discrepancies against broker statements.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    trading pnl reconciliation

    trading pnl reconciliation

    Example session with this skill installed

    Reconcile the account 'Alpha-01' for 2023-10-27. Compare the execution logs in fills.json against the snapshot in broker_statement.json. Focus on the BTC/USDT pair.

    • Read your context and instructions
    • Compiled the trading pnl reconciliation

    The reconciliation for account Alpha-01 is complete. I have processed 42 fills and 3 cash adjustments. There is a minor discrepancy in the final BTC position equivalent to 0.000012 BTC, likely due to a rounding mismatch on a taker fee.

    Reconciliation Report: Alpha-01 (2023-10-27)

    MetricOpening SnapshotReconstructedClosing SnapshotVariance
    Cash (USDT)1,250,400.001,185,210.501,185,210.500.00
    Asset (BTC)12.5000000014.1200000014.120000000.00
    Asset (ETH)50.0000000048.0000000047.99998800-0.00001200

    Discrepancy Analysis

    IDTypeAssetAmountResolution
    DISP-001Fee MismatchETH-0.000012Unresolved. Detected on Fill #8922. Likely precision difference.
    ADJ-001DepositUSDT+50,000.00Confirmed. Match found in internal treasury logs.

    Data References

    • Source Fills: fills.json (v2.1)
    • Statement: broker_statement.json (Ref: 99821-X)
    • Interval: 2023-10-27 00:00:00 to 23:59:59 UTC

    Next steps

    1. Review Fill #8922 in the execution log to confirm the fee calculation method.
    2. Export the reconciled ledger to the strategy performance folder.
    3. Update the precision settings in the config file to match the broker's 8-decimal output.

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

    About this skill

    The problem

    Manual reconciliation of trading activity is error-prone and slow. Discrepancies between execution logs and broker snapshots often lead to inaccurate P&L reporting and hidden accounting errors.

    What it does

    • Reconstructs signed positions and cash balances from raw fill data and manual adjustments.
    • Identifies missing or duplicate fills by comparing reconstructed state against closing snapshots.
    • Distinguishes between settlement cash and trade-date cash to ensure timing accuracy.
    • Processes deposits, withdrawals, and dividends while preventing double-counted fees.
    • Generates a structured ledger and a dedicated discrepancy table for audit trails.

    Frameworks & tools

    Python 3 for analysis scripts, JSON for data contracts, and standardized ledger modeling for spot and linear instruments.

    Why this beats prompting it yourself

    General-purpose LLMs struggle with the strict mathematical consistency required for position reconstruction. This skill enforces a specific accounting workflow that separates trade-date logic from settlement events, ensuring you don't miss small but compounding fee errors or timing mismatches.

    Use cases

    • Verifying daily trading activity against prime brokerage or exchange statements.
    • Auditing strategy performance by isolating execution fills from external cash movements.
    • Pre-processing raw trade data for tax-lot accounting or performance reporting systems.
    • Investigating broken trade sequences and unexplained cash variances.

    Known limitations

    Does not handle tax reporting, FX conversions, or corporate actions like splits. Limited to spot and fully paid linear instruments; no native derivative margin accounting.

    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.

    Does not support tax-lot P&L, FX conversions, or corporate actions. Excludes derivative margin accounting and live broker API connectivity.

    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

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Software
    Python

    Permissions

    Terminal / Shell
    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill performs a mathematical reconstruction of your trading activity by processing raw fill data and manual adjustments to create a secondary ledger, which is then compared against your broker's end-of-day snapshots to pinpoint missing trades or fee errors.

    The skill is built for Python-based environments and is compatible with any AI agent capable of executing scripts and handling JSON data structures. It works best with agents that have access to your local or cloud-based trade logs.

    You will receive the core Python analysis scripts, standardized JSON data schemas for your trade logs, and the specific accounting logic required to handle trade-date vs. settlement-date logic.

    It is currently designed for spot trading and linear instruments (like stocks or simple crypto pairs) and does not natively support complex derivative margin requirements, splits, or multi-currency FX conversions.

    Setup involves mapping your raw broker CSVs or API fill data to the provided JSON schema; once your data matches the contract, the agent can immediately begin generating discrepancy reports and ledgers.

    New in Trading & Investing