22 minutes reading time (4451 words)

Carry and Roll-Down of USD Interest Rate Swaps in Excel with Bloomberg Comparison


In my previous two posts I have shown how to calculate the price and DV01 of a single interest rate swap and how to do so with a book containing thousands of swaps.

Now I turn my attention to the calculation of the Carry and Roll-Down of a single swap.

Table Of Contents 

Recommended for Deriscope starters: The Overview and Quick Guide pages.

Get a free Deriscope activation code that enables you to run the accompanied spreadsheet!

Carry and Roll-Down Definition 

The Carry and Roll-Down is defined as the total amount earned (realized + unrealized) by holding a swap up to a given point of time T called the horizon, under the assumption that the yield curve at time T has the exact same shape as it does today.

So, if today is T0, the Carry and Roll-Down CR is defined as:

CR = PV(CFinterm) + PV(T) - PV(T0)


CFinterm stands for the cash flows received between T0 and T (including T, but not T0)

PV(CFinterm) is the Present Value of the cash flows CFinterm

PV(T) is the Present Value of the swap at the horizon time T, under the assumption mentioned above

PV(T0) is the Present Value of the swap at the present time T0

The following notes apply:

Note 1

The exact definition of the cash flows CFinterm received between T0 and T depends on whether any likely amounts accrued over this interval but paid after T ought to be regarded as part of these cash flows or not. A similar consideration applies on the definition of PV(T).

If accrued - but not paid by T - amounts are considered "earned" by T, the treatment becomes akin to calculating the clean price of a bond.

Otherwise, it is like calculating the dirty price of a bond.

Both approaches have their pros and cons, although there seems to be a preference for the "clean" definition, perhaps because any accrued amounts by T are considered "earned" from an economics perspective.

Deriscope can handle both definitions.

Note 2

The Carry and Roll-Down CR is composed by two parts. The first is the PV(CFinterm) that corresponds to the realized profit by keeping the position until T and the second is the PV(T) - PV(T0) that corresponds to the unrealized profit (capital gain) due to the price appreciation of the swap position between the times T0 and T.

It is common to refer to the first part as the Carry C and the second part as the Roll-Down R of the swap.

The following diagram helps you visualize these two quantities in the case of a 7-year receiver swap with an annual frequency and a horizon time of one year.

The swap started its life about 4 months in the past so that the first coupon is paid before the horizon time.

Note 3

The above definition pertains to absolute amounts that have a direct financial interpretation. In the case of swaps though, they cannot be used in a scale invariant fashion when comparing swaps of different notionals or tenors.

Therefore, swap traders often prefer the corresponding relative Carry and Roll-Down concept produced by dividing the above absolute amount with the either spot or the forward (as of T) flat DV01 of the underlying swap.

Note 4

Nothing in the definition is linked to the swap nature of the underlying contract!

The definition may therefore apply to any conceivable financial product and the fact is that the first notion of Carry had been used in the forex world in conjunction with the so called carry trades, whereby a forex trader could make a profit by simply borrowing a currency on a low interest rate (eg JPY) against lending a currency on a high interest rate (eg USD). The trader would thus pay between T0 and T a low interest on the borrowed currency and receive a high interest on the lent currency, achieving a net income. Provided that the fx spot rate between T0 and T would not change too much, the trader would then close the position at time T without suffering any fx loss. Note, fx carry trades are not arbitrage-free trading strategies. The expected profit may or may not be realized as it depends on the assumption that the fx spot rate will remain the same.

The next major area where Carry and Roll-Down is used is the fixed income market and particularly the bond market.

The situation here is the following:

Most fixed income portfolio managers must abide to certain guidelines relating to the overall duration of their portfolios. For example, the guidelines for a certain portfolio may dictate an average duration of about 5 years. This means that as time goes by, the portfolio manager should periodically, for example every month, replace certain bonds with others having a more distant maturity date. The higher the Carry and Roll-Down for a particular bond is, the higher the realized profit from its replacement will be.

What the spot fx rate for the carry fx trade is, is the overall shape of the yield curve for the carry bond trade. Just like the fx trader hopes that the spot fx rate will not change much between T0 and T, so does the bond trader with regard to the slope and curvature of the yield curve.

For example, if the yield curve has an upward slope and is assumed to keep its shape until T, the bond's lifetime coupons at time T will be on average subject to lower discounting rates than at time T0.

The consequence is that there will be a tendency for the bond price at time T to be higher than at time T0.

This is exactly the price appreciation that a trader expects with an upward sloping curve. It represents a positive Roll-Down amount and the trading strategy that exploits this effect is known as "rolling down the yield curve". 

Deriscope Computation Method 

Deriscope calculates the Carry for any given horizon date T as the sum of the discounted values of all the cash flows occurring on or before T.

