
Ib Report Delta Adjusted Notional Exposure
This calculates delta-adjusted notional exposure across your Interactive Brokers accounts, which is essential if you're trading options and need to know your actual directional risk. It pulls live position data via the TWS API, runs Black-Scholes to compute deltas for options (with IV estimates based on moneyness), and aggregates everything into long/short exposure by account and underlying. The output is structured JSON that gets formatted into a markdown report with summary tables. Works with both paper and live trading ports. The methodology is straightforward: futures and stocks get delta of 1.0, equity options use proper Greeks, and futures options assume 20% IV. If you're managing multi-leg option strategies or just want to know if you're actually long or short SPY after all those spreads, this gives you the answer.
- GitHub stars
- 248
- last updated
- Jun 11, 2026
Install
$ npx -y skills add staskh/trading_skills --skill ib-report-delta-adjusted-notional-exposure --agent claude-codeInstalls into .claude/skills of the current project.
Files
IB Delta-Adjusted Notional Exposure Report
Calculate and report delta-adjusted notional exposure across all Interactive Brokers accounts.
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/delta_exposure.py [--port PORT]
The script returns JSON to stdout with all position deltas and summary data.
Step 2: Format Report
Sponsors
Details
- Repository
- github.com/staskh/trading_skills
- Categories
- Python, Finance & Trading
- License
- MIT
- First seen
- Jun 11, 2026
More from staskh/trading_skills
All 28- 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
- Risk Assessment105
- Earnings Calendar
- Ib Account
- Ib Collar
- Ib Create Consolidated Report
- Ib Find Short Roll
- Ib Option Chain