All skills
staskh avatar

/ib-report-delta-adjusted-notional-exposure

@c0c554f
by staskhstaskh/trading_skills373 stars
85

Report delta-adjusted notional exposure across all IBKR accounts. Calculates option deltas using Black-Scholes and reports long/short exposure by account and underlying. Use when user asks about delta exposure, portfolio risk, or directional exposure.

Use this Skill: https://skilld.dev/gh/staskh/trading_skills/ib-report-delta-adjusted-notional-exposure

This session only. Nothing lands on disk.

templatesmarkdown-template.md

≈735 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Delta Exposure Report - Markdown Template

Format the JSON data into a markdown report saved to sandbox/.

Filename: delta_exposure_report_{YYYYMMDD}_{HHMMSS}.md

JSON Structure

{
  "connected": true,
  "accounts": ["ACC1", "ACC2"],
  "position_count": 25,
  "positions": [
    {
      "account": "ACC1",
      "symbol": "AAPL",
      "sec_type": "OPT",       // OPT, FOP, FUT, STK
      "strike": 180.0,         // options only
      "expiry": "20260321",    // options only, YYYYMMDD
      "right": "C",            // C or P, options only
      "qty": -5,
      "spot": 185.50,
      "delta": -0.35,
      "multiplier": 100,
      "raw_notional": -92750.0,
      "delta_notional": -32462.5
    }
  ],
  "summary": {
    "total_long_delta_notional": 500000.0,
    "total_short_delta_notional": -250000.0,
    "net_delta_notional": 250000.0,
    "by_account": {
      "ACC1": { "long": 300000.0, "short": -150000.0 }
    },
    "by_underlying": {
      "AAPL": { "long": 100000.0, "short": -50000.0, "net": 50000.0 }
    }
  }
}

Report Sections

1. Header

# Delta-Adjusted Notional Exposure Report
**Generated:** YYYY-MM-DD HH:MM:SS
**Accounts:** ACC1, ACC2
**Total Positions:** N

2. Portfolio Summary

Metric Value
Total Long Delta Notional $X,XXX,XXX
Total Short Delta Notional ($X,XXX,XXX)
Net Delta Notional $X,XXX,XXX

3. Summary by Account

Account Long Short Net

Calculate net as long + short for each account.

4. Summary by Underlying

Symbol Long Short Net

Sort by absolute net (descending).

5. Top Long Delta Exposures

Top 10 positions sorted by delta_notional (descending, positive only):

Account Symbol Type Strike Expiry Qty Delta Spot Delta Notional

6. Top Short Delta Exposures

Top 10 positions sorted by delta_notional (ascending, negative only):

Account Symbol Type Strike Expiry Qty Delta Spot Delta Notional

7. Detailed Positions by Account (full report only)

Group by account, then split into long/short subsections with full position tables.

8. Detailed Positions by Symbol (full report only)

Group by symbol with all positions listed.

Formatting Rules

  • Currency: $X,XXX.XX format, negative values in parentheses: ($X,XXX.XX)
  • Delta: 2 decimal places
  • Spot: 2 decimal places
  • Expiry: format YYYYMMDD as "Mon DD, YYYY"
  • Type: "OPT" -> show strike + right (e.g., "$180 C"), "STK" -> "Stock", "FUT" -> "Future"
  • Sort tables by absolute delta notional descending unless otherwise specified

Footer

*Report generated by Trading Skills on YYYY-MM-DD HH:MM*

Source: SKILL.md on GitHub

No alerts12d5 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    The skill generates financial risk reports for Interactive Brokers portfolios. It calculates delta-adjusted exposure using a Python script and formats the results into a markdown document. The analysis identified a potential surface for indirect prompt injection because the skill processes external account and position data without specific sanitization during report generation.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

  • Runlayer7mo

    2/3 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at c0c554f. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 3 months ago
dependencies
[
  "trading-skills"
]

README badge

README badge for staskh/trading_skills/ib-report-delta-adjusted-notional-exposure