The calculation algorithm depends on whether the accrued, but not paid, amounts by T are considered "earned" and thus part of the cash flows occurring in the interval (T0, T]. Deriscope allows the user to choose one of these two treatments by means of an optional input key named Ignore Accrual that can be set by the user to either TRUE or FALSE.

In the current treatment, I will describe the case Ignore Accrual= TRUE because it is conceptually simpler and handled in an elegant way, whereby the swap is not altered and only the curves are transformed in a certain way. The detailed description of the latter will also serve as a good exercise on understanding and manipulating yield curves in general.

So, in this context the swap's NPV is calculated in the usual fashion, albeit using a special discounting yield curve that equals the original discounting curve with an extra twist that its implied discount factors for all maturities exceeding T are set to equal 0.

This technique has the advantage that all swaps in the processed portfolio are treated on the same basis without the need to inspect which cash flows occur before or after T.

The calculation of the Roll-Down applies a similar trick.

First a new discounting and forecasting yield curve is produced by "shifting" the original respective curves to the right, i.e. along the time axis, by an interval equal to T - T0.

The word "shifting" is placed in quotes because the operation is not just a crude parallel shift of the original curve.

What happens is that the produced curve implies forward discount factors that equal the time-shifted spot discount factors of the corresponding original curve.

More specifically, setting Δ = Τ - T0, the new "shifted" forecasting curve is constructed so that it implies a discount factor DFRf(T1) for any maturity T1 > T given by the formula:

DFRf(T1) = DFf(T1Δ) DFf(Δ)

where DFf(t) is the discount factor for maturity t implied by the original forecasting curve.

Further on, the "shifted" curve construction treats maturities less than T differently:

For T1 <= T the implied discount factor satisfies: DFRf(T1) = DFf(T1)

These formulas guarantee that the "shifted" forecasting curve implies forward rates beyond T that match those that would have been observed at time T if the curve then happened to be the same as today's curve.

While this transformation suffices for the forecasting curve, the discounting curve needs a further tweak. It must be further modified by dividing all its discount factors by the original discount factor as of T.

This is necessary because we want the NPV calculated with the shifted curves as of today to represent the NPV we would have observed as of T.

In effect, the final discounting curve implies a discount factor DFRd(T1) for any maturity T1 > T, which equals

DFRd(T1) = DFd(T1Δ) DFd(Δ) / DFd(T)

where DFd(t) is the discount factor for maturity t implied by the original discounting curve.

When I then use these two curves to price any swap, the produced NPV should equal the NPV that would be observed at time T if the curves then had the same shape as the one they have at T0.

The final absolute Roll-Down value is produced by subtracting from the above NPV the NPV as of T0.

Bloomberg Mathematical Formulas 

Bloomberg displays the Carry and Roll-Down implied by a given yield curve for a horizon date T, but only if T falls on the start of a swap period. Broken periods are not supported.

The output numbers are in relative quotation and calculated as follows:

Carry is calculated as the par swap rate from horizon date to maturity minus the par rate from swap start to maturity, in bps per annum.

Roll-Down is calculated as the par rate from swap start to maturity minus the par swap rate from start to (maturity minus horizon date), in bps per annum.

Below are these definitions using mathematical symbols as well as a proof for the Carry formula.

The swap is assumed to have N periods and the horizon time is set at the end of the kth period. 

Shortcomings of Bloomberg Formulas 

The Bloomberg formulas should be regarded as an approximation to the true Carry and Roll-Down on the absence of a more accurate computation, such as that of Deriscope, that implements the definitions by calculating the NPV of the involved cash flows.

The Carry formula is accurate only for par swaps. But a swap is par only at its inception. Afterwards and as the quoted market rate changes, the swap's value is not zero anymore and the above derivation breaks down.

It also breaks down for par swaps that have non-standard features, such as amortizing/accreting notionals, step up/step down rates, spread added on the Libor leg, index setting in arrears etc.

The Roll-Down formula is even worse as it tries to treat the swap observed at the future horizon time T as if it were the same with a swap observed at the present time T0 albeit having its length shortened by the interval T – T0.

This assumption suffers from the same restrictions mentioned for the Carry formula, but also fails to be valid if the horizon time T is not on one of the cash-flow times.

Discounting and Forecasting Curves 

I will be using the same market data like in my last two posts, which are Bloomberg rates as of 22 May 2019.

The first sheet - called Curves - in my workbook is dedicated in the creation of the two yield curves needed for the swap pricing.

Below are the sections allocated for the creation of the OIS-based discounting and Libor-based forecasting yield curve respectively. You may visit my previous post on the single interest rate swap for more details. 

You may visit my article on constructing a semi-dual, exogenous discounting curve for more details.


I will work with a vanilla spot par USD interest rate swap so that the comparison between the Deriscope exact results and the Bloomberg approximate results can be meaningful.

