0
$\begingroup$

I'm trying to apply the output from PCA analysis I've run on some yield curve history and am getting a bit confused. I have followed the steps below,

  1. From a history of the yield curve ($m \times n$ where $m$ are the days and $n$ are the tenor points) I derive the daily returns
  2. Calculate a covariance matrix from the daily returns
  3. Calculate the eigenvectors and eigenvalues that correspond to the covariance matrix. The first two eigenvectors (principal components) are,

    Tenor      PC2          PC1
    1Y         -0.15028     0.05154 
    2Y         -0.32138     0.13310 
    3Y         -0.41856     0.20852 
    5Y         -0.41465     0.26116 
    7Y         -0.33315     0.29555 
    10Y        -0.19980     0.31919 
    15Y        -0.04874     0.33416 
    20Y         0.08760     0.34173 
    

PC1 explains 85% of the variance and PC2 explains 11%, so these two components are enough for the purposes of my analysis.

What I would like to do is measure the amount the yield curve moves if I assume the 5Y point moves by exactly one unit with every point moving in the same direction (the move exactly described by PC1).

To do this I calculate a shift to the yield curve using the following expansion, $ \textbf{PC1} = \Bigg[ \textbf{SD} \cdot \bigg[ \textbf{P} \cdot \big[ \textbf{Sc} \cdot \textbf{SD} \cdot \textbf{P} \big] ^ {-1} \bigg] \Bigg] \cdot \big[1\big]$

where,

  • $\textbf{SD}$ is the standard deviation matrix of size $n \times n$ where $n$ is the number of tenors, the diagonal value is the square root of the diagonal of the covariance matrix and zeros everywhere
  • $\textbf{P}$ is the first Principal Component vector, which is simply the eigenvalues of the covariance matrix of the daily returns of size $n \times 1$
  • $\textbf{Sc}$ is a scalar vector that represents a unit shift at the 5Y point, so is a $n \times 1$ vector with 0 at each element apart from 1 at the corresponding 5Y tenor

The output of the above expansion does indeed lead to an $n \times 1$ vector that has a shift for every tenor and exactly 1 at the 5Y point, so the result does appear to be correct.

This is the output,

0.071660453
0.336473214
0.707324248
1
1.204548309
1.340536029
1.429582409
1.489268877

However, some other references suggest that I can use the eigenvectors as weights directly. If I do that and scale the results of the PC1 vector so that the 5Y element is exactly 1, I get this result,

0.197343561
0.509633359
0.798451041
1
1.131677872
1.222203892
1.279510769
1.308506297

So my question simply is - which result is correct? Is it the first one or the second, which is simply a linear scaling of the eigenvector?

Thank you in advance.

$\endgroup$
  • $\begingroup$ Welcome to CV. I've a few questions to clarify what you are doing. what is SD? The standard deviation of a matrix I am familiar with is a scalar (see allexamshelps.com/…) . Do you mean the covariance matrix with element by element square root? Or maybe the eigenvalues? You allude to references, could you provide some? $\endgroup$ – ReneBt Feb 15 at 14:15
  • $\begingroup$ Hi Rene, I've edited my question about. In specific answer to your questions SD is square root of the diagonal of the covariance matrix. I've also linked to a reference. $\endgroup$ – insomniac Feb 15 at 15:02
0
$\begingroup$

Try squaring your transformed PC1 (eqn 1) and compare it to the directly weighted loading (option 2) - you will see that it is the square of the direct weighting.

For your purposes there is no need to manipulate the eigenvectors themselves, what you should adjust is the scores applied to each PC (which is method 2).If you manipulate the eigenvectors themselves, you are directly manipulating the underlying reality of your covariance structure. Eigenvectors are unit vectors, so they have an overall weight of 1 - if you mess with that you just make life complicated for yourself in correcting for when to square and when to square root, as you would need to work out with solution 1.

If you manipulate the scores, you are simply observing what happens as you manipulate observations, which sounds more like what you want. The PCA equation it is very simple.

$ Data = Scores * PCs$

If you adjust the scores there is no squaring involved - the effect of scaling changes are inherently handled by the nature of linear algebra multiplication.

$\endgroup$
  • $\begingroup$ Hi Rene, thanks but I don't follow your explanation. What do you refer to by "transformed PC1", "scores" and "weighted loading"? Can you please clarify. $\endgroup$ – insomniac Feb 23 at 8:14
  • $\begingroup$ OK, have included reference to your 1st and second options. If you scale the eigenvectors then you are introducing a weight to them. $\endgroup$ – ReneBt Feb 23 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.