# Function Reference

{% hint style="info" %}
**New to the Excel Add-In?** [Install the add-in](/documentation/integrations/excel-add-in/installation-and-setup.md) to start using these formulas.
{% endhint %}

The BlueGamma Excel Add-in includes a set of powerful functions to pull **live**, **forward-looking**, and **historical** interest rate data directly into Excel.

Use these to:

* 🔁 Price swaps and hedges
* 📈 Build forward curves and discount factors
* 📊 Automate dashboards for project finance, treasury, or valuations

### 🔧 Core Interest Rate Functions

| Function                                                                                                                                                | Description                                                     | Example                                                          |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`SWAP_RATE`](/documentation/integrations/excel-add-in/functions/get-swap-rates.md)                                                                     | Get the fixed rate for a vanilla interest rate swap             | `=BlueGamma.SWAP_RATE("SOFR", "2024-01-01", "2034-01-01", "6M")` |
| [`FORWARD_RATE`](/documentation/integrations/excel-add-in/functions/get-forward-rates.md)                                                               | Return the forward rate between two dates for a given index     | `=BlueGamma.FORWARD_RATE("SONIA", "2026-06-30", "2026-09-30")`   |
| [`DISCOUNT_FACTOR`](/documentation/integrations/excel-add-in/functions/get-discount-factors.md)                                                         | Get the discount factor for a given date and rate index         | `=BlueGamma.DISCOUNT_FACTOR("EURIBOR", "2027-01-01")`            |
| [`SWAP_RATE_BY_ID`](/documentation/integrations/excel-add-in/functions/get-swap-rate-by-id.md)                                                          | Fetch the rate for a swap saved in the BlueGamma app            | `=BlueGamma.SWAP_RATE_BY_ID("swap_abc123")`                      |
| [`SWAP_MTM_BY_ID`](https://github.com/Blue-Gamma/BlueGammaUI/blob/development/bluegamma-docs/integrations/excel-add-in/functions/get-swap-mtm-by-id.md) | Fetch the mark-to-market value for a saved swap                 | `=BlueGamma.SWAP_MTM_BY_ID("swap_abc123")`                       |
| [`FIXING`](/documentation/integrations/excel-add-in/functions/get-fixing.md)                                                                            | Get the published daily fixing for a given index and date       | `BlueGamma.FIXING("SOFR", "2025-06-01")`                         |
| [`TIMESTAMP`](/documentation/integrations/excel-add-in/functions/get-timestamp.md)                                                                      | Get the most recent timestamp for a given rate family and value | `BlueGamma.TIMESTAMP("RATES", "SOFR")`                           |
| [`ZERO_RATE`](/documentation/integrations/excel-add-in/functions/get-zero-coupon-rates.md)                                                              | Fetches Zero-Coupon rates for a specified index and date.       | `=BlueGamma.ZERO_RATE("SOFR", "2026-06-30", "2025-01-01")`       |

### 🌍 FX & Macro Functions

| Function                                                                                       | Description                                                             | Example                                         |
| ---------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------- |
| [`FX`](/documentation/integrations/excel-add-in/functions/get-fx-rate.md)                      | Get the spot FX rate for a currency pair                                | `=BlueGamma.FX("EURUSD")`                       |
| [`FX_FORWARD`](/documentation/integrations/excel-add-in/functions/get-fx-forward-rate.md)      | Get the forward FX rate for a currency pair on a future date            | `=BlueGamma.FX_FORWARD("GBPUSD", "2026-01-01")` |
| [`GOV_YIELD`](/documentation/integrations/excel-add-in/functions/get-government-bond-yield.md) | Return the zero-coupon government bond yield for a country and maturity | `=BlueGamma.GOV_YIELD("US", "10Y")`             |

### 💼 Credit Spread Functions

| Function                                                                                                                                                                       | Description                                               | Example                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------- | -------------------------------------------- |
| [`CAN_BANK_SPREAD_HIST`](https://github.com/Blue-Gamma/BlueGammaUI/blob/development/bluegamma-docs/integrations/excel-add-in/functions/get-canadian-bank-spread-historical.md) | Get historical spread for Canadian bank senior debt index | `=BlueGamma.CAN_BANK_SPREAD_HIST("5Y")`      |
| [`CAN_BANK_SPREAD_FWD`](https://github.com/Blue-Gamma/BlueGammaUI/blob/development/bluegamma-docs/integrations/excel-add-in/functions/get-canadian-bank-spread-forward.md)     | Get forward spread for Canadian bank senior debt index    | `=BlueGamma.CAN_BANK_SPREAD_FWD("5Y", "1Y")` |


---

# 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/integrations/excel-add-in/functions.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.
