ib-collar

Solid

Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.

AI & Automation 229 stars 56 forks Updated today MIT

Install

View on GitHub

Quality Score: 90/100

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

Skill Content

# IB Tactical Collar Generate a tactical collar strategy report for protecting PMCC positions through earnings or high-risk events. ## Prerequisites User must have TWS or IB Gateway running locally with API enabled: - Paper trading: port 7497 - Live trading: port 7496 ## Instructions ### Step 1: Gather Data ```bash uv run python scripts/collar.py SYMBOL [--port PORT] [--account ACCOUNT] ``` The script returns JSON to stdout with all position and scenario data. ### Step 2: Format Report Read `templates/markdown-template.md` for formatting instructions. Generate a markdown report from the JSON data and save to `sandbox/`. ### Step 3: Report Results Present key findings to the user: recommended put protection, cost/benefit, and the saved report path. ## Arguments - `SYMBOL` - Stock symbol to analyze (must be in portfolio) - `--port` - IB port (default: 7496 for live trading) - `--account` - Specific account ID (optional, searches all accounts) ## JSON Output The script returns JSON with these key fields: - `symbol`, `current_price` - Basic info - `long_strike`, `long_expiry`, `long_qty`, `long_cost` - LEAPS position - `short_positions` - List of short calls - `is_proper_pmcc`, `short_above_long` - PMCC health flags - `earnings_date`, `days_to_earnings` - Earnings timing - `put_analysis` - List of put scenarios with costs and P&L under gap up/flat/down - `unprotected_loss_10`, `unprotected_loss_15`, `unprotected_gain_10` - LEAPS risk without collar - `volatility` -...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

ib-pmcc-advisor

Analyze PMCC (Poor Man's Covered Call / diagonal spread) positions from IB portfolio. For each diagonal spread, reports short leg risk (delta, IV, assignment probability), daily P&L projections, top-3 roll candidates, and a side-by-side comparison table. Requires TWS or IB Gateway running locally.

229 Updated today
staskh
AI & Automation Solid

ib-stop-loss

Downside stop-loss management for PMCC, naked LEAPS, and stock positions in IB. Computes stop prices, detects alerts, and places conditional combo orders. Dry-run by default. Requires TWS or IB Gateway running locally.

229 Updated today
staskh
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.

229 Updated today
staskh
AI & Automation Solid

ib-find-short-roll

Find roll options for existing short positions OR find best covered call/put to open against long stock. Use when user asks about rolling shorts, finding roll candidates, writing covered calls, or managing option positions. Requires TWS or IB Gateway running locally.

229 Updated today
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.

229 Updated today
staskh