ib-create-consolidated-report

Solid

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.

Data & Documents 234 stars 56 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
79
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
98
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# IB Create Consolidated Report Reads all CSV files from a given directory (excluding subdirectories), consolidates trade data by key fields, and generates both markdown and CSV reports. ## Instructions ```bash 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 tables - `consolidated_trades_YYYY-MM-DD_HHMM.csv` - CSV with all consolidated data ## Example Usage ```bash # Consolidate t...

Details

Author
staskh
Repository
staskh/trading_skills
Created
3 months ago
Last Updated
yesterday
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Solid

ib-portfolio-action-report

Generate a comprehensive portfolio action report with earnings dates and risk assessment. Use when user asks for portfolio review, action items, earnings risk, or position management across IB accounts. Requires TWS or IB Gateway running locally.

234 Updated yesterday
staskh
AI & Automation Solid

ib-trades-history

Fetch trade executions from Interactive Brokers filtered by account, date range, or symbol. Supports live API (~7 days history) and FlexReport (full history). Use when user asks about their trades, executions, or transaction history. Requires TWS or IB Gateway running locally.

234 Updated yesterday
staskh
Data & Documents Solid

ib-report-delta-adjusted-notional-exposure

Report delta-adjusted notional exposure across all IBKR accounts. Calculates option deltas using Black-Scholes and reports long/short exposure by account and underlying. Use when user asks about delta exposure, portfolio risk, or directional exposure.

234 Updated yesterday
staskh
Data & Documents Solid

report-stock

Generate comprehensive stock analysis report (PDF or markdown) with trend, PMCC, and fundamental analysis

234 Updated yesterday
staskh
AI & Automation Listed

ibkr

Query Interactive Brokers via the local `ibkr` CLI. Use when the user asks about their IBKR account, positions, P&L, market quotes, option chains (incl. per-leg open interest), official market calendars, local watchlist, daily price history, technical/relative-strength screens, running a market scan, sizing a planned trade by fixed-fractional risk, or checking the market's risk regime (S&P 500 breadth, combined SPY+SPX dealer zero-gamma with 0DTE / 1-7 / term horizon split, the eight-row regime dashboard). Read-only — never attempts to place orders.

2 Updated today
osauer