- Home
- Skills
- Trading & Investing
- trading pnl reconciliation
Works with the AI Agents you already use
trading pnl reconciliation
Reconstruct positions and cash from fills to identify discrepancies against broker statements.
$15
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)
| Metric | Opening Snapshot | Reconstructed | Closing Snapshot | Variance |
|---|---|---|---|---|
| Cash (USDT) | 1,250,400.00 | 1,185,210.50 | 1,185,210.50 | 0.00 |
| Asset (BTC) | 12.50000000 | 14.12000000 | 14.12000000 | 0.00 |
| Asset (ETH) | 50.00000000 | 48.00000000 | 47.99998800 | -0.00001200 |
Discrepancy Analysis
| ID | Type | Asset | Amount | Resolution |
|---|---|---|---|---|
| DISP-001 | Fee Mismatch | ETH | -0.000012 | Unresolved. Detected on Fill #8922. Likely precision difference. |
| ADJ-001 | Deposit | USDT | +50,000.00 | Confirmed. 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
- Review Fill #8922 in the execution log to confirm the fee calculation method.
- Export the reconciled ledger to the strategy performance folder.
- 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.
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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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
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
Requires