PART XIII · Chapter 103 · 587 / 660

Lesson 587. Cash returns and excess returns: recomputing the Sharpe ratio with the 3-month Treasury rate

Chapter 103. Transaction Cost Models, Fill Assumptions & Excess-Return Sharpe

A rule that switches between holding and cash spends a fair part of the period in cash. If the backtest sets the return on that cash to 0, nothing changes in years when interest rates were near 0, but the result changes in years when 3-month Treasury bills paid 5% a year. The same goes for the Sharpe ratio. The definitions in Lesson 478 and Lesson 660 say to subtract the risk-free return of the same frequency, but many backtests subtract 0.

In this lab we store DTB3, the public 3-month Treasury bill rate, turn it into a cash return for each period, and compute the Sharpe ratio of the same synthetic rule returns in five ways. A stretch when rates were near 0 is placed next to a stretch when they were around 5%. Types of cash products were covered in Lesson 431, and handling Treasury yield data in Lesson 229.

The rule returns are synthetic data made with a fixed seed; the only numbers with real dates are the interest rates. The synthetic returns are referred to only by period number, and the cash returns of the two rate stretches are paired with them in order. The synthetic returns have nothing to do with the market on those dates.

1. DTB3 is a discount rate, so it is not used as it is

DTB3 is the St. Louis Fed FRED series that carries the 3-month Treasury bill secondary market rate published in the Federal Reserve's H.15 release. H.15 states that this rate is on a discount basis and treats a year as 360 days. The US Treasury's daily Treasury bill rates also define the discount rate using the face value, the discount and 360 days, and the coupon equivalent (investment yield) using the price actually paid and 365 days.

Joining the two definitions gives a conversion formula. With t the days remaining and d the discount rate, the price per 100 of face value is 100 × (1 − d × t ÷ 360). Buying at this price and receiving 100 at maturity, the investment yield is (100 − price) ÷ price × 365 ÷ t, which simplifies to 365 × d ÷ (360 − d × t). A 3-month bill is a 13-week bill, so t = 91 days.

For example, on October 23, 2026 DTB3 was 4.04%. Put into the formula, the investment yield is 4.14%, and the coupon equivalent of the 13-week bill published by the Treasury that day is also 4.14%. Applying the same formula to all 209 days published by the Treasury in 2026, 203 days matched to two decimal places, and the largest difference was 0.0066 percentage points.

The 6 days that did not match are all days when the formula's value sat on a rounding boundary. On June 18, a discount rate of 3.67% gives 3.7558%, which rounds to 3.76%, but the published value is 3.75%. The published discount rate is also rounded, so if the discount rate before rounding was close to 3.665%, the formula also gives 3.75%. On all 6 days the formula's value was slightly above the published value, which can happen if the actual days remaining on the bill used that day were fewer than 91.

2. Turning an annual rate into a period return

The investment yield is the share received over one year. To put it in the same table as daily rule returns, it must be split into daily amounts. This lesson multiplies the investment yield confirmed on the previous day by the number of calendar days that have passed and divides by 365.

This is an example from the stored data, not an assumption. The DTB3 of 5.24% on Friday, January 5, 2024 is an investment yield of 5.38%. The next day with a value is Monday, January 8, and that day receives 3 days' worth, including the weekend, 0.0443%. One weekday's worth is the 0.0148% of January 5, computed from the January 4 value.

Using the previous day's value is the same convention as shifting by one period in Lesson 583. A day's rate is fixed only when that day's market closes, so the interest earned at that rate is attached from the next period. The FRED file has days with no value, such as holidays; those days are skipped, and the next day with a value receives interest for the calendar days that have passed.

There is also a simpler method that divides the annual rate by 252. The yearly total is similar, but it spreads the interest of days that cross a weekend evenly over other days. Whichever method you use, what to avoid is mixing units. Subtracting an annual 5% directly from daily returns subtracts 5 percentage points a day.

3. Placing the same synthetic rule in two rate stretches

