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:
- Is the estimate in display (1) a good estimate of the short rate?
- 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.
- What reasons would an author have to choose linear interpolation over the method in display (1)?