ImpYC Shifted

ImpYC Shifted is a
direct subtype of ImpYC with functions ImpYC Shifted Functions, keys ImpYC Shifted keys and example object ImpYCShifted that represents the input data required to build a yield curve of which the forward discount factors relative to a given horizon time are produced by parallelly shifting the discount factors of a given source curve.
Technically, the mentioned curve is created by feeding an object of this type as value next to the key
Market Data in the formula that creates the Yield Curve object.

First assume for notational simplicity that the time 0 corresponds to the trade date, which normally is today.
Then consider a time interval Δ that implies a horizon time point that equals Δ and can be either positive (meaning a shift to the right) or negative (meaning a shift to the left.
Case 1: Δ >= 0
Here the shifted curve is constructed in such a way that it implies forward discount factors relative to the time point Δ that equal the spot discount factors of the source curve relative to properly shifted maturities.
Before setting out the exact mathematical definition, the point here is to build a yield curve of which the curve of implied forward discount factors has the exact same shape as that of the source curve, albeit parallel shifted on the time axis by Δ
The reference date of the returned curve, i.e. the date for which the discount factor equals 1, is still the same as that of the source curve.

More formally, assume that the source curve implies the discount factor P(T), for any maturity T, T >= 0, so that P(0) = 1 where 0 corresponds to the trade date.
Then the shifted curve will imply - for the same maturity T - the discount factor P'(T), defined as follows:
If T <= Δ then P'(T) = P(T), since this is the most natural assumption on the absence of other information.
If T > Δ then P'(T) = P(T-Δ)P(Δ), which - since P(|Δ|) can be substituted with P'(Δ) - is equivalent to P'(T)/P'(Δ) = P(T-Δ)

The last formula states that the shifted curve implies a forward discount factor from Δ to T that is equal to the discount factor P(T-Δ) of the spot curve.
In other words, if one were to plot all forward discount factors that start at the fixed time Δ as a function of the variable spanned interval u = T-Δ, the resulting curve would be identical with that of the discount factors of the spot curve as a function of the maturity u
Case 2: Δ < 0
Here the shifted curve is constructed in such a way that it implies spot discount factors that equal the forward discount factors of the source curve relative to the time point and properly shifted maturities.
It must hold that T >= -Δ and the definition is
P'(T) = P(T-Δ)/P(-Δ), which satisfies P'(0) = 1

The shifted curve to the right (i.e. with positive Δ) is very useful when one wants to calculate the roll value of a given financial product for a given roll horizon, which is defined as the value the product would have on the roll horizon date under the assumption that the yield curves would then look as they look today.
Rather than changing the trade date to make it equal to the roll date, regenerate all yield curves and reprice the product wrt the new trade date, one may keep the same trade date and reprice the product with the shifted curves, provided all intermediate cash flows have been trimmed away.
The thus produced price needs to be divided with the discount factor P(|Δ|) as of the roll date Δ.
This latter approach can often be more efficient, since the full construction of the involved yield curves is avoided.

The construction of the shifted curve provides a few switches that modify the produced curve so that it can be immediately used in the calculation of the carry & roll of a financial product.
For example, one may supply a numerical constant that acts as a multiplier on the shifted discount factors.
Typically in the roll calculation, this muliplier has to equal 1/P(Δ), so that the finally produced discount factor P'(T) will equal P(T-Δ)P(Δ)[1/P(Δ)] = P(T-Δ), which results in a proper right shift of the original spot curve.
One may also demand that all discount factors prior a certain date - typically the roll horizon date - are set to 0.
Such a modified shifted curve could then be used as the discounting curve in the pricing of a financial product with the ensuing price being identified as the roll value of the product as of the roll horizon date.
When one uses this modified shifted curve, there is no need to divide the produced price with the discount factor P(|Δ|) as of the roll date Δ, since the applied multiplier has the equivalent effect already.
Also due to the fact that all discount factors prior to the roll date have been forced to 0, there would be no need to trim the cash flows occurring before the roll date.
Note that any other curves - beyond the discounting curve - should be also shifted in order to produce forecasted rates consistent with the roll assumption, but they should not be further modified so that even rates fixed before the roll date can be estimated in a reasonable fashion.

The carry calculation is simpler because it does not necessitate the shift of the original discount factors.
It only needs the application of a further switch that sets all discount factors with maturity after the carry horizon date to zero.