The rule is the same hypothetical teaching rule as in Lesson 583. If the close is above the 20-period moving average, it holds the synthetic asset for the next period; otherwise it stays in cash. Cash periods are assumed to earn the 3-month Treasury bill rate.

The synthetic asset's returns are synthetic data made with a fixed seed. Each period is an independent draw from a normal distribution with a mean of 0.0003 and a standard deviation of 0.011. Read as daily data, that is an annual arithmetic mean of about 7.6% and volatility of about 17.5%. The mean was deliberately set above 0 so that the effect of subtracting the rate shows; this is a setting of the example, not a property of any market. The seeds were fixed before writing the lesson, 20 seeds starting from 20261107, and every rule number below is a median or range over the 20 seeds.

The rate stretches are 2013-2014 and 2023-2024. Each has 500 DTB3 observations, and the average DTB3 is 0.04% and 5.02%. The two stretches were deliberately chosen, by looking only at the rates and not at any results, because their rate levels differ widely. The first 20 periods of the synthetic returns are used to build the moving average, and the cash returns of the two stretches were attached in order to the next 500 periods.

Month-end values of the 3-month Treasury bill rate DTB3 from January 2008 to October 2026, drawn as two lines: the discount rate, and the investment yield converted with 365 × d ÷ (360 − d × 91). In 2013-2014 both lines sit at 0%; in 2023-2024 they are around 5%, with the investment yield slightly above the discount rate. Markers show the start of each of the two stretches.

The share of the 500 periods the rule spent in cash ranged over 36-65% depending on the seed, with a median of 51%. Chaining each stretch's cash returns from start to end gives 0.09% over two years for the low-rate stretch and 10.88% for the high-rate stretch. The rule spent about half of the time in cash, so in the high-rate stretch the cash part enters the result in a big way.

4. Computing the Sharpe ratio five ways

The Sharpe ratio was annualized on the basis of 252 daily returns. The five calculations differ only in whether interest was attached to cash periods and what was subtracted as the risk-free return. The Sharpe ratios in the table are medians over the 20 seeds.

Calculation (high-rate stretch) Return in cash periods Risk-free return subtracted Sharpe ratio (median)
First calculation 0 0 0.31
Second calculation Bill interest 0 0.55
Third calculation Bill interest That period's cash return 0.11
Fourth calculation 0 That period's cash return −0.13
Fifth calculation Bill interest The annual rate as it is −97.85

Six bars of the annualized Sharpe ratio of the same synthetic rule returns, as medians over 20 synthetic-data seeds. In the low-rate stretch, cash 0 with rate 0 and cash interest with rate subtracted are both 0.31. In the high-rate stretch, cash 0 with rate 0 is 0.31, cash interest with rate 0 is 0.55, cash interest with rate subtracted is 0.11, and cash 0 with rate subtracted is −0.13.

The calculation that fits the definition is the third. In holding periods it subtracts that period's cash return from the synthetic asset's return, and in cash periods the interest received equals the interest subtracted, so the excess return is 0. Taking the difference between two calculations for each seed and looking at the median, the third calculation is 0.21 lower than the first. The second counts bill interest as if it were the rule's performance and is 0.21 higher than the first, and the fourth subtracts the risk-free return without receiving the interest and is 0.21 lower than even the third. The fifth calculation is the result of mixing units, so the number itself has no meaning.

In the low-rate stretch, the medians of the first through fourth calculations are all 0.31. The average rate is 0.04%, so in no seed do the four calculations differ by 0.01 or more. This gap appears when the habit of setting the risk-free rate to 0, formed on backtests built from low-rate data, carries over to high-rate results. For comparison, holding the synthetic asset throughout in the high-rate stretch has a median of 0.07 before subtracting the rate and −0.22 after.

