> For the complete documentation index, see [llms.txt](https://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://bluegamma.io/documentation/pricers/calculating-the-mtm-of-a-swap.md).

# Swap Mark-to-Market

Value a traded swap at the live mid, see clean and dirty MtM, accrued interest and the replacement rate, and stress the curve.

The Mark-to-Market (MtM) value of a swap is the net present value of its remaining cashflows at prevailing market rates. Open any swap in the **Traded** section of My Swaps to see its valuation page.

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2FCBX0aP5NyZFbfwaEkQUK%2Fimage.png?alt=media&amp;token=a854413d-26f1-4aaf-b2b2-9cf195a817f0" alt=""><figcaption></figcaption></figure>

***

## The Headline MtM

The large figure at the top is the **dirty** MtM — the full value of the swap including interest accrued since the last payment date. It is stated in the swap's own currency, with the change versus last week underneath and the valuation timestamp on the right.

Use the copy and Excel icons next to the figure to take the value straight into a model.

***

## Valuation Outputs

| Field                        | What it means                                                                                                                            |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| **Fixed Rate**               | The rate you dealt at, from your trade confirmation, which is typically the mid rate agreed with the bank + credit and execution charges |
| **Replacement Rate**         | The current on-market / at-the-money rate for the same trade                                                                             |
| **Basis Point Value / PV01** | Change in value for a one basis point move in the curve                                                                                  |
| **Weighted Avg Life**        | Average time to repayment, weighted by notional outstanding                                                                              |
| **Clean MtM**                | Value excluding accrued interest                                                                                                         |
| **Accrued Interest**         | Interest built up since the last payment date, not yet paid                                                                              |

### Replacement Rate

The replacement rate is the **at-the-money rate** — the fixed rate at which the same swap, traded today, would have zero net present value. It is the on-market level for your remaining profile.

Comparing it against your fixed rate tells you immediately why the swap is in the money or out of it. A swap dealt at 4.48% against a replacement rate of 4.46% is slightly out of the money as a fixed-rate payer: you are paying above the current market level.

### Clean MtM and Accrued Interest

**Clean MtM** strips out interest that has accrued but not yet been paid, leaving only the value of future cashflows. It is the figure most commonly used for hedge accounting and for comparing valuations across dates, because it is not distorted by where you sit in the payment period.

The two combine into the headline figure:

$$
\text{Dirty MtM} = \text{Clean MtM} + \text{Accrued Interest}
$$

Accrued interest resets to zero on each payment date and builds up again through the period, so a clean-versus-dirty gap that widens through a period and drops at payment is expected behaviour, not a data issue.

For the full treatment, see [Swap Mark-to-Market & Accrued Interest](https://www.bluegamma.io/documentation/methodology/swap-mark-to-market).

***

## Trade Details

The left card holds the terms of the trade: bank, reference, trade date, start and end dates, first interest payment date, swap frequency, index and swap type. Fields with a pencil icon can be edited if something was entered incorrectly.

### Lookback Days

{% hint style="warning" %}
**Set this to match your confirmation.** Compounded RFR swaps almost always apply a lookback, and leaving it at 0 when the trade uses one will put the floating leg out of line with the bank's valuation.
{% endhint %}

A lookback shifts the observation period for the floating rate back by a set number of business days, so the payment amount is known before it falls due. For SONIA, a lookback of **5 business days** is common, and **2 business days** is also used. The convention is set out in your trade confirmation or loan agreement.

Enter the number of days here and the floating leg, forecast payments and MtM all reprice accordingly.

***

## Tabs

### Notional Profile

The notional outstanding in each period, as a table and a schedule chart. Click **Edit Notionals** to amend an amortising profile.

### Forecast Payments

Projected floating, fixed and net payments for every remaining period, with the next payment flagged. Toggle to **Graph**, or **Download** the schedule.

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2FyXpvGWmeN6j3CgskY9rJ%2Fimage.png?alt=media&amp;token=019f8a46-18e8-4f99-b14e-68416de31646" alt=""><figcaption></figcaption></figure>

### Swap Curve

The underlying swap curve used to value the trade.

### MTM Forecast

Projects the range of possible future MtM values using confidence bands. Adjust the intervals, switch between implied and historical volatility, and toggle to a table view. See [Forecast MtM.](https://www.bluegamma.io/documentation/pricers/calculating-the-mtm-of-a-swap/forecast-mtm)

### MTM Historical

This chart shows the historical Mark-to-Market values for this swap over the past 12 months. The MtM represents the swap's net present value at each valuation date, reflecting changes in market interest rates and other factors.

### Floating Rates

The historical and projected floating rates for the swap, plotted against your fixed rate.

***

## Curve Shock

Enter a value in **Curve shock** to stress the valuation. The par swap curve is shifted by the amount you enter, the discount and forward curves are re-bootstrapped, and every value on the page is fully repriced — this is not an approximation from PV01.

With a shock applied, the page shows the live MtM struck through alongside the shocked figure, and the change between them. Note that accrued interest does not move under a shock, since it is already realised. Click **Back to live curve** to clear it.

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2FVWfwjyBj6rwA0Pf6G4jK%2Fimage.png?alt=media&amp;token=8fd889c3-a956-470e-aa99-6d321c7faff5" alt=""><figcaption></figcaption></figure>

The curve can also be shocked across all swaps through the main page, by clicking on the three dots in the top right corner and clicking **Shock curve**.

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2FrNnH5XPH8b7NUjife3i6%2Fmy-swaps-overflow-highlighted.png?alt=media&amp;token=44fe7a72-1d67-4a41-aa7f-398a5971fa98" alt=""><figcaption></figcaption></figure>

***

## Download Pricer

**Download Pricer** exports an Excel workbook that reproduces the valuation cell by cell: period dates, day count fractions, notionals, implied forward rates, fixed rate, net cashflows, discount factors, present values and the running expected MtM, with the replacement rate, PV01 and MtM summarised alongside.

Use it to audit the calculation, hand a valuation to an auditor, or lift the schedule into your own model.

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2Ff5WgWDCQ5Mc9OPjcyQqK%2Fimage.png?alt=media&amp;token=60c6bafe-155e-4d66-8451-611799555adf" alt=""><figcaption></figcaption></figure>

***

## Managing a Swap

The buttons in the top right of the page let you:

* **Edit** the swap's terms
* **Share** the swap with a colleague
* **Mark as terminated** when the trade is closed out or unwound
* **Delete** the swap

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2Fh0n3F2wIVquDiLZWBh6L%2Fimage.png?alt=media&amp;token=d8ed0fb4-25b4-4e0d-b7f5-9100b0e285c7" alt=""><figcaption></figcaption></figure>

Also in the header: **Valuation Time** to value as at a past date rather than live, and the refresh icon to return to live pricing.

## Attaching Trade Confirmations

Every traded swap carries a confirmation status, shown next to the swap name in **My Swaps** and in the header of the swap's own page:

* **no confirmation** — nothing attached yet
* **confirmation** — a document is on file

Attaching the confirmation you received from the bank keeps the executed terms alongside the position, so anyone reviewing the book later can check the dealt rate against the source document rather than taking the recorded figure on trust.

**How to attach and replace a confirmation**

There are several ways to attach the swap confirmation.

1. On the main screen, a user can click **no confirmation** to bring up an upload window

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2F04gBAXS5pWRJrpUPGINF%2Fimage.png?alt=media&amp;token=16166ffa-0c7d-4de1-9820-70894470cb3c" alt=""><figcaption></figcaption></figure>

In order to change / re-upload a confirmation, click on the three dots next to the individual swap and click **Confirmation**

<figure><img src="https://3184259219-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmmQPefoflG1RwUnUKKBR%2Fuploads%2FSDHjLo1yMewDhenSZljS%2Fimage.png?alt=media&amp;token=2573ef90-6ce6-47b1-909a-0c1fbb60efaf" alt=""><figcaption></figcaption></figure>

***

## Related

* [Swap Pricer](https://www.bluegamma.io/documentation/pricers/calculating-a-swap-rate)
* [Forecast MtM](https://www.bluegamma.io/documentation/pricers/calculating-the-mtm-of-a-swap/forecast-mtm)
* [Swap Mark-to-Market & Accrued Interest](https://www.bluegamma.io/documentation/methodology/swap-mark-to-market)
* [How to Calculate Swap MtM in Excel](https://www.bluegamma.io/documentation/integrations/excel-add-in/how-to-guides/how-to-calculate-swap-mtm-in-excel#overview-how-swap-mtm-works)
* [Get Swap MtM by ID](https://www.bluegamma.io/documentation/integrations/excel-add-in/functions/get-swap-mtm-by-id)


---

# 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 dynamically by asking a question.

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

```
GET https://bluegamma.io/documentation/pricers/calculating-the-mtm-of-a-swap.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
