[R-SIG-Finance] Cross correlation problems
Rob Schmidt
roschm at ymail.com
Thu Apr 4 19:23:47 CEST 2013
Hi starter123,
I don't have any good suggestions but here's a little code snippet that
might give you some ideas. ( Thanks to rosy2 from elitetrader)
Best Regards,
Rob
library(quantmod)
getSymbols("YHOO",src="google")
getSymbols("GOOG",src="google")
getSymbols("MSFT",src="google")
df = data.frame( dailyReturn(YHOO), dailyReturn(GOOG), dailyReturn(MSFT) )
names(df)<- c("YHOO","GOOG","MSFT")
round(cor(df),2)
--
View this message in context: http://r.789695.n4.nabble.com/Cross-correlation-problems-tp4663151p4663338.html
Sent from the Rmetrics mailing list archive at Nabble.com.
More information about the R-SIG-Finance
mailing list