ib-collar
This skill builds collar strategy reports for PMCC traders facing earnings or volatility spikes. It connects to Interactive Brokers, analyzes your long LEAPS and short calls, models put protection scenarios across gap-up/flat/down outcomes, and recommends optimal strike and duration for tactical hedging.
IB Tactical Collar generates protective collar strategy reports for PMCC positions ahead of earnings or high-risk events.
AI-generated summary based on this skill's SKILL.md
Install
staskh/trading_skills/ib-collar · repository language: Python
git clone https://github.com/staskh/trading_skills
cp -r trading_skills/.claude/skills/ib-collar ~/.claude/skills/ib-collarnpx skillfed install staskh/trading_skills/ib-collarFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What is ib-collar and how does it protect PMCC positions?
ib-collar builds collar strategy reports for PMCC traders facing earnings or volatility spikes. It connects to Interactive Brokers, analyzes your long LEAPS and short calls, models put protection scenarios across gap-up/flat/down outcomes, and recommends optimal strike and duration for tactical hedging around high-risk events.
How do I generate a collar strategy report to protect PMCC positions around earnings?
ib-collar generates a collar strategy report by connecting to your Interactive Brokers account, pulling your PMCC structure (long LEAPS and short calls), and modeling protective put scenarios. The report evaluates gap-up, flat, and gap-down outcomes, recommends optimal strike prices and durations, and shows the cost-benefit trade-offs for each hedging choice.
Can ib-collar analyze put protection options and costs for my short calls?
Yes. ib-collar analyzes put protection options by calculating the cost of puts at various strikes and durations, comparing them against your short call exposure. It evaluates which put durations best match your tactical hedging goals and shows the margin implications before you commit to any hedge.
What collar scenarios does ib-collar evaluate to recommend optimal strikes?
ib-collar evaluates three core scenarios: gap-up (stock rallies past your short strike), flat (stock stays near current price), and gap-down (stock falls sharply). For each scenario, it recommends optimal put and call strikes, shows profit/loss outcomes, and highlights which collar structure best protects your PMCC while preserving upside or managing downside risk.
How does ib-collar compare put durations for tactical hedging?
ib-collar compares put durations by modeling shorter-term puts (faster decay, lower cost) against longer-dated protection, showing trade-offs in cost, coverage window, and margin impact. It helps you choose whether to hedge just through earnings or extend protection further, based on your volatility outlook and capital constraints.
Does ib-collar check my PMCC structure health before hedging?
Yes. ib-collar checks your PMCC structure health and margin implications before recommending any hedge. It validates your long LEAPS and short call positions, confirms margin availability, and ensures the collar recommendation won't trigger margin calls or violate your account constraints.
SKILL.md
rendered from the published skill — quoted content, verbatim
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_PORT env var — default port when --port is omitted (e.g. IB_PORT=4001 for a Gateway container). Precedence: --port flag > IB_PORT > built-in default. Set it in the shell or a .env file.
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
```bash uv run python scripts/collar.py SYMBOL [--port PORT]
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 3 files
.claude/skills/ib-collar/SKILL.md
.claude/skills/ib-collar/scripts/collar.py
.claude/skills/ib-collar/templates/markdown-template.md