Skip to content

Instantly share code, notes, and snippets.

@mike-seger
Last active June 14, 2024 08:50
Show Gist options
  • Save mike-seger/72ba8cb3f2c61f5e599aa3b761b20fb5 to your computer and use it in GitHub Desktop.
Save mike-seger/72ba8cb3f2c61f5e599aa3b761b20fb5 to your computer and use it in GitHub Desktop.
Compound rate calculation with full shift lookback

Question 1

In the context of compound rate calculations (SARON, SOFR, ESTR, TONA),
with a calculation of "full shift lookback" (lookback with observation shift).
and an interest period including n rates (with several weights),
is it correct that the observation period should also include just n rates, disregarding their weights?

Answer 1

In the context of calculating compounded rates like SARON, SOFR, ESTR, or TONA using a "full shift lookback" methodology (lookback with observation shift), it is crucial to align the observation period with the interest period correctly. Let's break down the key concepts:

  1. Interest Period: This is the period over which the interest is being calculated. For example, a 30-day period.

  2. Observation Period: This is the period over which the daily rates are observed to calculate the compounded rate. The observation period is usually shifted back by a specified number of days (the lookback period) relative to the interest period.

  3. Full Shift Lookback: In this method, the observation period starts a specific number of days before the interest period starts and ends the same number of days before the interest period ends. This shift is typically done to provide certainty of rates for a known period before the interest calculation is finalized.

Key Points for Observation Period and Rate Inclusion:

  • Alignment of Periods: The observation period should indeed be aligned with the interest period in terms of the number of days. For example, if the interest period is 30 days, the observation period should also cover 30 days, but shifted back by the lookback period.

  • Number of Rates: The number of rates included in the calculation should correspond to the number of days in the observation period. Therefore, if the interest period includes 'n' days, the observation period should also include 'n' rates.

  • Disregarding Weights: When considering the number of rates, weights assigned to specific days or rates (which could be based on conventions like calendar adjustments or business day conventions) should not affect the count of the rates. Each day in the observation period contributes one rate, regardless of how those rates are weighted or used in the final calculation.

Practical Example:

  • Interest Period: January 1 to January 30 (30 days)
  • Lookback Period: 5 days

Observation Period:

  • Starts: December 27 (5 days before January 1)
  • Ends: January 25 (5 days before January 30)

Inclusion of Rates:

Each day from December 27 to January 25 contributes one rate. The total number of rates used in the calculation is 30, matching the number of days in the interest period.

Conclusion:

Yes, the observation period should include exactly 'n' rates if the interest period includes 'n' days, regardless of their weights. The weights applied to these rates are used in the calculation to derive the compounded rate but do not change the number of rates considered. This ensures that the calculation aligns with the intended interest period accurately.

Question 2

Ok, based on your answer there seems to still exist a possible misunderstanding of my question.
Let's look at some practical data:

Date Rate Weight
2024-04-03 1.460285 1
2024-04-02 1.456716 1
2024-03-28 1.464207 5
2024-03-27 1.458166 1
2024-03-26 1.454520 1
2024-03-25 1.454148 1
2024-03-22 1.447580 3
2024-03-21 1.691800 1
2024-03-20 1.693594 1

So for a calculation of the compounded rate with "Full Shift Lookback":
Interest period: 2024-03-27 - 2024-04-02
Lookback days: 5

Which rates would have to be considered in the calculation?

Answer 2

Let's analyze the provided data to determine which rates would be included in the calculation of the compounded rate with a "Full Shift Lookback."

Interest Period and Lookback

  • Interest Period: 2024-03-27 to 2024-04-02 (7 days)
  • Lookback Days: 5 days

Determining the Observation Period

With a lookback of 5 days, the observation period starts 5 days before the interest period begins and ends 5 days before the interest period ends.

  • Start of Observation Period: 2024-03-22 (2024-03-27 minus 5 days)
  • End of Observation Period: 2024-03-28 (2024-04-02 minus 5 days)

Extracting Relevant Rates from the Data

Here is the data filtered for the observation period:

Date Rate Weight
2024-03-28 1.464207 5
2024-03-27 1.458166 1
2024-03-26 1.454520 1
2024-03-25 1.454148 1
2024-03-22 1.447580 3

Explanation of Data Inclusion

  • 2024-03-28 is the last day of the observation period.
  • 2024-03-22 is the first day of the observation period.
  • The weights indicate how many times each rate should be considered for compounding.

Rates to Consider

The rates to consider for the compounded rate calculation, with the corresponding weights, are:

  • 2024-03-28: 1.464207 (Weight: 5)
  • 2024-03-27: 1.458166 (Weight: 1)
  • 2024-03-26: 1.454520 (Weight: 1)
  • 2024-03-25: 1.454148 (Weight: 1)
  • 2024-03-22: 1.447580 (Weight: 3)

Conclusion

The observation period for the interest period from 2024-03-27 to 2024-04-02 with a 5-day lookback should include the rates from 2024-03-22 to 2024-03-28.
The calculation of the compounded rate will use these rates, weighted according to the given weights, but each rate will count as a single observation regardless of the weight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment