earnings-calendar
Get upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates, earnings calendar, when a company…
Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally.
$ npx -y skills add staskh/trading_skills --skill ib-trailing-stop --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/ib-trailing-stopContext preview
The summary Claude sees to decide when to auto-load this skill.
Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally.
name: ib-trailing-stop description: Server-side trailing stop management for stocks and naked LEAPS in IB. Places native TRAIL orders that auto-ratchet the stop as price climbs. Dry-run by default. Requires TWS or IB Gateway running locally. dependencies: ["trading-skills"]
Places IB native **TRAIL** orders against stocks and naked LEAPS in the portfolio. IB auto-adjusts the stop trigger as the price climbs and locks it as price falls.
PMCC positions are intentionally excluded — use `ib-stop-loss` for those (a standalone trailing stop on the PMCC long leg would break the hedge at trigger).
**Default mode is dry-run** — no orders are placed unless `--execute` is in the request.
TWS or IB Gateway must be running locally with API enabled:
**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.
Dry-run (default — no orders placed):
uv run python .claude/skills/ib-trailing-stop/scripts/trailing_stop.py --symbols JOBY --trail-pct 20
Execute (cancel orphan TS_ orders + place new TS_ TRAIL orders):
uv run python .claude/skills/ib-trailing-stop/scripts/trailing_stop.py --symbols JOBY --trail-pct 20 --execute
Execute forced (cancel + replace existing TS_ orders with current parameters):
uv run python .claude/skills/ib-trailing-stop/scripts/trailing_stop.py --execute --forced
Format JSON output as a markdown report with three sections:
Show `all_trail_orders.module` (TS_ orders) and `all_trail_orders.manual` (manually placed). If `orphan_orders` is non-empty, warn that these were cancelled (execute mode) or need manual cancellation (dry-run).
For each entry in `positions`, show a table:
| Field | Value | |---|---| | Symbol | JOBY — stock (1000 shares) | | Spot | $7.50 | | Reference | $7.50 (max of current $7.50, avg cost $5.00) | | **Trail params** | 20% (initial stop $6.00) → action: place_new | | Existing trail | none |
For LEAPS rows, also show the option leg (strike/expiry) and current option mark.
`action` values:
Per-position result with `order_id` and `order_ref`.
| Flag | Default | Description | |------|---------|-------------| | `--port` | 7497 | IB Gateway/TWS port | | `--account` | all | Specific account ID | | `--symbols` | all | Analyze only these symbols | | `--trail-pct` | 20 | Trail amount as percentage of reference | | `--trail-amt` | — | Trail amount in dollars (mutually exclusive with --trail-pct) | | `--price-mode` | mid | Option pricing: `mid` or `last` (LEAPS only) | | `--execute` | off | Cancel orphans + place TS_ TRAIL orders | | `--forced` | off | Cancel and replace existing TS_ orders (requires `--execute`) |
{
"generated_at": "2026-05-29 10:00 ET",
"data_delay": "real-time",
"dry_run": true,
"forced": false,
"trail_pct": 20.0,
"trail_amt": null,
"accounts": ["U1234567"],
"symbols_filter": ["JOBY"],
"all_trail_orders": {"module": [], "manual": []},
"orphan_orders": [],
"positions": [
{
"symbol": "JOBY",
"type": "stock",
"account": "U1234567",
"qty": 1000,
"underlying_price": 7.50,
"stock": {
"avg_cost": 5.00,
"current_price": 7.50
},
"trail_stop": {
"trail_pct": 20.0,
"trail_amt": null,
"reference": 7.50,
"initial_stop_price": 6.00,
"action": "place_new",
"existing_trail": null
}
}
]
}All analytics live in `src/trading_skills/broker/trailing_stop.py`:
**Analytics (no IBKR — testable in isolation):**
-
Most retail traders juggle 5+ tabs — broker, charting platform, screener, news feed, spreadsheet — just to decide whether to enter a trade. This project collapses all of that into a single conversational interface powered by Claude.
Get upcoming earnings dates with timing (before/after market) and EPS estimates. Use when user asks about earnings dates, earnings calendar, when a company…
Get fundamental financial data including financials, earnings, and key metrics. Use when user asks about financials, earnings, revenue, profit, balance sheet,…
Calculate option Greeks (delta, gamma, theta, vega) and implied volatility for specific options. Use when user asks about Greeks, delta, gamma, theta, vega,…
Get account summary from Interactive Brokers including cash balance, buying power, and account value. Use when user asks about their account, balance, buying…
Generate tactical collar strategy reports for protecting PMCC positions through earnings or high-risk events. Requires TWS or IB Gateway running locally.
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…