# Fee waterfall: 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 do the management and performance fees take from this return series, and at what return does a performance fee start?

## Method

Each period: assets = opening x (1 + r) - opening x m / p. Hurdle line = mark x (1 + h)^(k / p), k periods since the last date. Hard fee = f x (assets - line) above the line. Soft fee = f x (assets - mark) above the line. Between dates that fee is an accrual inside net NAV. At a date it is paid, then mark = max(mark, assets after the fee). Flip: r* = m / p + (1 + h)^(1 / p) - 1.

## Conventions

- Order each period: gross return, then management fee, then the performance fee accrual.
- The management fee is simple: the annual rate divided by periods_per_year, on opening assets before any accrued performance fee.
- An accrued fee stays in the fund until it is paid, so the return applies to assets before the accrual. Net NAV is assets less the accrual.
- An accrual can shrink or vanish before a date. Only the fee at a date is paid, and it is not returned after a later loss.
- The hurdle compounds at the annual rate: over k periods the line is mark x (1 + h)^(k / p), so one full year is exactly h.
- The hurdle restarts from the mark at every date. A missed year is not carried forward.
- The mark rises to the NAV after fees whenever that is above it, even in a period with no fee. With use_hwm false, it moves to the NAV after fees at every date, up or down.
- A series that ends between dates pays nothing for the last part. That accrual is shown apart and is inside net NAV, with the hurdle prorated.
- Fee drag is compound gross growth a year less compound net growth a year, with years = periods / periods_per_year.

## 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
{
  "nav_start": 100000000,
  "gross_returns_pct": [
    5, 3, 4, 2, -6, -5, 1, -2, 6, 5,
    4, 3, 2, 3
  ],
  "periods_per_year": 4,
  "mgmt_fee_pct_annual": 2,
  "perf_fee_pct": 20,
  "hurdle_pct_annual": 4,
  "hurdle_type": "hard",
  "crystallize_every": 4,
  "use_hwm": true
}
```

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

- Net NAV at the end: 116287292.8
- Gross NAV at the end: 127017063.5
- Management fees: 7358920.477
- Performance fees paid: 1704871.813
- Performance fee accrued, not paid: 461690.1957
- Fee drag: 2.666213864 points a year
- High-water mark at the end: 112218174.2
- Gain on assets before the next performance fee: 0 %

Where the outcome flips, with the other inputs held:

- flat_gross_return_pct at 1.485340655: At or below this flat gross return a period, no performance fee appears: it only covers the management fee and the hurdle. Above it, one does.

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:

- Subscriptions and redemptions. One holder from day one, so no equalization or series accounting.
- Clawback of fees paid earlier, after a later loss.
- A hurdle that carries a missed year forward.
- Partial catch-up tiers. A soft hurdle here is a full catch-up at once.
- Expenses other than these two fees: admin, audit, financing and trading costs.
- Taxes, on the fund or on the holder.
- Rebates, fee classes and side letters.

## 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/fee_waterfall/prompt.md. Terms: https://hedgefund.md/terms
