By: Lauren Montion
SUMMARY
For my Applied Linear Algebra and Matrix Analysis course at Northeastern, I built a factor model for semiconductor equity returns using Principal Component Analysis (PCA), then applied it to portfolio optimization via the Markowitz mean-variance framework.
The goal was to start with the sample covariance matrix of daily returns for 15 large-cap semiconductor stocks (2021–2024) and decompose it into a small number of interpretable factors, replacing a noisy, hard-to-invert covariance matrix with a low-rank-plus-diagonal structure that's cheap to store and invert.
To do this, I first demeaned the returns matrix and computed its sample covariance, then implemented PCA from scratch using power iteration with deflation to extract the eigenvectors and eigenvalues. The top two principal components explained 78% of total return variance, with PC1 emerging as a broad semiconductor market factor and PC2 splitting the sector into chip designers versus equipment manufacturers, a real structural distinction that PCA recovered purely from price correlations, without being told the sector's underlying groupings. Using this reconstructed covariance matrix, I then solved for the Sharpe-ratio-maximizing portfolio under a momentum-based alpha signal, exploiting the factor structure for efficient matrix inversion.
​​​​​​​

You may also like

Back to Top