ib-create-consolidated-report
Consolidate IBRK trade CSV files from a directory into a summary report. Groups trades by symbol, underlying, date, strike, buy/sell, and open/close. Outputs both markdown and CSV.
pinned to #cc30858updated 2 weeks ago
Ask your AI client: “install skills/ib-create-consolidated-report”.
Requires the metahub MCP server installed in your client. Set up MCP.
mh install skills/ib-create-consolidated-reportmetahub onboarded this repo on the author's behalf.
If you own github.com/staskh/trading_skills on GitHub, claim the listing to take over publishing. Your claim preserves the existing eval history and badges; only the curator label is replaced with verified-publisher on your next publish.
Stars
288
Last commit
2 weeks ago
Latest release
published
- #ai-trading
- #claude
- #claude-skills
- #mcp-server
- #option-trading
- #options-trading
About this skill
Pulled from SKILL.md at publish time.
Reads all CSV files from a given directory (excluding subdirectories), consolidates trade data by key fields, and generates both markdown and CSV reports.
Evaluation report
WarningsAutomated checks the publisher passed at publish time — structure, docs, safety, and whether the artifact behaves as claimed.cc30858· 2 weeks ago
Kind-specific
31Skill: SKILL.md present
found at .claude/skills/ib-create-consolidated-report/SKILL.md · frontmatter source: SKILL.md
Skill: body content present
263 words · 1,951 chars · 6 sections · 2 code blocks
Skill: triggers declaredwarn
No `trigger` phrases in SKILL.md frontmatter
Add `trigger:` lines so Claude knows when to activate this skill — e.g. `when building MCP servers` or `for diagram creation`.
Skill: allowed-tools scope
no allowed-tools restriction (Claude may use anything)
Release history
1- releasecurrentcc30858warn2 weeks ago
Contents
Reads all CSV files from a given directory (excluding subdirectories), consolidates trade data by key fields, and generates both markdown and CSV reports.
Instructions
uv run python scripts/consolidate.py <directory> [--port PORT] [--output-dir OUTPUT_DIR]
Arguments
directory- Path to directory containing IBRK trade CSV files--port- IB port to fetch unrealized P&L (7497=paper, 7496=live). If not specified, auto-probes both ports (tries 7496 first, then 7497).--output-dir- Output directory for reports (default: sandbox/)
Consolidation Logic
Groups trades by:
- UnderlyingSymbol - The underlying ticker (e.g., GOOG, CAT)
- Symbol - Full option symbol
- TradeDate - Date of the trade
- Strike - Strike price
- Put/Call - Option type (C or P)
- Buy/Sell - Trade direction
- Open/CloseIndicator - Whether opening or closing
Aggregates:
- Quantity - Sum of quantities
- Proceeds - Sum of proceeds
- NetCash - Sum of net cash
- IBCommission - Sum of commissions
- FifoPnlRealized - Sum of realized P&L
Adds column:
- Position - SHORT (Sell+Open), LONG (Buy+Open), CLOSE_SHORT (Buy+Close), CLOSE_LONG (Sell+Close)
Output
Generates two files in the output directory:
consolidated_trades_YYYY-MM-DD_HHMM.md- Markdown report with summary tablesconsolidated_trades_YYYY-MM-DD_HHMM.csv- CSV with all consolidated data
Example Usage
# Consolidate trades from IBRK reports directory
uv run python scripts/consolidate.py "C:\Users\avrah\OneDrive\Business\Trading\IBRK reports\2stastrading2025"
# Specify custom output directory
uv run python scripts/consolidate.py "C:\path\to\reports" --output-dir "C:\output"
Timezone
All timestamps and time-based calculations must use the America/New_York timezone. All JSON output must include generated_at (NY time string) and data_delay fields.
Reviews
No reviews yet. Be the first.
Related
Planning With Files
Claude Code skill implementing Manus-style persistent markdown planning — the workflow pattern behind the $2B acquisition.
Frontend Slides
Create beautiful slides on the web using Claude's frontend skills
Gpt Researcher
An autonomous agent that conducts deep research on any data using any LLM providers
mh install skills/ib-create-consolidated-report