I'm using daily settlement data to get yield levels for a couple of products. From this data I am doing PCA on a rolling collection of the yield levels. I have been using sci-kit learn's PCA function, but I also see the issue when doing my own PCA through Numpy. So as far as I know it's not an issue of the libraries.
After I get the vectors I solve the linear equations such that the first two principle components sum to 0. This is done by setting one of the weights = 1.0
Here's an example. I have data for 150 settlements and I calculate the PC's using data from day 0-100, then I recalculate 10 days later on data 10-110, etc.
When I do this I get a graph of the PC's
And here are the corresponding weights.
Relevant math: After performing the PCA I get the components matrix $~ \left( \begin{array}{ccc} a & b & c \\ d & e & f \\ g & h & i \end{array} \right) $ From here I take the first two vectors $[a, b, c]$ and $[d, e, f]$. Which I then turn into the equation $Ax = B$ that looks something like this $~ \left( \begin{array}{ccc} a & c \\ d & f \end{array} \right) \left(\begin{array}{ccc} x_1 \\ x_3 \end{array} \right) = \left(\begin{array}{ccc} b \\ e \end{array} \right)$
As you can see the $x_1$, $x_3$ weights start to blow up at some point which doesn't really make sense given the nature of the data.
Does anybody have any insight to my problem?