R 2.3.1
I wrote a little script to do some cross correlations. The symbols are
in a text file like so:
symbols.txt
ibm
dd
csco
require(tseries)
symbols - scan(symbols.txt, what = 'character')
for(line in 1:(length(symbols)-1)) {
assign(symbols[line], get.hist.quote(instrument =
Put the data into a list, not into individual variables. Something
like this (untested):
L - sapply(symbols[-length(symbols)],
get.hist.quote, start = 2005-01-09, quote = Close, simplify = FALSE)
mat - do.call(cbind, L)
cor.mat - cor(mat, use = complete)
symnum(cor.mat)
On 8/29/06,