> For the complete documentation index, see [llms.txt](https://www.bluegamma.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.bluegamma.io/documentation/methodology/zero-rates.md).

# Zero Rates

How BlueGamma derives zero-coupon rates from bootstrapped discount factors, with the day count and compounding convention for each index and a worked SOFR example.

BlueGamma's zero rate for a date is derived from the bootstrapped discount factor at that date. By default it is quoted with simple compounding on the index's day count, r = (1/DF − 1)/τ, where τ is the year fraction from the curve date (Actual/360 for SOFR and EURIBOR, Actual/365 for SONIA). Annual and continuous compounding are available through the `compounding` parameter. Government bond zero yields are quoted semi-annually compounded on Actual/Actual. Zero rates are not quoted in the market; BlueGamma bootstraps them from observable par swap rates.

Zero-coupon rates (or "zero rates") represent the yield on a hypothetical bond that pays no coupons — just a single payment at maturity. They are the foundation for all other rate calculations.

***

## What Is a Zero Rate?

A zero rate is the interest rate earned on an investment that:

* Has no intermediate cashflows (no coupons)
* Pays a single lump sum at maturity
* Is held from today until the maturity date

Zero rates are also called **spot rates** because they represent the rate available "on the spot" for a given maturity.

***

## Why Zero Rates Matter

Zero rates are fundamental because:

1. **They map one-to-one to discount factors**: DF = 1/(1 + r × τ) for a simple rate
2. **Forward rates are calculated from them** — Using no-arbitrage relationships
3. **They enable apples-to-apples comparison** — Unlike par rates, zero rates can be directly compared across tenors
4. **They're used for valuation** — PV calculations require zero rates, not par swap rates

***

## Zero Rates vs Par Swap Rates

|                          | Zero Rate                    | Par Swap Rate                      |
| ------------------------ | ---------------------------- | ---------------------------------- |
| **Definition**           | Yield on a zero-coupon bond  | Fixed rate that makes swap NPV = 0 |
| **Coupons**              | None                         | Periodic payments                  |
| **Directly observable?** | No (derived)                 | Yes (quoted in market)             |
| **Use case**             | Discounting, PV calculations | Swap pricing, hedging              |

BlueGamma bootstraps zero rates from observable par swap rates.

***

## The Formula

BlueGamma reads the discount factor off the bootstrapped curve and converts it to a zero rate. By default (simple compounding, the API default):

$$
r\_t = \frac{1}{\tau} \left( \frac{1}{DF\_t} - 1 \right)
$$

Or equivalently:

$$
DF\_t = \frac{1}{1 + r\_t \times \tau}
$$

With annual compounding (`compounding=Compounded`, which compounds annually unless you set `compounding_frequency`):

$$
r\_t = \left( \frac{1}{DF\_t} \right)^{\frac{1}{\tau}} - 1
$$

With continuous compounding (`compounding=Continuous`):

$$
r\_t = \frac{1}{\tau} \ln \left( \frac{1}{DF\_t} \right)
$$

Where:

* **r** = Zero rate for maturity t
* **DF** = Discount factor for maturity t
* **τ** = Year fraction from the curve date to maturity, on the index's day count (for SOFR, days/360)

All three describe the same discount factor. Simple rates sit above annually compounded rates for maturities beyond one year, and the gap widens with maturity, so always compare zero rates on the same convention.

***

## Using Zero Rates in BlueGamma

### API

```bash
curl "https://api.bluegamma.io/v1/zero_rate?index=SOFR&date=2031-10-14" \
  -H "x-api-key: your_api_key"
```

**Example output (13 Oct 2026):**

```json
{
  "index": "SOFR",
  "date": "2031-10-14",
  "valuation_time": "2026-10-13T08:36:00",
  "zero_rate": 5.1596,
  "day_count": "Actual360",
  "compounding": "Simple",
  "timestamp": "2026-10-13T08:35:48"
}
```

Set the `compounding` parameter to `Compounded` or `Continuous` to change the convention, and `day_count` to quote on a different day count.

### Excel Add-in

```
=BlueGamma.ZERO_RATE("SOFR", "2031-10-14")
=BlueGamma.ZERO_RATE("SOFR", "2031-10-14", "", "Compounded")
```

The fourth argument sets the compounding (Simple, Compounded or Continuous); the third is an optional valuation date.

***

## Zero Curve vs Discount Curve

The zero curve and discount curve contain the same information in different forms. The table below shows SOFR discount factors from `/discount_factors` and zero rates from `/zero_rates`, all read from one curve.

**Example output (13 Oct 2026):**

| Maturity         | Discount Factor | Zero Rate (Simple, default) | Zero Rate (`compounding=Compounded`) |
| ---------------- | --------------- | --------------------------- | ------------------------------------ |
| 1Y (2027-10-13)  | 0.9566          | 4.47%                       | 4.47%                                |
| 2Y (2028-10-13)  | 0.9121          | 4.74%                       | 4.63%                                |
| 3Y (2029-10-15)  | 0.8699          | 4.90%                       | 4.67%                                |
| 5Y (2031-10-14)  | 0.7925          | 5.16%                       | 4.69%                                |
| 7Y (2033-10-13)  | 0.7203          | 5.47%                       | 4.73%                                |
| 10Y (2036-10-14) | 0.6205          | 6.03%                       | 4.81%                                |

You can convert between them (τ on Actual/360 for SOFR):

* **Zero → DF (simple):** `DF = 1 / (1 + r × τ)`
* **DF → Zero (simple):** `r = (1/DF - 1) / τ`
* **DF → Zero (annual):** `r = (1/DF)^(1/τ) - 1`

For example, the 5Y point is 1,827 days away, so τ = 1827/360 = 5.075 and (1/0.7925 − 1)/5.075 = 5.16%.

***

## Compounding Conventions

BlueGamma zero rates use the following conventions:

| Index Type       | Day Count     | Compounding |
| ---------------- | ------------- | ----------- |
| SOFR             | Actual/360    | Simple      |
| SONIA            | Actual/365    | Simple      |
| EURIBOR          | Actual/360    | Simple      |
| Government Bonds | Actual/Actual | Semi-annual |

{% hint style="info" %}
**Note:** The compounding convention affects how you convert between zero rates and discount factors. Always check the convention when comparing rates from different sources. On `/zero_rate`, set `compounding` to `Compounded` or `Continuous` to override the simple default.
{% endhint %}

***

## Related Documentation

* [Interest Rate Curves](/documentation/methodology/how-to-bootstrap-the-yield-curve.md) — How curves are constructed
* [Discount Factors](/documentation/methodology/discount-factors.md) — Converting zero rates to discount factors
* [Forward Rates](/documentation/methodology/forward-rates.md) — Deriving forward rates from zero rates
* [API Reference](/documentation/integrations/api/api-reference.md) — Complete API documentation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.bluegamma.io/documentation/methodology/zero-rates.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
