# Principal Component Analysis of yield curve change

Following pictures are the Principal Component Analysis for the yield curve change from

https://www.coursera.org/learn/interest-rate-models/lecture/ZHMM6/principal-component-analysis

And we can see John Hull's book Options, Futures and Other Derivatives 9th page 514. It's totally converse to the above statement. It knows the loading of each factor and maturity first, then use the variance of factor score to determine which factor is most important.

In John Hull's version actually I don't know how to directly observe the loading of a factor for a specific yield, e.g the slope factor of 2-year yield?

So I really confuse here, which one is right in the real practice?

John Hull's book Options, Futures and Other Derivatives 9th page 514:

• parallel shift, ‘‘twist’’ or change of slope, ‘‘bowing’’ – A.Oreo Nov 12 '17 at 9:49

To put things in context, if $\{{\bf X}_i\}_{i=1}^n$ is a set of variables and $\{{\bf Y}_j\}_{j=1}^n$ denote the principal components of ${\bf X}$ then

$${\bf X}_j = \mu_j + \sum_{k=1}^n{\bf Y}_k A_{jk} \tag{1}$$

where $\mu = \mathbb{E}[{\bf X}]$ and $A$ is the diagonal representation of the correlation matrix $\Sigma = \mathbb{C}{\rm ov}[{\bf X}]$. The whole point of PCA analysis is to truncate Eq. (1) to a given number of terms $k_\max \leq n$

$${\bf X}_j \approx \mu_j + \sum_{k=1}^{k_\max}{\bf Y}_k A_{jk} \tag{2}$$

The smaller values of $k_\max$ contain most of the information required to re-construct the set of observations ${\bf X}$. You can roughly think of this as a Taylor expansion

$${\bf X}_j \approx \mu_j + {\bf Y}_1 \color{red}{A_{j1}} + {\bf Y}_2 \color{blue}{A_{j2}} + {\bf Y}_3 \color{orange}{A_{j3}} + \cdots \tag{3}$$

where the coefficients of the expansion are $\color{red}{A_{j1}}$, $\color{blue}{A_{j2}}$, $\color{orange}{A_{j3}}$, $\cdots$. In this picture this coefficients would correspond to $0$-th, $1-$st, $2-$nd, $\cdots$ derivatives, so that you could call them

• $a_1 = \{\color{red}{A_{j1}}\}_j$ level
• $a_2 = \{\color{blue}{A_{j2}}\}_j$ slope
• $a_3 = \{\color{orange}{A_{j3}}\}_j$ curvature

Here's an example for the Swiss market

• But in John Hull's book how to directly observe the loading of slope factor of 2-year yield? – A.Oreo Nov 12 '17 at 14:12
• @A.Oreo By estimating $A_{22}$ – caverac Nov 12 '17 at 14:14
• Could you show some details in $A_{*j}$ is exactly the $j$-derivatives of the yield curve? That's the essential part I don't understand. And why the slope is the second derivative but not the first derivative? – A.Oreo Nov 12 '17 at 14:21
• @A.Oreo I never said these are the derivatives of the yield curve – caverac Nov 12 '17 at 14:24
• sorry, I may misunderstand here. Then it's the derivatives of what? – A.Oreo Nov 12 '17 at 14:31

We can calculate the principal components by finding the eigenvalues and eigenvectors of the covariance matrix. The largest eigenvalue represents the largest variance, second largest eigenvalue the second largest variance etc.

By plotting the components of the eigenvectors we can identify them with, e.g., shifts, tilts, flexing and so on. For example for a yield curve we usually have that the first eigenvector has all components positive (parallel level shift), the second eigenvector has the first half of the components positive and the second half negative (slope tilt), the third eigenvector has the first third of the components positive, second third negative, and the last third positive (flexing).

It just happens that the largest variance comes from a parallel shift in the curve, the second largest variance comes from a tilt of the curve, and the third largest variance comes from a flexing of the curve. It is not required to be so, it is just the dynamics of the market that can be identified with the principal components.

• sorry, suppose we know $y(t,t+2)$ for $-2<t<0,$ then how do we calculate its slope?(not calculating the eigenvector of second largest eigenvalue of covariance matrix) – A.Oreo Nov 13 '17 at 3:02
• The slope is along the yield curve between the different maturities at a fixed point in time. Let ${\tau_n}$ be the maturities along the curve at a fixed point in time $t$. The slope between maturities $\tau_i$ and $\tau_{i+1}$ is approximately just the difference $y(t,\tau_{i+1})-y(t,\tau_i)$. If you want to be more precise you have to fit a model curve, $y_{model}(t,\tau)$, to the points along the curve and take its derivative w.r.t. $\tau$. – RRG Nov 13 '17 at 3:32
• pls see my update, and it comes back to the first question why does the second (thired) largest eigenvector correspond the first(second) derivative of $y(t,T)$ respect to $T.$ The representation of equation 3 in caverac's answer seems not easy to show this relation. – A.Oreo Nov 13 '17 at 4:17
• @A.Oreo I will emphasize on this again: the loadings are $\color{red}{NOT}$ derivatives of the yield curve, these are just labels. You can call them whatever colorful name you prefer and the method still works. For instance, call the second loading $\color{\red}{\text{not-the-slope}}$, and trust-me, your numbers will be the same – caverac Nov 13 '17 at 10:01