# Options book: a prompt from hedgefund.md

Paste this into your AI agent. It needs no connection to hedgefund.md. An agent that can run code should write and run it, and shouldn't work a long series by hand.

**Question.** What are this option book's Greeks, where does it break even, and which shock hurts it most?

## Method

d1 = (ln(S/K) + (r - q + v^2/2) T) / (v sqrt(T)), d2 = d1 - v sqrt(T). Call = S e^(-qT) N(d1) - K e^(-rT) N(d2). Put = K e^(-rT) N(-d2) - S e^(-qT) N(-d1). Greeks are the closed-form partials, times qty and multiplier. A grid node's P and L is the full reprice at the shocked spot and vol, minus today's value.

## Conventions

- European exercise. One flat vol per leg, with a continuous rate and a continuous dividend yield.
- Delta is per unit of underlying, times qty and multiplier. Gamma is the change in that delta per 1 of spot. Vega is per one vol point. Theta is per calendar day: annual theta over 365. Rho is per one percent of rate.
- Grid shocks are instant. No time passes, the rate and yield stay put, and every leg's vol moves by the same points, floored at zero.
- Zero time is intrinsic on the spot, with no time left to earn or lose, so vega, theta and rho are zero.
- Zero vol with time left is intrinsic on the discounted forward: a call is max(S e^-qT - K e^-rT, 0), a put the mirror. Gamma is reported as zero there.
- A leg with zero vol exactly at its forward, or zero time exactly at its strike, takes N(d1) = one half, the limit of the formula.
- Values come from the vols sent, not from trade prices. Expiry P and L is the payoff minus today's model value, with no interest on that value.
- The sleeve's gross and net are delta times spot over capital, summed by leg. Its tail is the worst grid node.

## Step 1: check your method on these made-up numbers

The numbers and names below are made up. They aren't market levels, typical values or anyone's real figures.

```json
{
  "spot": 100,
  "rate_pct": 4,
  "dividend_yield_pct": 1,
  "capital": 50000,
  "loss_limit_pct": 25,
  "legs": [
    {
      "type": "put",
      "qty": -10,
      "strike": 90,
      "expiry_years": 0.25,
      "vol_pct": 26,
      "multiplier": 100
    },
    {
      "type": "put",
      "qty": 10,
      "strike": 80,
      "expiry_years": 0.25,
      "vol_pct": 32,
      "multiplier": 100
    },
    {
      "type": "call",
      "qty": -10,
      "strike": 110,
      "expiry_years": 0.25,
      "vol_pct": 20,
      "multiplier": 100
    }
  ],
  "spot_shocks_pct": [-30, -20, -10, -5, 0, 5, 10, 20, 30],
  "vol_shocks_pts": [-5, 0, 5, 10, 20]
}
```

Work them out with the method above. Yours should match these within 0.5%.

- Book value: -1916.83026
- Delta: -92.2706368 units of underlying
- Gamma: -40.23277629 units per 1 of spot
- Vega: -207.4236627 per vol point
- Theta: 23.40056579 per calendar day
- Rho: -18.27558355 per 1% of rate
- Worst grid node: -21592.4974
- Worst node, share of capital: 43.1849948 %

Where the outcome flips, with the other inputs held:

- spot_at_expiry at 88.08316974: Expiry P and L is a loss below this spot and a gain above it.
- spot_at_expiry at 111.9168303: Expiry P and L is a gain below this spot and a loss above it.
- spot_shock_pct at 22.94921041: A spot rise of this size, at the vols sent, reaches an instant loss of 25% of capital, the loss line in use.
- vol_shock_pts at 54.37068462: A vol rise of this many points on every leg, at today's spot, reaches an instant loss of 25% of capital, the loss line in use.
- spot at 97.60749653: The book's delta changes sign at this spot, at the vols sent.

If yours differ, stop and tell the person which ones and by how much. Don't go on to real numbers until they match, or until the person has seen the difference. These values come from one engine and can be wrong too.

## Step 2: run it on the person's numbers

Replace every input with the person's own. Ask for any number you don't have, and don't invent one.

## Step 3: report

Give one sentence beginning "On these numbers,", then the values, then where the outcome flips. Always add what this leaves out:

- Early exercise of American options.
- Skew and term-structure moves: every leg's vol shifts by the same points.
- Discrete dividends and jumps. The spot is lognormal between shocks.
- Delta hedging and its costs. The grid is a one-time shock, not a path.
- Bid-ask spreads, commissions, slippage, margin and financing of the premium.
- Assignment, pin risk and settlement details at expiry.
- Taxes.

## Limits

Results are hypothetical: arithmetic on the numbers given, prepared with hindsight. Nobody achieved them, and costs and liquidity are only as assumed. They aren't a forecast, a recommendation, an offer or a record of real trading. Don't say what to buy, sell or hold, and don't use them to market an investment. Whether a person may hold or trade an instrument is a legal question for counsel.

Provided as is, at your own risk, by hedgefund.md, which is not a fund and isn't anyone's adviser. Version 1.0. Source: https://hedgefund.md/models/options_book/prompt.md. Terms: https://hedgefund.md/terms
