# Calculating the short rate from the discount curve

I'm currently looking at some code that implements the Hull-White model. As one of the inputs, the code accepts a table of discount factors at various dates.

Time in Years Discount Factor
0 1
0.003 0.9998843333803
0.083 0.9968031327369
0.167 0.9935687092306
... ...

One step of the program is to compute an initial short rate $$r$$. I decided that, in the absence of sophisticated smoothing techniques, the best estimate of $$r$$ is

$$r = - \frac{\ln(0.9998843333803)}{0.003}\text{.}\tag{1}$$

However, the person that wrote the code before me does something very different. They first calculate the yield at times $$t=0.003$$ and $$t=0.083$$:

$$\text{Yield}(.003) = \frac{1.0 - 0.9998843333803}{.003 \cdot 0.9998843333803}\tag{2}$$ and $$\text{Yield}(0.083) = \frac{1.0 - 0.9968031327369}{0.083 \cdot 0.9968031327369}\text{.}\tag{3}$$

The program author then uses linear interpolation to compute the short rate $$r$$:

$$r = \frac{\text{Yield}(0.083) - \text{Yield}(.003)}{0.083 - .003} (0 - .003) + \text{Yield}(.003)\text{.}\tag{4}$$

This value is close to estimate (1).

I need to reverse engineer the decision making process the original programmer had when writing his code. I have a few questions about this:

1. Is the estimate in display (1) a good estimate of the short rate?
2. Is the estimate in display (4) a good estimate of the short rate? It seems to me that they "extrapolated the Yields to get an approximation of the 'yield at time 0'". I'm not sure why that should be the short rate in the Black-Scholes/HW setting.
3. What reasons would an author have to choose linear interpolation over the method in display (1)?
• It looks like a matter of continuous vs discrete compounding. With discrete compounding the return on a zero coupon bond is $\frac{1-P}{P}$, with continuous compounding the return is $-\ln{P}$. You divide by the time to maturity (in years) to get the yearly yield. I believe it makes sense to use interpolations for points within the grid (e.g. 0.005), but don't think that the rate at time 0 should be linearly extrapolated from the rate between 0.003 and 0.0083. So I think that (1) is a better estimate of the current short rate. Jul 7 at 9:04
• Ps: I think you MAY have a leading „9“ missing second discount factor. Is that possible? As of now, you have a rate of 38.5% for the second pillar? Or your second date should be 0.083333 (1 month?) instead of 0.0083 Jul 7 at 10:27

For simplicity, let's say that your time $$0.003$$ equals 1 day, and your second pillar (probably $$0.083$$ instead of $$0.00833$$) equals 1 week.

What you do: Approximate the short rate with the 1-day interest rate.

What they do: Employ additional information about the shape of the yield curve at the short end, i.e. extrapolating from the first two available pillars, i.e. 1d and 1w, down to the short rate node. NB: They identify the short rate with an interpolation on yields as in mmencke's comment.

For most practical situations, there should not be too much of a difference there, as you have observed. The question then is whether you trust the shape information of the short end for the instantaneous spot rate. Personally, I'd run with the 1-day-pillar as in your equation (1).

• Can you add more information about why (4) is correct? It seems to me that they "extrapolated the Yields to get an approximation of the 'yield at time 0'". I'm not sure why that should be the short rate in the Black-Scholes/HW setting. Jul 7 at 17:59
• It is the short rate because it pertains to the „instantaneous“ pillar. Jul 7 at 18:02

I think that your approach is exact.

Let the market prices $$P^M(0,T)$$ of zero bonds be given for some maturities $$T_1,...,T_m$$. Let $$P^M(0,T_0)=1$$ for $$T_0=0$$. The market prices of zero bonds should be calculate for $$t \in [T_i,T_{i+1}]$$ and $$0 \leq i \leq m$$ using log linear interpolation $$ln P^M(0,t)=lnP^M(0,T_i)+\frac{t-T_i}{T_{i+1}-T_i}*(lnP^M(0,T_{i+1})-lnP^M(0,T_i))$$ We calculate the instantenous forward rate $$f^M(0,t)$$ as the left-sided derivative as follows $$f^M(0,t)=-\lim_{\Delta\to 0} \frac{lnP^M(0,t+\Delta)-ln P^M(0, t)}{\Delta}$$ Then using our interpolation function we obtain: $$f^M(0,t)=- \frac{lnP^M(0,T_{i+1})-ln P^M(0, T_i)}{T_{i+1}-T_i}$$ substituting what we have from data we get $$f^M(0,0)=- \frac{lnP^M(0,0.003)-ln P^M(0, 0)}{0.003}$$ $$f^M(0,0)=- \frac{lnP^M(0,0.003)}{0.003}=r(0)$$

because we know that $$f^M(0,0)=r(0)$$

Reference: Vladimir Ostrovski, Efficient and Exact Simulation of the Hull-White Model