The interest rate is a key input to pricing various instruments. For example, the price of an option depends on the risk free rate. The return earned holding bonds depends on the bond yield. A good model of interest rates means you can better price these interest rate derived products and have a better idea of risk.
The fiddly thing is that there is no one single interest rate. The yield that you can earn is dependent on how much time you are willing to wait. For example, you could put your money into a bank account for 1 day, you could buy a 3 month bond or even a 30 year bond. Each of these instruments will earn you a different yield.
These different time horizons with different yields are referred to as the yield curve. And this yield curve is changing over time. We can easily observe this by fetching data for US treasury yields from FRED. See the appendix for the time series used in this article. Have a look at the following chart that shows three different dates with different yield curves.
And over time, the yields have looked like this:
You can see periods of high yields and periods of low yields. You can see when investing in longer term bonds gives you a higher return and periods where investing in short term bonds gives you a higher return.
In this article, we’re going to learn how to model this yield curve over time with a factor model.
Factors
Have a close look at Figure 2, the chart showing the different yields over time. Notice how they’re all similar. They’re not all exactly the same, but they generally follow the same path. We could say that all these different yields have some common factors–they are related somehow.
The idea behind factors is that some series
These factors become extremely useful when you use the same factors to model a multivariate series:
The most common way of investigating factors when you have a multivariate time series is to use Principle Component Analysis (PCA). The idea behind PCA is to find a set of completely uncorrelated time series to act as factors and the corresponding factor loadings. The factors found by PCA are called principle components, but we will continue to use the term factors. PCA is an old, robust and well studied algorithm. If you want to learn about it I recommend you read Principal Component Analysis which is a fantastic overview.
Running a PCA over the treasury yields confirms our intuition that there are common factors. I ran a PCA over the maturities 1 year or longer. The maturities shorter than a year have missing values. We can create a cumulative scree plot showing the percentage of variance explained by the first n factors. We see that 98.33%
of the variance is explained by the first factor and 99.98%
of the variance is explained by the first 3 factors.
Using PCA, we’ve found 3 factors that explains just about 100% of 8 treasury yields. These three factors do have some intuition behind them. Take a look:
The first factor looks like the long term yield from Figure 2. All the yields appear to mostly follow the long term rate (30 year yield) with larger deviations for shorter yields. These deviations must be captured in the other two components–they explain short term deviations in yield.
The real insight comes from looking at the factor loadings. Let’s see the factor loadings plotted against the time to maturity:
The first factor loading is virtually unchanged across the terms. This means that the first factor contributes the same amount for each yield. This makes sense as we’ve discovered that it represents the long term yield and explains over 98% of all the variance across all yields.
The second factor loading peaks for the shortest yields and then declines. We can interpret this factor as the short term yield.
The third factor loading peaks for more medium term yields. We can interpret this factor as the medium term yield.
Drawback of PCA
PCA has two drawback when used in practice. The first is that PCA requires clean time-series. For the yields that we are working on, there are gaps in the data. The most notable gap is that the 20 year yields start the early 60s but the 30 year yields do not start until the late 70s. And then, the 20 year yields stop for an extended period of time around 1990. The short term yields are missing enough samples that the PCA analysis performed above excluded them completely.
The second drawback is that we will need to calculate the PCA factors and factor loadings in a rolling window style fashion. This means that from point-in-time to point-in-time, the entire history of the factors are changing and the future of the factors might not be statistically similar to their point-in-time estimate.
The next section gets around PCA entirely.
Fundamental loadings
The factor loadings shown in Figure 5 appear smooth with respect to maturity. This suggests that we could model the factor loadings (
expanding out the matrices:
Where
We solve for
This method has the advantages that (1) if there are any yields missing at time
Modelling the loadings
The paper by Diebold and Li present what they call the Nelson-Siegel yield curve 1:
The equation says that the yield
These three factor loadings look like this:
The parameter
A few facts on this model:
When the time to maturity is maximised (
The loading
The loading
The short term factor can be viewed as related to the yield curve slope; that is, the increase in yield from a short maturity to a long maturity. In fact,
The instantaneous yield depends on both the long-term and short-term factors:
Calculating factors
Now that we have functions for the factor loadings, we can take equation
We can reproduce Figure 1 and add in the fitted yield curve. The model captures the general shape of the yield curve:
Conclusion
We’ve seen that the US treasury yields across maturities contain common factors. A Principle Component Analysis (PCA) will show that 3 factors can explain nearly 100% of all the variance. We’ve created a model for the factor loadings so that these loadings are constant and known. Using these loadings, we can back out the three factors and get a pretty good model of yields.
Appendix
The following series were downloaded from FRED for the analysis in this article:
Description | FRED Code | Link |
---|---|---|
1 month yield | DGS1MO | https://fred.stlouisfed.org/series/DGS1MO |
3 month yield | DGS3MO | https://fred.stlouisfed.org/series/DGS3MO |
6 month yield | DGS6MO | https://fred.stlouisfed.org/series/DGS6MO |
1 year yield | DGS1 | https://fred.stlouisfed.org/series/DGS1 |
2 year yield | DGS2 | https://fred.stlouisfed.org/series/DGS2 |
3 year yield | DGS3 | https://fred.stlouisfed.org/series/DGS3 |
5 year yield | DGS5 | https://fred.stlouisfed.org/series/DGS5 |
7 year yield | DGS7 | https://fred.stlouisfed.org/series/DGS7 |
10 year yield | DGS10 | https://fred.stlouisfed.org/series/DGS10 |
20 year yield | DGS20 | https://fred.stlouisfed.org/series/DGS20 |
30 year yield | DGS30 | https://fred.stlouisfed.org/series/DGS30 |