I would like to achieve unsorted vector of eigenvalues for a 10x10 correlation matrix of stocks returns. The function eigen()
returns ordered values in descending order.
I would like just to get these values corresponding to each stock name without sorting.
Attached correlation matrix:
y = data.frame(
AAPL = c(1.0000000, 0.8034606, 0.7004717, 0.6996925, 0.6671458, 0.4958710, 0.5433092, 0.6900178, 0.6376572, 0.6162418),
MSFT = c(0.8034606, 1.0000000, 0.8219716, 0.8260105, 0.6896919, 0.4793830, 0.5699094, 0.7572619, 0.6680316, 0.6667194),
GOOG = c(0.7004717, 0.8219716, 1.0000000, 0.9921730, 0.6429816, 0.4169146, 0.5442465, 0.6656362, 0.7031941, 0.6645946),
GOOGL = c(0.6996925, 0.8260105, 0.9921730, 1.0000000, 0.6356657, 0.4127679, 0.5514112, 0.6729881, 0.6984569, 0.6616017),
AMZN = c(0.6671458, 0.6896919, 0.6429816, 0.6356657, 1.0000000, 0.4392104, 0.4842821, 0.6302510, 0.6349091, 0.4030298),
TSLA = c(0.4958710, 0.4793830, 0.4169146, 0.4127679, 0.4392104, 1.0000000, 0.4303702, 0.5205868, 0.3700049, 0.3608651),
TSM = c(0.5433092, 0.5699094, 0.5442465, 0.5514112, 0.4842821, 0.4303702, 1.0000000, 0.6379209, 0.4380425, 0.4685874),
NVDA = c(0.6900178, 0.7572619, 0.6656362, 0.6729881, 0.6302510, 0.5205868, 0.6379209, 1.0000000, 0.5819932, 0.5501563),
FB = c(0.6376572, 0.6680316, 0.7031941, 0.6984569, 0.6349091, 0.3700049, 0.4380425, 0.5819932, 1.0000000, 0.5190931),
V = c(0.6162418, 0.6667194, 0.6645946, 0.6616017, 0.4030298, 0.3608651, 0.4685874, 0.5501563, 0.5190931, 1.0000000))