Below are the formulas that create my swap that I have dumped "CustomSwap" for easy reference. I have put them in a separate sheet called Swap.

If you are not familiar with using the wizard to generate the spreadsheet formulas that create an interest rate swap, you may visit my post about non-standard interest rate swaps. 

This is a spot par 3-year USD fixed-to-floating swap with the correct market conventions.

It is par because I have set the fixed rate in cell I9 as 2.2184, which equals my market 3-year swap rate.

The trade date is 22 May 2019 and the swap legs start accruing 2 business days later on 24 May 2019, as seen from the Start Date entry in cell D8.

The index is the 3-month USD Libor as defined by the object %USDLibor|3M in cell I8. Note the latter object includes a fixing lag of 2 business days, which means the Libor rate for the first floating payment is fixed today to the value implied by the forecasting curve. 

Price Calculation 

As explained in this post, I must supply two input curves and also set up my Model object so that there is no ambiguity as to which curve is used for discounting and forecasting.

Below is the formula that calculates the price, which equals 0 as expected due to the swap's fixed rate matching the market 3-year swap rate: 

Quick Carry & Roll Output 

The function Price used above to calculate the swap's NPV can be also used to calculate both the carry and roll-down for any given horizon.

I only need to prepare an object of type Advanced Pricing that holds my computational requests, which here are just the carry and roll.

Then I simply add that object as an additional input to the ds formula in association with the Models= key.

Below is the complete setup with the output in cell C4 this time being an object of which the contents can be seen at the taskpane on the right. 

The values I am after, are inside the objects shown in the wizard next to the keys Roll= and Carry=.

For example, if I click on the lens sign to the right of Roll=, I see the following: 

The text at the bottom is displayed because I have selected the cell containing the key Roll-Down=.

I may now use the Go button to paste in the spreadsheet the formulas that return these wizard values. The result is shown below: 

While this has been simple and straightforward, its educational content is rather poor as it doesn't show how these quantities have been calculated.

I will therefore try next to calculate the exact same values using primitive steps by relying only on discounting the relevant cash flows. 

Setting up the Discounting Curve for the Carry Calculation 

For easy comparison with the Bloomberg formulas, I choose as horizon a cash flow date.

I can see the list of my cash flow dates as explained in this post. 

Surprisingly, only the May 2022 cash flows are shown! This is because the active global valuation date in my current Excel session is 5 Mar 2022 and by default only future cash flows are displayed in the chosen procedure. The quick fix is to click on the trade date displayed on the ribbon and set it temporarily to a sufficiently early date, for example any date in 2018. Then the following cash flows appear:  

The first payment date in the #PmtDate column is 27 Aug 2019 and refers to the Libor leg payment in 3 months.

The next two payments dates are both 25 Nov 2019 and refer to the Libor and fixed leg payments in 6 months.

Although the swap starts on 24 May 2019, the cash flow date is one day after 24 Nov 2019 because the latter is a Sunday.

I will choose the 25 Nov 2019 as my horizon date so that the Carry will involve the first three cash flows corresponding to the top three rows in the above table.

Setting the horizon date to equal one of the payment dates has also the advantage that all amounts accrued prior to the horizon date are also paid on or prior to that date, which means that no partial accruals are involved, which furthermore means that the calculations will deliver the same results regardless of the setting of Ignore Accrual.

As I explained above, I will need to modify my discounting yield curve so that its implied discount factors for all dates strictly after 25 Nov 2019 equal zero.

I achieve this by the following formula: 

The new discounting yield curve with the trimmed discount factors is created in cell C8 with the formula =ds(C9:D13).

The involved Shift Curve function is evoked from the given object &USD-OIS.1 of type Yield Curve.

The optional pair Handle= CarryDiscCrv is specified for the user's convenience to easily refer to the produced object.

The crucial input here is the pair First Zero DF Date= 26/11/2019 which makes the produced curve return vanished discount factors for all dates greater than or equal to the specified date.

For verification purposes, I set up a table that shows the discount factors around the horizon date implied by the original discounting curve and the new trimmed curve side-by-side. As you see, the discount factors agree until the date of 25 Nov 2019. 

Below is the chart of the two discount curves for the first two years:  

Carry Calculation using Deriscope 

Now calculating the Carry is as simple as calculating once more the swap price, but this time using the trimmed discounting curve CarryDiscCrv.1.  

It turns out the absolute Carry equals -1,684.48 USD, which is exactly equal to the value found earlier using the Advanced Pricing model.

The relative Carry is expressed in bps and produced by dividing this number with the absolute value of the flat DV01 of either the spot swap or – according to Bloomberg's methodology - the forward swap that starts on the horizon date.

For the purpose of comparing against Bloomberg, I will use the forward swap convention.

Below are the three formulas that are used to set up the forward swap that starts on 24 Nov 2019.

