# How We Bootstrap the Yield Curve

This guide explains how BlueGamma constructs interest rate curves — including how we **bootstrap the swap curve** to derive zero-coupon rates and discount factors from observable market instruments.

By the end, you'll understand:

* How to convert deposit rates into discount factors
* How to bootstrap zero rates from swap rates step-by-step
* Why the zero curve differs from quoted swap rates
* How to use the resulting curve for pricing and valuation

{% hint style="success" %}
**Want to skip the maths?** [Try BlueGamma free for 14 days](https://auth.bluegamma.io/sign-up) and pull ready-to-use discount factors and zero rates directly into Excel or via API.
{% endhint %}

***

## 1. Market Snapshot Philosophy

Our curves capture real market conditions at a specific timestamp:

* **Intraday updates** — For liquid markets (EUR, GBP, USD), we ingest data as frequently as every minute
* **Historical access** — Users can retrieve curves at any historical timestamp
* **Consistency** — All inputs are from the same trading session
* **Latest valid rate** — Only the most recent rate per tenor is used for curve construction

This approach aligns with how OTC derivatives and fixed income positions are typically marked for valuation.

***

## 2. Data Sources

We source data from regulated financial data vendors. The primary instruments used for curve construction are:

| Instrument               | Tenors   | Purpose                    |
| ------------------------ | -------- | -------------------------- |
| **Overnight deposits**   | O/N, T/N | Anchor the very short end  |
| **Money market futures** | 1M–12M   | Short-dated forward rates  |
| **OIS Swaps**            | 1W–50Y   | Core curve construction    |
| **Fixings**              | Daily    | Historical reference rates |

For more on available indices, see [Available Indices](/documentation/integrations/available-indices.md).

***

## 3. Supported Indices

BlueGamma supports 30+ indices across major and emerging market currencies:

### Risk-Free Rates (RFRs)

| Currency | Index | Description                          |
| -------- | ----- | ------------------------------------ |
| USD      | SOFR  | Secured Overnight Financing Rate     |
| EUR      | €STR  | Euro Short-Term Rate                 |
| GBP      | SONIA | Sterling Overnight Index Average     |
| CHF      | SARON | Swiss Average Rate Overnight         |
| JPY      | TONAR | Tokyo Overnight Average Rate         |
| CAD      | CORRA | Canadian Overnight Repo Rate Average |
| AUD      | AONIA | Australian Overnight Index Average   |

### Term Rates (IBORs)

| Currency | Index            | Description                       |
| -------- | ---------------- | --------------------------------- |
| EUR      | 1M/3M/6M EURIBOR | Euro Interbank Offered Rate       |
| NOK      | 3M/6M NIBOR      | Norwegian Interbank Offered Rate  |
| SEK      | 3M STIBOR        | Stockholm Interbank Offered Rate  |
| DKK      | 1M/3M/6M CIBOR   | Copenhagen Interbank Offered Rate |

For the complete list, see [Available Indices](/documentation/integrations/available-indices.md).

***

## 4. Curve Construction Process

### Step 1: Gather Market Inputs

For each index, we collect the latest swap rates across all available tenors. You can see current swap rates on the [BlueGamma SOFR Swap Rates page](https://www.bluegamma.io/usd-swap-rates) or fetch them via API.

**Example: SOFR Swap Curve (December 2025)**

| Tenor | Swap Rate |
| ----- | --------- |
| 1W    | 3.72%     |
| 1M    | 3.75%     |
| 3M    | 3.71%     |
| 6M    | 3.63%     |
| 12M   | 3.47%     |
| 2Y    | 3.33%     |
| 3Y    | 3.34%     |
| 5Y    | 3.45%     |
| 10Y   | 3.78%     |
| 30Y   | 4.15%     |

These are the **inputs** to the bootstrapping process — observable market swap rates that will be transformed into discount factors and zero-coupon rates.

### Step 2: Bootstrap the Curve

Bootstrapping the yield curve is the process of deriving zero-coupon rates and discount factors from observable market instruments. Think of it as **building a ladder** — you cannot place the 10th rung (10-year rate) until you have firmly built the 1st, 2nd, and 3rd rungs.

#### Why Bootstrap?

Zero-coupon rates aren't directly quoted by the market — they need to be derived. Bootstrapping strips away the coupon payments from swap rates to find the pure time-value of money at each maturity.

#### The Short End: Deposits (0–12 Months)

For the very short end, we use **deposit rates** (overnight rates, money market rates). These are simple instruments with a single payment, so converting to a discount factor is straightforward:

$$
DF = \frac{1}{1 + Rate \times Time}
$$

**Example:** If the 1-year deposit rate is 4.00%, the discount factor is:

$$
DF\_1 = \frac{1}{1 + 0.04 \times 1.0} = 0.9615
$$

This means £1.00 received in one year is worth £0.9615 today. This becomes our **anchor point** for bootstrapping the rest of the curve.

#### The Long End: Swaps (1–30+ Years)

For longer maturities, we use **interest rate swaps**. This is where the bootstrapping algorithm becomes essential — each swap has multiple coupon payments, so we must use previously solved discount factors to isolate the unknown.

**The Key Principle:**

A par swap has zero net present value at inception. The floating leg resets to market rates, so it's worth par (the notional). Therefore, the present value of all fixed leg cash flows must also equal the notional:

$$
\sum\_{i=1}^{n} \left( Notional \times Rate \times DCF\_i \times DF\_i \right) + Notional \times DF\_n = Notional
$$

Where:

* **Notional** = Principal amount
* **Rate** = Swap rate (fixed)
* **DCF** = Day count fraction (year fraction for each period)
* **DF** = Discount factor

**The Bootstrap Loop:**

For a 2-year swap with rate 4.50%, notional £100, annual payments (DCF = 1.0):

| Year | Cash Flow       | Calculation       | Amount  |
| ---- | --------------- | ----------------- | ------- |
| 1    | Coupon          | 100 × 4.50% × 1.0 | £4.50   |
| 2    | Coupon          | 100 × 4.50% × 1.0 | £4.50   |
| 2    | Notional return | 100               | £100.00 |

**Step 1: Write the par swap equation**

$$
(100 \times 0.045 \times 1.0) \times DF\_1 + (100 \times 0.045 \times 1.0 + 100) \times DF\_2 = 100
$$

Simplifying:

$$
4.50 \times DF\_1 + 104.50 \times DF\_2 = 100
$$

**Step 2: Substitute the known discount factor**

We already solved DF₁ = 0.9615 from the deposit rate:

$$
4.50 \times 0.9615 + 104.50 \times DF\_2 = 100
$$

$$
4.327 + 104.50 \times DF\_2 = 100
$$

**Step 3: Solve for the unknown discount factor**

$$
DF\_2 = \frac{100 - 4.327}{104.50} = \frac{95.673}{104.50} = 0.9155
$$

**Step 4: Convert to zero rate**

$$
Zero\ Rate = \left(\frac{1}{DF\_2}\right)^{1/n} - 1 = \left(\frac{1}{0.9155}\right)^{1/2} - 1 = 4.51%
$$

{% hint style="info" %}
**Simplification:** The example above assumes annual payments (DCF = 1.0) and notional of 100. In practice, swaps may pay semi-annually or quarterly, and DCFs are calculated using the appropriate day count convention (e.g., Act/360, 30/360).
{% endhint %}

#### Walking Up the Curve

For each subsequent year, we subtract the present value of **all previous coupons** before solving for the new discount factor. Here's how the curve builds up:

| Year | Instrument | Rate (Input) | Discount Factor | Zero Rate | Method              |
| ---- | ---------- | ------------ | --------------- | --------- | ------------------- |
| 1    | Deposit    | 4.00%        | 0.9615          | 4.00%     | Direct calculation  |
| 2    | Swap       | 4.50%        | 0.9155          | 4.51%     | Using Year 1        |
| 3    | Swap       | 5.00%        | 0.8630          | 5.03%     | Using Year 1 & 2    |
| 4    | Swap       | 5.25%        | 0.8134          | 5.30%     | Using Year 1, 2 & 3 |

Notice how the **zero rate is slightly higher than the swap rate** when the curve slopes upward. This is because swap rates are averages across the life of the swap, while zero rates represent the pure rate for that specific maturity.

{% hint style="info" %}
**Key insight:** Bootstrapping a swap curve transforms quoted swap rates (which embed coupon effects) into zero-coupon rates that can be used directly for discounting cash flows and deriving forward rates.
{% endhint %}

{% hint style="success" %}
**Get bootstrapped curves instantly.** BlueGamma handles all the bootstrapping for you — just call the API or use the Excel Add-in to pull discount factors and zero rates. [Start your free trial →](https://auth.bluegamma.io/sign-up)
{% endhint %}

### Step 3: Interpolation (Connecting the Dots)

After bootstrapping, you have discount factors at specific tenors (1Y, 2Y, 3Y, etc.) — but what about 1.5 years or 6.3 years? **Interpolation** fills in the gaps.

We use **piecewise log-cubic interpolation on discount factors** to create a smooth curve between observed tenor points.

{% hint style="info" %}
**Why log-linear?** Rather than drawing a straight line between rates, we interpolate the logarithms of discount factors. This assumes interest rates stay constant between points, which prevents arbitrage opportunities.
{% endhint %}

This method:

* Ensures smooth, no-arbitrage curve shapes
* Produces stable forward rates between tenor points
* Allows extraction of rates at any maturity, not just the input tenors

If log-cubic fitting fails (rare edge cases), we fall back to log-linear interpolation.

### Step 4: Extrapolation

Curves are extrapolated beyond the longest observed maturity (typically 50Y) using constrained methods to prevent unrealistic behaviour at the long end.

### Deriving the Forward Curve

Once you've bootstrapped the zero curve, deriving **forward rates** is straightforward — no additional bootstrapping required.

The zero curve tells you the cost to borrow from **today** until a future date. The forward curve tells you the implied cost to borrow from **future date A** to **future date B**.

**The breakeven logic:**

* If borrowing for 1 year costs 3%
* And borrowing for 2 years costs 4%
* The market implies Year 2 alone must cost \~5% to make the maths work

$$
Forward\_{1Y \rightarrow 2Y} = \frac{DF\_1}{DF\_2} - 1
$$

The result is a curve showing what the market expects interest rates to be at each future date — derived entirely from the discount factors you bootstrapped.

***

## 5. Multi-Curve Framework

Post-2008, the market moved to a multi-curve framework where:

* **Discounting curves** — Used for present value calculations (typically OIS-based)
* **Projection curves** — Used for forecasting floating rate cashflows (index-specific)

BlueGamma maintains separate curves for each purpose:

| Currency | Discounting Curve | Projection Curves      |
| -------- | ----------------- | ---------------------- |
| USD      | SOFR              | SOFR                   |
| EUR      | €STR              | 1M/3M/6M EURIBOR, €STR |
| GBP      | SONIA             | SONIA                  |
| CAD      | CORRA             | CORRA                  |

For collateralised derivatives, OIS discounting is the market standard.

***

## 6. Real Example: SOFR Curve with Live API Data

Let's walk through a complete example using real data from the BlueGamma API.

### Input: SOFR Swap Rates

<figure><img src="/files/R4KNZVG3NJAWnb8p4H1Q" alt="SOFR swap rates from BlueGamma"><figcaption><p>Live SOFR swap rates — the input to the bootstrapping process</p></figcaption></figure>

**Fetch the swap curve via API:**

```bash
curl "https://api.bluegamma.io/v1/get_swap_curve?index=SOFR" \
  -H "x-api-key: your_api_key"
```

**Current SOFR swap rates (December 2025):**

| Tenor | Swap Rate |
| ----- | --------- |
| 1M    | 3.75%     |
| 3M    | 3.71%     |
| 6M    | 3.63%     |
| 12M   | 3.47%     |
| 24M   | 3.33%     |
| 3Y    | 3.34%     |
| 5Y    | 3.45%     |
| 10Y   | 3.78%     |
| 30Y   | 4.15%     |

### Output: Discount Factors and Zero Rates

After bootstrapping, you can query the resulting discount factors and zero rates:

```bash
# Get the 1-year discount factor
curl "https://api.bluegamma.io/v1/discount_factor?index=SOFR&date=2026-12-17" \
  -H "x-api-key: your_api_key"
```

**Response:**

```json
{
  "index": "SOFR",
  "date": "2026-12-17",
  "discount_factor": 0.9659,
  "timestamp": "2025-12-17T11:08:56"
}
```

```bash
# Get the 1-year zero rate
curl "https://api.bluegamma.io/v1/zero_rate?index=SOFR&date=2026-12-17" \
  -H "x-api-key: your_api_key"
```

**Response:**

```json
{
  "index": "SOFR",
  "date": "2026-12-17",
  "zero_rate": 3.477,
  "day_count": "Actual360",
  "compounding": "Simple",
  "timestamp": "2025-12-17T11:08:56"
}
```

### Complete Bootstrapped Curve

Here's what the bootstrapping process produces for SOFR:

| Maturity      | Swap Rate (Input) | Discount Factor | Zero Rate |
| ------------- | ----------------- | --------------- | --------- |
| 1Y (Dec 2026) | 3.47%             | 0.9659          | 3.48%     |
| 2Y (Dec 2027) | 3.33%             | 0.9357          | 3.39%     |
| 3Y (Dec 2028) | 3.34%             | 0.9049          | 3.45%     |

Notice:

* The **discount factors** decrease as maturity increases (money in the future is worth less today)
* The **zero rates** are slightly higher than swap rates for upward-sloping curves
* The curve is currently inverted at the short end (1Y > 2Y), reflecting market expectations of rate cuts

{% hint style="success" %}
**Try it yourself.** Pull live SOFR discount factors and zero rates into your models today. [Get your free API key →](https://auth.bluegamma.io/sign-up)
{% endhint %}

***

## 7. Data Quality & Validation

Reliable curves require reliable inputs. We apply multiple layers of validation to ensure the data you receive is accurate and consistent.

### Automated Checks

Every time we ingest market data, we run checks before the curve is published:

| Check                 | Description                                       |
| --------------------- | ------------------------------------------------- |
| **Staleness**         | Filters out rates that haven't updated recently   |
| **Magnitude**         | Flags unusually large moves for review            |
| **Monotonicity**      | Detects unexpected inversions in the long end     |
| **Smoothness**        | Identifies abrupt jumps between adjacent tenors   |
| **Outlier detection** | Uses statistical filters to catch anomalous rates |

### Curve-Level Validation

After bootstrapping, we validate the entire curve:

| Validation                       | Description                                          |
| -------------------------------- | ---------------------------------------------------- |
| **Forward rate sanity**          | Forward rates should be positive and reasonable      |
| **Discount factor monotonicity** | Discount factors must decrease with maturity         |
| **Arbitrage-free**               | No negative forward rates where they shouldn't exist |

### Human Oversight

Automation catches most issues, but human review adds an extra layer of confidence:

* **Daily curve review** — Curves are visually inspected each day by a rotating team member
* **User feedback** — Anomalies flagged by users are investigated promptly

### Third-Party Validation

We perform daily validation against public sources where available — including central bank publications, official fixing rates, and publicly available benchmark data. This ensures our curves remain aligned with observable market references.

### Validating Against Your Sources

If you want to compare BlueGamma data against Bloomberg or other platforms, see our guide: [Validating BlueGamma API Data Against Bloomberg](/documentation/integrations/api/how-to-guides/validating-bluegamma-api-data-against-bloomberg-or-other-platforms.md).

### Reporting Issues

If you spot something unusual, reach out via live chat in the app or email <support@bluegamma.io>.

***

## 8. Output Conventions

| Convention    | OIS Curves                   | IBOR Curves             |
| ------------- | ---------------------------- | ----------------------- |
| Compounding   | Annual                       | Varies by tenor         |
| Day Count     | Act/360 (USD), Act/365 (GBP) | Index-specific          |
| Business Days | Follows market calendar      | Follows market calendar |
| Settlement    | T+2 (standard)               | T+2 (standard)          |

***

## 9. Using Curves in BlueGamma

### Get a Swap Rate

```bash
curl "https://api.bluegamma.io/v1/swap_rate?index=SOFR&start_date=2025-01-15&maturity_date=2030-01-15&fixed_leg_frequency=12M" \
  -H "x-api-key: your_api_key"
```

### Get a Forward Rate

```bash
curl "https://api.bluegamma.io/v1/forward_rate?index=SOFR&start_date=2026-06-15&end_date=2026-09-15" \
  -H "x-api-key: your_api_key"
```

**Response:**

```json
{
  "index": "SOFR",
  "start_date": "2026-06-15",
  "end_date": "2026-09-15",
  "forward_rate": 3.32
}
```

### Get a Discount Factor

```bash
curl "https://api.bluegamma.io/v1/discount_factor?index=SOFR&date=2027-12-15" \
  -H "x-api-key: your_api_key"
```

**Response:**

```json
{
  "index": "SOFR",
  "date": "2027-12-15",
  "discount_factor": 0.9358
}
```

***

## Related Documentation

* [Forward Rates](/documentation/methodology/forward-rates.md) — How forward rates are derived from curves
* [Discount Factors](/documentation/methodology/discount-factors.md) — How discount factors are calculated
* [Government Bond Curves](/documentation/methodology/government-bond-curves.md) — Treasury yield curve construction
* [Available Indices](/documentation/integrations/available-indices.md) — Full list of supported indices
* [API Reference](/documentation/integrations/api/api-reference.md) — Complete API documentation

***

## Ready to Use These Curves?

Skip the bootstrapping and get production-ready discount factors, zero rates, and forward curves directly:

| Method                                                                                 | Best For                           |
| -------------------------------------------------------------------------------------- | ---------------------------------- |
| [**Excel Add-in**](/documentation/integrations/excel-add-in/installation-and-setup.md) | Financial models, quick lookups    |
| [**API**](/documentation/integrations/api/api-reference.md)                            | Automated systems, pricing engines |
| [**Web App**](https://app.bluegamma.io)                                                | Ad-hoc downloads, team sharing     |

[**Start your 14-day free trial →**](https://auth.bluegamma.io/sign-up)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluegamma.io/documentation/methodology/how-to-bootstrap-the-yield-curve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