Looking at only one seed, it is easy to misread this table. Seed 20261107, chosen as the first seed before writing the lesson, had a first calculation of 1.40, the highest of the 20, and the lowest seed was −1.43. Had the table been made from the first seed alone, a number 1.09 above the median would have gone into the table, and the same rule would have looked much better. A Sharpe ratio over 500 periods swings this much; Lesson 589 shows how to measure the size of that swing.

What this lesson looks at is not the size of the Sharpe ratio but the differences between the calculation methods, and those differences moved less with the seed. Across the 20 seeds, the third calculation in the high-rate stretch was 0.17-0.26 lower than the first, and the second calculation was 0.15-0.32 higher than the first. The fourth calculation was 0.15-0.32 lower than the third. The direction never changed, whatever the seed.

5. What to write in the cash and risk-free rate box

In the backtest record, keep cash and the risk-free rate in one box and write the following.

  • The rate series and its download date (for example, DTB3 from FRED, Federal Reserve H.15)
  • The formula and day counts used to turn the discount rate into an investment yield (91 days, 360 days, 365 days)
  • How the rate was split into period returns (previous day's value × calendar days ÷ 365, or ÷ 252) and how days with no value were handled
  • Whether interest was attached to cash periods
  • The risk-free return subtracted in the Sharpe ratio (same period, same frequency) and the annualization frequency

When comparing several rules, compute them all with the same rate data and the same handling. If only one side receives cash interest, or only one side subtracts the risk-free return, the comparison tilts more the higher the rate level in the stretch. This calculation demonstrates the backtesting procedure.

The record for this lesson is the cash and risk-free rate box and a table of Sharpe ratios by calculation method. Keep, side by side, the two calculations on the same returns that subtract a risk-free rate of 0 and the actual rate, and write their difference together with the average rate of that stretch. If you ran synthetic data with several seeds, write the median and range, not the value of one seed.

Try it yourself

  1. Turn the DTB3 of 4.04% on October 23, 2026 into an investment yield, and compute the cash return attached on October 26 (Monday), the next day with a value.
  2. What is one day's worth of the investment yield from question 1 divided by 252? Write in one sentence how it differs from the Monday value in question 1.
  3. Compute the difference between the medians of the second and third calculations in the high-rate stretch from the table, and write what the second calculation left out.
  4. Read the range over the 20 seeds of the difference between the third and first calculations in the high-rate stretch. Does the direction of the conclusion change with the seed?

Answers

First, 365 × 0.0404 ÷ (360 − 0.0404 × 91) gives an investment yield of about 4.14%. From Friday, October 23 to Monday, October 26 is 3 days, so the cash return in the stored table is 0.0340%.

Second, 4.14% ÷ 252 is about 0.0164%. Dividing by 252 attaches the same interest on every trading day, while dividing by calendar days attaches 0.0340% on Monday, including the weekend, and only one day's worth on other weekdays. The yearly totals are similar, so either way, choose one method and write it down.

Third, 0.55 − 0.11 = 0.44. Taking the difference for each seed first and then the median gives a slightly different 0.42, because the difference of medians and the median of differences are not the same value. The second calculation put the interest of cash periods into the return but did not subtract the risk-free return, so it counted bill interest as if it were the rule's performance.

Fourth, the third calculation was 0.17-0.26 lower than the first, and it was lower in all 20 seeds. The size varied with the seed but the direction was the same, so this difference comes from how the rate was handled rather than from the seed.

Data: the 3-month Treasury bill secondary market rate DTB3 (Federal Reserve H.15, discount basis) from St. Louis Fed FRED, downloaded on 2026-11-03, values for 2000-01-03 to 2026-10-29. The conversion formula was checked against the US Treasury daily Treasury bill discount rates and coupon equivalents (2026) and the notation of the Federal Reserve H.15 release page. The rule returns are synthetic data made with fixed seeds 20261107-20261126 (20 seeds, fixed before writing the lesson). They come from a normal distribution with a period mean of 0.0003 and standard deviation of 0.011, and the rule numbers in the text are medians and ranges over the 20 seeds.

Related lessons