It is important to set the swap's start on Sunday, 24 Nov 2019 and not on Monday, 25 Nov 2019 even though the horizon date is 25 Nov 2019 in order for the produced swap to have the exact same accrual intervals as the original swap after the horizon date!

The two formulas on the left create the fixed and floating legs by cloning the existing legs of the spot swap.

The forward swap is created as the object &FwdSwap.1 in cell H4. Again, by using the Clone function.

The next step is to calculate the flat DV01 of this forward swap with respect to the forecasting curve &USD-3M.1 by running the Price function using Add Risk= TRUE and supplying the Risk Ref= and Risk Models= as shown below: 

I may now divide the absolute Carry of -1,684.48 with the absolute value of -289.29 to get the relative Carry as -5.82 bps.  

Comparison with the Carry produced by the Bloomberg Formula 

In order to apply the Bloomberg formula for the relative Carry I need the par rate of the forward swap.

I get this number by using the Fair Rate function as shown below: 

Subtracting now the two rates, I get the final result as shown below:  

The two results agree perfectly. In fact, their difference is so small that becomes visible only if we increase the displayed precision to 14 decimal places!

Setting up the Discounting and Forecasting Curves for the Roll-Down Calculation

As I explained above, I will need to use a new discounting yield curve that is produced by shifting the original curve to the right by a 6-month interval.

I also require that the produced discount factors are further divided by the discount factor of the original curve as of the horizon date of 25 Nov 2019.

I achieve this by the following formula: 

The new discounting yield curve with the shifted/rescaled discount factors is created in cell C8 with the formula =ds(C9:D15).

The optional pair Handle= RollDiscCrv is specified for the user's convenience to easily refer to the produced object.

The crucial inputs here are:

The Shifted Start= 25/11/2019 which sets the "start date" of the shifted curve and in effect defines the shift interval.

Note the valuation date of the produced curve is still that of today (22/05/2019), which means the discount factors for the dates between today and horizon must still be specified.

This is done by the pair Last Zero DF Date= 25/11/2019 which makes the produced curve return vanished discount factors for all dates less than or equal to the specified date.

Finally, the pair DF Multiplier= 1.012151 supplies the number by which all discount factors must be multiplied. Here the entered number is simply the inverse of the discount factor as of horizon calculated in cell D3.

The new forecasting curve is set in a similar fashion, as shown below: 

The referenced object is now the forecasting curve &USD-3M.1.

Here the optional keys Last Zero DF Date= and DF Multiplier= are not needed since the produced curve is only used for calculating the forward Libor rates that depend on discount factor ratios and therefore are insensitive to any rescaling of discount factors.

For verification purposes, I set up a table that shows the discount factors around the horizon date implied by the original curves and the new curves side-by-side.

Below is the chart of the discount factors implied by the two forecasting curves for the first two years:  

From the above chart it is not apparent that these two curves are related in the sense that the orange curve implies the same forward rates as the blue curve, albeit shifted to the right.

In order to demonstrate this is the case, I create a table of the one-day forward rates implied by the two forecasting yield curves and produce the corresponding chart.

The part of the orange curve that is to the left of the horizon date looks funny because this portion is poorly defined in the context of a right-shift, but we can safely ignore it since it is irrelevant to the calculations.

The relevant part is the one after the horizon, which is clearly a right-shift of the blue curve.

Roll-Down Calculation using Deriscope 

Now calculating the Roll-Down is as simple as calculating once more the swap price, but this time using the two shifted discounting and forecasting curves &RollDiscCrv.1 and &RollForcCrv.1.  

It turns out the absolute Roll-Down equals -586.88 USD, which is exactly equal to the value found earlier using the Advanced Pricing model.

The relative Roll-Down is expressed in bps and produced by dividing this number with the absolute value of the flat DV01 as was also done with the relative Carry.

I therefore divide the absolute Roll-Down of -586.88 with the absolute value of 289.29 to get the relative Roll-Down as -2.03 bps. 

Comparison with the Roll-Down produced by the Bloomberg Formula 

In order to apply the Bloomberg formula for the relative Roll-Down I need the par rate of the shortened spot swap that matures in 2 ½ years.

I first create the shortened swap object in the same way I created the forward swap, using Clone functions as shown below. 

The entry that carries out the shortening is the pair End Date= 24/11/2021.

Then I calculate its par rate by using the Fair Rate function as shown below:  

Subtracting now the two rates, I get the final result as shown below: 

Once more, the two results agree perfectly.

Click on IntRateSwapCarryRollDown.xlsx to download the spreadsheet produced with the above steps.

Feel free to contact me if you want to share any thoughts with regard to this product or if you want to request any particular features. Contact info and social media links are available at my web site https://www.deriscope.com 

Using Bloomberg Tenor Basis Swap Spreads in Excel ...
Trading Blotter and Book Risk Management of USD In...