
Ib Collar
If you're running poor man's covered calls and have earnings coming up, this generates a tactical collar report showing exactly what put protection costs versus what you'd lose in a gap down. It pulls your actual PMCC positions from Interactive Brokers, checks if your structure is healthy or broken, then models short versus medium versus long-dated puts across gap scenarios. The analysis is surprisingly detailed about salvage value and implementation timing. You need TWS or IB Gateway running locally, and it assumes you only collar during high-risk events rather than holding permanent protection. Niche use case, but if you're in that specific situation the week before earnings, it beats spreadsheet guesswork.
- GitHub stars
- 248
- last updated
- Jun 11, 2026
Install
$ npx -y skills add staskh/trading_skills --skill ib-collar --agent claude-codeInstalls into .claude/skills of the current project.
Files
IB Tactical Collar
Generate a tactical collar strategy report for protecting PMCC positions through earnings or high-risk events.
IB Connection
TWS or IB Gateway must be running locally with API enabled:
- Paper trading — port 7497
- Live trading — port 7496
IB_PORTenv var — default port when--portis omitted (e.g.IB_PORT=4001for a Gateway container). Precedence:--portflag >IB_PORT> built-in default. Set it in the shell or a.envfile.
Port fallback: If the configured port fails, automatically retry on the other port. If the retry succeeds, save to memory which account type worked (live/paper) and reuse it for all IB skill calls in this and future sessions — until the user explicitly asks for the other account. If both ports fail, ask the user to verify that TWS or IB Gateway is running with API access enabled.
Instructions
Step 1: Gather Data
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
Sponsors
Details
- Repository
- github.com/staskh/trading_skills
- Categories
- Backend & APIs, Finance & Trading
- License
- MIT
- First seen
- Jun 11, 2026
More from staskh/trading_skills
All 28- Ib Create Consolidated Report
- Ib Find Short Roll
- Ib Option Chain
- Ib Pmcc Advisor
- Ib Portfolio
- Ib Portfolio Action Report
- Ib Report Delta Adjusted Notional Exposure
- Ib Stop Loss
- Ib Trades History
- Ib Trailing Stop
- Insider Trading
- Markdown To Pdf
- Price History
- Scanner Bullish
- Scanner Pmcc
- Spread Analysis
- Whale Hunting
- Technical Analysis598
- News Sentiment246
- Fundamentals182
- Stock Quote131
- Greeks128
- Report Stock117
- Option Chain111