> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beliefsystems.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Worked Examples

> Step-by-step NAV calculations for different scenarios – active markets, resolved markets, staleness, and performance tracking.

These examples walk through actual NAV calculations using the `midprice-v1` methodology. Each example uses realistic numbers and can be replicated with a spreadsheet and public market data from Polymarket.

<Info>
  Every number below is computed using 8-decimal-place precision with round-half-up, matching the production system exactly. If you follow along in a spreadsheet, your results should match within rounding tolerance.
</Info>

***

## Example 1: Equal-Weighted Index with 5 Active Markets

A macro-themed series tracking 5 economic prediction markets, all actively trading with two-sided order books.

**Series Composition:**

| # | Market                  | Best Bid | Best Ask | Midprice | Raw Weight |
| - | ----------------------- | -------- | -------- | -------- | ---------- |
| 1 | Fed cuts by June        | 0.82     | 0.83     | 0.8250   | 0.20       |
| 2 | CPI below 3% by Q2      | 0.71     | 0.72     | 0.7150   | 0.20       |
| 3 | Unemployment above 4.5% | 0.35     | 0.37     | 0.3600   | 0.20       |
| 4 | 10Y yield below 4%      | 0.44     | 0.46     | 0.4500   | 0.20       |
| 5 | GDP growth above 2%     | 0.58     | 0.59     | 0.5850   | 0.20       |

<Steps>
  <Step title="Compute midprices">
    For each market, average the best bid and best ask:

    ```
    Market 1: (0.82 + 0.83) / 2 = 0.82500000
    Market 2: (0.71 + 0.72) / 2 = 0.71500000
    Market 3: (0.35 + 0.37) / 2 = 0.36000000
    Market 4: (0.44 + 0.46) / 2 = 0.45000000
    Market 5: (0.58 + 0.59) / 2 = 0.58500000
    ```

    Each midprice represents the market's implied probability for that event occurring.
  </Step>

  <Step title="Normalize weights">
    ```
    Sum of raw weights = 5 x 0.20 = 1.00
    ```

    Since the raw weights already sum to 1.00, normalized weights equal the raw weights:

    ```
    w'_1 = w'_2 = w'_3 = w'_4 = w'_5 = 0.20000000
    ```
  </Step>

  <Step title="Compute Raw NAV">
    Multiply each normalized weight by its market's midprice and sum:

    ```
    raw_nav = (0.20 x 0.82500000)
            + (0.20 x 0.71500000)
            + (0.20 x 0.36000000)
            + (0.20 x 0.45000000)
            + (0.20 x 0.58500000)

            = 0.16500000
            + 0.14300000
            + 0.07200000
            + 0.09000000
            + 0.11700000

            = 0.58700000
    ```
  </Step>

  <Step title="Compute Index Level">
    Assume the series launched with an inception Raw NAV of 0.55000000:

    ```
    index_level = 100 x (0.58700000 / 0.55000000)
                = 100 x 1.06727273
                = 106.72727273
    ```

    The index has gained approximately 6.7% from inception.
  </Step>
</Steps>

**Interpretation:** The weighted-average implied probability across all 5 markets is about 58.7%. The highest-confidence market is "Fed cuts by June" at 82.5%, while the lowest is "Unemployment above 4.5%" at 36%. The index is up \~6.7% from inception, meaning the aggregate probability of these events has increased since the series launched.

