计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
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.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Reads all CSV files from a given directory (excluding subdirectories), consolidates trade data by key fields, and generates both markdown and CSV reports.
uv run python scripts/consolidate.py <directory> [--port PORT] [--output-dir OUTPUT_DIR]
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). Defaults to the IB_PORT env var when set (--port still overrides).--output-dir - Output directory for reports (default: sandbox/)Groups trades by:
Aggregates:
Adds column:
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# 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"
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.