[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gen:Principal Component Analysis



PureBytes Links

Trading Reference Links

Larry, I was surprised to have gotten anyones attention with this. 

Principal Component Analysis is a form of multivariate statistics. In
data sets with multiple variables (like stocks in an index) the variables
often move together. Part of this is that one or more variables may be
measuring the same driving principle that is affecting the behavior of
the whole data set (index). PCA is a way of measuring the affects of the
components (stocks) on the whole data set (index). Or to put it another
way, in my example I wanted to find out from the stocks that are the most
heavily weighted in the OEX (which are responsible for most of the
movement in the OEX) which one(s) are the driving components behind the
principal governing behavior of the system. The advantage to this type of
analysis is ,again to use the OEX as an example, if I wanted to watch 100
stocks to try and determine which one(s) will move the index it would be
difficult. By putting the information in a matrix and using PCA you get
an immediate analysis of which stock(s) are moving the index. You can
also monitor the dynamics in the relationships as they evolve over time.
In the previous charts I sent you will see an example of this in the
dramatic change of the affect GE is having on the OEX recently. Of course
this could be used with most all securities data (indexes, bonds,
commodities, etc.)

I am using Matlab ver. 5 to do the calculations. It is very simple. You
calculate a 20 day correlation matrix (I do this in excel) put the matrix
("H",or whatever you want to name it) into matlb and enter the formula 

[T,E] = eig(H)

 E = the eigen values and T = the eigen vectors. Put the eigen values
back into excel and simply calculate the percentage. Eigen Value / Number
of Stocks in Series.

example     .56 / 12

I am also using the matlab excel link to simplify this process.

Ron McEwan