APPENDIX I

Principal Components Analysis

Aprincipal components analysis is concerned with understanding the structure of data on n correlated variables. The aim of the analysis is to replace the n variables by a smaller number of uncorrelated variables. In the example in Section 8.8, there are 8 variables. These are the daily changes in the 1-year, 2-year, 3-year, 4-year, 5-year, 7-year, 10-year, and 30-year swap rates.

The first step in the analysis is to calculate a covariance matrix from the data. As explained in Section 15.3, this is an n× n matrix where the (i, j) entry is the covariance between variable i and variable j. The entries on the diagonal (where i=j) are variances.

The next step is to calculate the eigenvalues and eigenvectors for this matrix (see Appendix H). The eigenvectors are chosen to have length 1. (As explained in Appendix H this means that the sum of the squares of their elements is 1.) The eigenvector corresponding to the highest eigenvalue is the first principal component; the eigenvector corresponding to the second highest eigenvalue is the second principal component; and so on. The principal components for the example in Section 8.8 are shown in Table 8.7.

The eigenvalue for the ith principal component, as a percentage of the sum of all the eigenvalues, is the percentage of the overall variance explained by the ith principal component. The square root of the ith eigenvalue is the standard deviation of the ith factor score (see Table 8.8).

Software ...

Get Risk Management and Financial Institutions, + Web Site, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.