## Rolldown

Function Rolldown within
Bond with keys Bond Rolldown keys returns the rolldown(s) RD of the referenced bond(s) between the bond settlement date and a horizon date , with Tˢ < Tʰ and a given discount curve CRV.
is the bond settlement date as implied by a trade transaction assumed to occur on the

Here the rolldown RD is defined like in Bloomberg, as follows:
RD is the portion of the potential return from a trade that is attributed to the capital gains/losses on the positions if the reference curve remains unchanged and the trade ages until the horizon date, resulting in a mark to market at a different yield.
In general, positive rolldown indicates an attractive trade.

Formally:
RD = yˢ - yʰ
where
is the bond's spot yield calculated as of the settlement date based on a supplied
Yield Curve bootstrapped out of market prices of bonds of the same credit quality as the caller bond.
is the bond's rolled yield calculated as of the horizon date based on the assumption that the discount curve at will have the same shape relative to its start at as the spot curve does relative to the valuation date.

There exist two different methods for calculating the rolled yield that can be selected through the optional key
Definition

bond-carryroll.xlsx that demonstrates both methods described here.

One method corresponds to the key
Definition set to Shorten Spot
It corresponds to how Bloomberg calculates the yield and works as follows:
The initial discount curve is retained, but the bond is modified by forcing it to mature at the earlier time Tˢʰ = Tᵐ - Δʰ, where Δʰ = Tʰ - Tˢ

The second method is the default and corresponds to the key
Definition set to Roll Crv to Hor, whereby the bond keeps its original maturity Tᵐ and the yield is calculated by using a new shifted discount curve produced by shifting the initial discount curve to the right so that it starts at , similar to what is done by the function Roll Curve
The fact that there is usually a non-trivial settlement period associated with the bond, the exact process is more complicated due to the following problem.
Both the yield and clean price calculations off a given yield curve discount all cash flows CF(t) down to the bond's settlement date using forward discount factors FwdDF(Tˢ -> t) = DF(t)/DF(Tˢ)
Because often Tˢ > T₀ applying the function
Roll Curve on the initial discount curve will not work.
The solution is to work with a converted bond that has the same cash flows as the referenced bond but zero settlement days.
The exact algorithmic steps are as below.

STEP 1: Create CRV1
Consider the package consisting of that converted bond together with a special curve CRV1 with discount function DF1(t) equal to FwdDF(Tˢ -> t) = DF(t)/DF(Tˢ)
This package is equivalent with the original pakage of the original bond and curve in what concerns the calculation of the dirty price (but not the clean price or yield!).
The curve CRV1 can be easily created by applying the function
Shift Curve on the given curve CRV using as input only the DF Multiplier = 1/DF(Tˢ) and not the Shift so that only scaling is applied on CRV without parallel transfer along the time axis.

STEP 2: Create CRV2
If it were not for the settlement complexity, the rolled dirty price of the converted bond could be now easily calculated in the usual way by applying the
Price function with a curve produced by rolling CRV1 to the right by a time inteval equal to the difference Tʰ - Tˢ, effected through application of the function Roll Curve on CRV1
Unfortunately the function Roll Curve works only when Tˢ = T₀ => the about to be shifted portion of CRV1 must be first shifted left by Tˢ - T₀ before being shifted right to Hor.
Therefore an intermediate curve CRV2 must be first created by shifting CRV1 to the left by Tˢ - T₀
The curve CRV2 can be easily created by applying the function Shift Curve on the curve CRV1 using the input
Shift = T₀ - Tˢ
Note the Shift value T₀ - Tˢ is negative as it should for a leftwards shift.

STEP 3: Create CRV3
Create the curve CRV3 by rolling CRV2 to the right until in the usual way by applying the function
Roll Curve on the curve CRV2 using the input Horizon Date =

STEP 4: Create the corresponding zero settled bond

STEP 5: Calculate the rolled dirty price at
Do so by discounting the zero settled bond using CRV3

STEP 6: Calculate the corresponding clean price from the above dirty price

STEP 7: Calculate the corresponding yield from the above clean price