IB Consolidated Trade Report Builder
Merges every Interactive Brokers trade CSV in a folder into a grouped summary report exported as both Markdown and CSV.
Data & AnalyticsIntermediate★ 368⑂ 85AI score 6/10Last updated: Sep 17, 2026
What it does
- Reads all IBKR trade CSV files in a given directory (subdirectories excluded).
- Groups trades by underlying symbol, full option symbol, trade date, strike, put/call, buy/sell and open/close.
- Aggregates Quantity, Proceeds, NetCash, IBCommission and FifoPnlRealized.
- Adds a
Positioncolumn labelling each row SHORT, LONG, CLOSE_SHORT or CLOSE_LONG. - Writes
consolidated_trades_YYYY-MM-DD_HHMM.mdwith summary tables plus a matching.csv. - Optionally connects to TWS/IB Gateway (7496 live, 7497 paper, auto-probed) to pull unrealized P&L. All timestamps use America/New_York.
Who it's for
- Interactive Brokers traders who reconcile monthly or yearly option and equity activity.
- Anyone drowning in hundreds of execution rows who wants per-symbol, per-strike P&L.
- Traders keeping a journal or preparing tax paperwork from raw broker exports.
Example uses
- "Consolidate this year's IBKR reports" →
uv run python scripts/consolidate.py "D:/IBKR reports/2025" - Send output elsewhere:
uv run python scripts/consolidate.py "D:/IBKR reports" --output-dir "D:/output" - Include unrealized P&L from a paper account:
uv run python scripts/consolidate.py "D:/paper" --port 7497
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/staskh/trading_skills/HEAD/.claude/skills/ib-create-consolidated-report/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .claude/skills/ib-create-consolidated-report folder from the GitHub repo staskh/trading_skills into my ~/.claude/skills/ib-create-consolidated-report/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/staskh/trading_skills.git && mkdir -p ~/.claude/skills && cp -r trading_skills/.claude/skills/ib-create-consolidated-report ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repository:
git clone https://github.com/staskh/trading_skills.git - Copy the skill into your Claude Code skills folder:
mkdir -p ~/.claude/skills && cp -r trading_skills/.claude/skills/ib-create-consolidated-report ~/.claude/skills/ - Also copy the required dependency skill:
cp -r trading_skills/.claude/skills/trading-skills ~/.claude/skills/ - Install the
uvPython runner if you don't have it:curl -LsSf https://astral.sh/uv/install.sh | sh - For unrealized P&L, start TWS or IB Gateway with API access enabled on port 7496 (live) or 7497 (paper); optionally set the
IB_PORTenvironment variable. - Restart Claude Code and ask something like "build a consolidated report from my IBKR trade CSVs".
View source on GitHub ↗License: MIT