FTS Lesson: Principal Components: Example


Click Technical Details of PCA to see the theory behind the example


To get an understanding of how principal component analysis works, consider a two-variable example. To the left, you can see the volatilities of the two variables and the correlation.Assume that the variables are jointly normally distributed with zero means and the given parameters.


Letís start with a zero correlation.In this case, we have two independent variables, and so we should not be able to explain the variance with one factor.Click Simulate to get a picture like the following::



The principal components analysis is done on the covariance matrix calculated from the 1000 simulated data points.You can see the lack of correlation in the scatter plot; the principal component analysis shows you that each factor explains roughly 50% of the variance.In fact, the first factor mostly affects the second variable (y) while the second mostly affects the first variable (x).


Now, let us increase the correlation to 70% and conduct the same exercise.Either scroll the correlation or type in 0.7 and click Simulate to get a picture like:



See on the scatter plot how the two variables move together.Now, the first factor explains about 85% of the total variance, the second factor about 15%.Further, the first factor moves both variables in the same direction.


Now, repeat the exercise with negative correlation; you should get very similar results as with positive correlation; the first factor should explain about 85% of the variance, but this time it should moves the two variables in opposite directions.


In the extreme case, where the two are perfectly correlated, one factor explains all the variance.Try this out.


So you can see what happens: if the variables are highly correlated, one factor explains most of the variance.This makes principal components analysis a particularly good tool for analyzing highly correlated data such as interest rates.