ib-find-short-roll

Solid

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.

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 Find Short Roll Analyze roll options for short positions or find best short options to open against long stock using real-time data from Interactive Brokers. ## 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 > **Note:** If `uv` is not installed or `pyproject.toml` is not found, replace `uv run python` with `python` in all commands below. ```bash uv run python scripts/roll.py SYMBOL [--strike STRIKE] [--expiry YYYYMMDD] [--right C|P] [--port PORT] [--account ACCOUNT] ``` The script returns JSON to stdout with all position and candidate 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 position, credit/debit, and the saved report path. ## Behavior 1. **If short option position exists** (`mode: "roll"`): Analyzes roll candidates to different expirations/strikes 2. **If long option position exists** (`mode: "spread"`): Finds best short call/put to create a vertical spread 3. **If long stock exists** (`mode: "new_short"`): Finds best covered call (or protective put) to open 4. **If none of the above**: Returns error (use --strike/--expiry to specify manually) ## Arguments - `SYMBOL` - Ticker symbol (e.g., GOOG, AAPL, TSLA) - `--strike` - Current s...

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