Principal Component Analysis

Over the last summer, I intern-ed at the technology division of a financial firm. I worked with the fixed income options desk, and my project involved developing software that would analyze and display financial data, such as yield curve cooking, profit and loss attribution, and risk analyses. I remember being incredibly unfamiliar with all these financial concepts and jargon, being a computer science major, and so the learning curve was unsurprisingly steep. However, it turned out to be a great experience, and amongst all the skills and knowledge that I had amassed over the summer, witnessing and getting involved in the application of a common linear algebra technique - the Principal Component Analysis (PCA) - to the financial area was especially eye-opening.

Unfortunately for me, the PCA was not covered in my Math 294 class, and so had to pick it up on my own from the textbook and wikipedia. PCA is essentially a technique used to reduce multidimensional data sets down to lower dimensions for analysis. It involves the calculation of the eigenvalue decomposition of a data covariance matrix, or the SVD of a data matrix (after mean centering the data), and is mostly used in building predictive models. Its mathematical details are available at the link below.

My summer project entailed working on implementing a gamma (second-order derivative) profit-and-loss (P&L) attribution, or in other words the second-order effects of the value of the portfolio with respect to changes in the yield curve (a graph demonstrating the relation between the interest rate and the time to maturity of the debt for a given borrower), using the PCA. Yield curves typically have many fixed points or instruments, where the interest rate is known with certainty for a specific maturity date, and these “instruments” determine the changes in the yield curve. Thus in order to calculate the gamma attribution, this would ideally comprise of calculating the second order partial derivatives with respect to every pair of yield curve instruments. However, this is an extremely expensive process, especially since the dimensionality can be pretty large. To improve performance, we performed a PCA on the data to reduce its dimensionality, finding the eigenvectors (in terms of the yield curve instruments) that brought about the most significant changes in the yield curve, and using this reduced coordinate space to calculate the second order derivatives.

Resources
http://en.wikipedia.org/wiki/Principal_components_analysis

Posted in Topics: Uncategorized

Jump down to leave a comment.

Leave a Comment

You must be logged in to post a comment.



* You can follow any responses to this entry through the RSS 2.0 feed.