<Tip>
  The markets in this example are illustrative, so live prices will differ. To verify a real published value, pick a live series, fetch the current best bid and best ask for each of its constituents, and follow the [Independent Verification Guide](/indices/nav-methodology#independent-verification-guide) – your result should match the published Raw NAV within the tolerances documented there.
</Tip>

***

## Example 2: Index with Resolved Markets

A 4-market series where two markets have already settled – one won, one lost.

**Series Composition:**

| # | Market                | Status   | Tracked Outcome | Price Source | Price Used | Raw Weight |
| - | --------------------- | -------- | --------------- | ------------ | ---------- | ---------- |
| 1 | Fed cuts in January   | Resolved | YES (Won)       | Settlement   | 1.00       | 0.25       |
| 2 | CPI below 2% in Q1    | Resolved | YES (Lost)      | Settlement   | 0.00       | 0.25       |
| 3 | Recession by mid-year | Active   | YES             | Midprice     | 0.18       | 0.25       |
| 4 | Core PCE below 2.5%   | Active   | YES             | Midprice     | 0.62       | 0.25       |

<Steps>
  <Step title="Apply resolution prices">
    * Market 1: The tracked outcome (YES) **won** – settlement price = **\$1.00**
    * Market 2: The tracked outcome (YES) **lost** – settlement price = **\$0.00**
    * Markets 3 and 4 remain active and use live midprices from the order book
  </Step>

  <Step title="Normalize weights">
    All four markets participate in the computation regardless of resolution status.

    ```
    Sum of raw weights = 4 x 0.25 = 1.00
    Normalized weight = 0.25 for each market
    ```
  </Step>

  <Step title="Compute Raw NAV">
    ```
    raw_nav = (0.25 x 1.00)     Market 1: resolved winner
            + (0.25 x 0.00)     Market 2: resolved loser
            + (0.25 x 0.18)     Market 3: active
            + (0.25 x 0.62)     Market 4: active

            = 0.25000000
            + 0.00000000
            + 0.04500000
            + 0.15500000

            = 0.45000000
    ```
  </Step>

  <Step title="Interpret the result">
    The Raw NAV of 0.45 reflects the mix of settled outcomes and remaining active markets:

    * The winning market (#1) contributes its full weight (0.25) to the NAV
    * The losing market (#2) contributes nothing (0.00)
    * The two active markets contribute based on their current implied probabilities
  </Step>
</Steps>

<Note>
  Resolved markets remain in the index with their settlement prices. They are not removed. This means a losing market at \$0.00 permanently drags the index down by its weighted share, while a winning market at \$1.00 permanently supports it. This is by design – the index tracks the full history of outcomes.
</Note>

**What if both resolved markets had won?**

```
raw_nav = (0.25 x 1.00) + (0.25 x 1.00) + (0.25 x 0.18) + (0.25 x 0.62)
        = 0.25 + 0.25 + 0.045 + 0.155
        = 0.70
```

The NAV would be 0.70 instead of 0.45 – a significant difference driven entirely by the resolution outcomes.

***

## Example 3: Staleness – Missing Price Data

What happens when the system cannot fetch a current price for one of the underlying markets.

**Scenario:** A 4-market series where Market #3's price fetch fails after three retries.

| # | Market   | Current Price  | Previous Price | Status                     |
| - | -------- | -------------- | -------------- | -------------------------- |
| 1 | Market A | 0.72 (live)    | 0.70           | Fresh                      |
| 2 | Market B | 0.55 (live)    | 0.53           | Fresh                      |
| 3 | Market C | *fetch failed* | 0.41           | **Stale** (using fallback) |
| 4 | Market D | 0.88 (live)    | 0.87           | Fresh                      |

All markets have equal weight (0.25 each).

<Steps>
  <Step title="Apply fallback for Market #3">
    The system attempted to fetch Market C's order book three times with exponential backoff. All attempts failed (e.g., API timeout or network error).

    **Fallback rule:** Use the last successfully fetched price. Market C's previous midprice was **0.41**, so that value is used.
  </Step>

  <Step title="Compute Raw NAV">
    ```
    raw_nav = (0.25 x 0.72)   Market A: fresh
            + (0.25 x 0.55)   Market B: fresh
            + (0.25 x 0.41)   Market C: stale (fallback)
            + (0.25 x 0.88)   Market D: fresh

            = 0.18000000
            + 0.13750000
            + 0.10250000
            + 0.22000000

            = 0.64000000
    ```
  </Step>

  <Step title="Flag the computation as stale">
    Because Market C used a fallback price, the **entire computation** is marked as stale. This flag is visible in the published data.

    If Market C's actual price had moved (say, from 0.41 to 0.48), the true NAV would be:

    ```
    true_raw_nav = (0.25 x 0.72) + (0.25 x 0.55) + (0.25 x 0.48) + (0.25 x 0.88)
                 = 0.65750000
    ```

    The difference (0.6575 vs 0.6400) is 0.0175, or about 2.7% – entirely attributable to the stale data.
  </Step>
</Steps>

<Warning>
  A stale NAV should be interpreted with caution. The published value may be higher or lower than reality, depending on how the affected market's price has moved since the last successful fetch. Once the price feed recovers, subsequent computations will use fresh data and the staleness flag will clear.
</Warning>

**When does staleness trigger?**

| Condition                                 | Result                                         |
| ----------------------------------------- | ---------------------------------------------- |
| API timeout or network failure            | Stale – uses last known price                  |
| One-sided order book (only bids, no asks) | Stale – midprice cannot be computed            |
| Market data unavailable for all markets   | Computation fails entirely                     |
| Market is resolved                        | Never stale – settlement prices are definitive |

***

## Example 4: Tracking Index Level Over Time

How the Index Level tracks performance from inception to present, and how it relates to Raw NAV.

**Scenario:** A series launches with an inception Raw NAV of 0.4200. Over six weeks, market prices shift:

| Date               | Raw NAV    | Index Level Calculation | Index Level | Change  |
| ------------------ | ---------- | ----------------------- | ----------- | ------- |
| Week 0 (inception) | 0.42000000 | 100 x (0.4200 / 0.4200) | 100.00      | –       |
| Week 1             | 0.43500000 | 100 x (0.4350 / 0.4200) | 103.57      | +3.57%  |
| Week 2             | 0.39800000 | 100 x (0.3980 / 0.4200) | 94.76       | -5.24%  |
| Week 3             | 0.41000000 | 100 x (0.4100 / 0.4200) | 97.62       | -2.38%  |
| Week 4             | 0.45000000 | 100 x (0.4500 / 0.4200) | 107.14      | +7.14%  |
| Week 5             | 0.44200000 | 100 x (0.4420 / 0.4200) | 105.24      | +5.24%  |
| Week 6             | 0.47600000 | 100 x (0.4760 / 0.4200) | 113.33      | +13.33% |

<Steps>
  <Step title="Index Level at inception">
    At launch, the Index Level is always 100.00 – this is the base value.

    ```
    index_level = 100 x (0.42000000 / 0.42000000) = 100.00000000
    ```
  </Step>

  <Step title="Index Level after a gain (Week 1)">
    Raw NAV increased from 0.4200 to 0.4350 (underlying probabilities rose):

    ```
    index_level = 100 x (0.43500000 / 0.42000000)
                = 100 x 1.03571429
                = 103.57142857
    ```

    The index is up 3.57% from inception.
  </Step>

  <Step title="Index Level after a decline (Week 2)">
    Raw NAV dropped to 0.3980 (some underlying probabilities fell):

    ```
    index_level = 100 x (0.39800000 / 0.42000000)
                = 100 x 0.94761905
                = 94.76190476
    ```

    The index is down 5.24% from inception. Note: the drawdown from Week 1 to Week 2 is even larger – from 103.57 to 94.76, a decline of 8.5% week-over-week.
  </Step>

  <Step title="Full recovery and beyond (Week 6)">
    By Week 6, Raw NAV has risen to 0.4760:

    ```
    index_level = 100 x (0.47600000 / 0.42000000)
                = 100 x 1.13333333
                = 113.33333333
    ```

    The index is up 13.33% from inception. Over that span the index swung from 94.76 (Week 2 low) to 113.33 (Week 6).
  </Step>
</Steps>

**Key properties of the Index Level:**

| Property                | Explanation                                                                        |
| ----------------------- | ---------------------------------------------------------------------------------- |
| Always starts at 100    | The base value is set at inception                                                 |
| Proportional to Raw NAV | A 10% increase in Raw NAV = a 10% increase in Index Level                          |
| Inception NAV is fixed  | The denominator never changes – it is locked at the first computation              |
| Cannot go below 0       | Because Raw NAV is bounded between 0 and 1, and inception is positive              |
| Cannot exceed \~238     | Because Raw NAV maxes out at 1.0 (in the inception\_raw\_nav = 0.42 example above) |

<Note>
  The Index Level tracks *theoretical* index performance, gross of any costs. Within the private Alpha Program, participants' realized values are measured by **NAV per Share**, which accounts for real holdings, uninvested cash, and fees. See [NAV Per Share](/investing/nav-per-share) for details on this distinction.
</Note>

***

## Formula Reference

For quick reference, all formulas used in these examples:

| Formula                  | Expression                                                            |
| ------------------------ | --------------------------------------------------------------------- |
| **Midprice**             | `(best_bid + best_ask) / 2`                                           |
| **Weight normalization** | `w'_i = w_i / sum(w)`                                                 |
| **Raw NAV**              | `sum(w'_i x price_i)` for all markets                                 |
| **Index Level**          | `100 x (raw_nav / inception_raw_nav)`                                 |
| **NAV per Share**        | `(position_value + custody_cash - accrued_fees) / shares_outstanding` |

<CardGroup cols={2}>
  <Card title="NAV Methodology" icon="calculator" href="/indices/nav-methodology">
    Full methodology specification with verification guide.
  </Card>

  <Card title="NAV Per Share" icon="coins" href="/investing/nav-per-share">
    How the published NAV translates to your share value.
  </Card>
</CardGroup>
