> 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/discount-factors.md).

# Discount Factors

How BlueGamma reads discount factors off the bootstrapped curve, with log-cubic interpolation between tenors, the link to zero rates, a worked SOFR example and the API and Excel calls.

BlueGamma's discount factor for a date is read directly off the bootstrapped discount curve for the index, interpolated log-cubically on discount factors between tenor points. With the API's default simple zero rate r on the index day count, DF = 1/(1 + r × τ). It is the present value today of one unit of currency received on that date, so a 2-year discount factor of 0.9358 values £100 in two years at £93.58 today.

Discount factors convert future cashflows to their present value. BlueGamma derives discount factors directly from our constructed curves.

***

## What Is a Discount Factor?

A discount factor represents the present value of £1 (or $1) received at a future date. It answers: "What is a future cashflow worth today?"

$$
\text{Present Value} = \text{Future Cashflow} \times \text{Discount Factor}
$$

**Example:** If the 2-year discount factor is 0.9358, then £100 received in 2 years is worth £93.58 today.

***

## The Formula

A discount factor and a zero rate describe the same point on the curve. With the simple zero rate that `/zero_rate` returns by default:

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

With an annually compounded zero rate (`compounding=Compounded`):

$$
DF\_t = \frac{1}{(1 + r\_t)^{\tau}}
$$

Where:

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

***

## Example Calculation

**Given:** SOFR discount factors and simple zero rates from the API

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

| Maturity | Date       | Zero Rate (Simple) | Discount Factor |
| -------- | ---------- | ------------------ | --------------- |
| 1Y       | 2027-10-13 | 4.4702%            | 0.9566          |
| 2Y       | 2028-10-13 | 4.7431%            | 0.9121          |

**Verify the 2-year discount factor:**

Time to maturity: 731 days, so τ = 731/360 = 2.0306

$$
DF = \frac{1}{1 + 0.047431 \times 2.0306} = \frac{1}{1.09631} = 0.9121
$$

***

## How BlueGamma Calculates Discount Factors

### 1. Bootstrapping

We start with market instruments (the index's latest fixing and swap quotes) and bootstrap a discount curve, solving for the discount factor at each tenor point.

### 2. Reading the Curve

The discount factor for a date is read directly from that bootstrapped discount curve. No separate conversion from zero rates is involved; zero rates are derived from the discount factors, not the other way round.

### 3. Interpolation

For dates between curve points, we interpolate log-cubically on discount factors to ensure smooth, no-arbitrage results (with log-linear interpolation as a fallback in rare cases where the cubic fit fails).

***

## Using Discount Factors in BlueGamma

### API

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

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

```json
{
  "index": "SOFR",
  "date": "2027-10-13",
  "valuation_time": "2026-10-13T08:36:00",
  "discount_factor": 0.9566,
  "timestamp": "2026-10-13T08:35:48"
}
```

`date` accepts a tenor such as `1Y` or a date such as `2027-10-13`. Use a date after the curve date: a date in the past returns a discount factor of 0.

### Excel Add-in

```
=BlueGamma.DISCOUNT_FACTOR("SOFR", "2027-10-13")
```

***

## Key Properties

* **Always positive** — Discount factors are always > 0
* **Decrease with time** — Longer maturities have lower discount factors (assuming positive rates)
* **DF at t=0 is 1** — Today's value of £1 today is £1
* **Related to zero rates** — DF and zero rates are mathematically equivalent representations

***

## Discount Factors vs Zero Rates

Both represent the same information in different forms:

| Representation  | Formula (simple, API default) | Use Case                      |
| --------------- | ----------------------------- | ----------------------------- |
| Discount Factor | DF = 1/(1 + r × τ)            | Direct PV calculations        |
| Zero Rate       | r = (1/DF − 1)/τ              | Comparing rates across tenors |

BlueGamma provides both via the API and Excel Add-in. For the other compounding conventions and a worked comparison table, see [Zero Rates](https://www.bluegamma.io/documentation/methodology/zero-rates.md).

***

## Related Documentation

* [Interest Rate Curves](https://www.bluegamma.io/documentation/methodology/how-to-bootstrap-the-yield-curve.md) — How curves are constructed
* [Zero Rates](https://www.bluegamma.io/documentation/methodology/zero-rates.md) — Zero rates and discount factors are equivalent representations
* [Forward Rates](https://www.bluegamma.io/documentation/methodology/forward-rates.md) — How forward rates are calculated
* [Government Bond Curves](https://www.bluegamma.io/documentation/methodology/government-bond-curves.md) — Treasury yield curve construction
* [How to Calculate Discount Factors Using Government Bond Yields](https://www.bluegamma.io/documentation/integrations/excel-add-in/how-to-guides/how-to-calculate-discount-factors-in-excel.md) — Excel guide for Treasury-based discounting
* [API Reference](https://www.bluegamma.io/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/discount-factors.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.
