l*******r 发帖数: 3799 | 1 I remember a few weeks ago someone asked for such a comparison ...
Looks no so much difference recently ... | l*******r 发帖数: 3799 | 2 in R:
library(quantmod) # A library for stock analysis
DJIA <- c("MMM", "AA", "AXP", "T", "BAC", "BA", "CAT", "CVX", "TRV", "KO", "
DD", "XOM", "GE", "CSCO", "HPQ", "HD", "IBM", "INTC", "JNJ", "JPM", "KFT", "
MCD", "MRK", "MSFT", "PFE", "PG", "UTX", "VZ", "WMT", "DIS")
getSymbols(DJIA) # Download historical data for Dow 30 stocks
getSymbols("^DJI") # Download historical data for Dow index
x <- do.call("rbind", lapply(DJIA, function(x) get(x)[, 4])) # Extract
close price
plot
【在 l*******r 的大作中提到】 : I remember a few weeks ago someone asked for such a comparison ... : Looks no so much difference recently ...
|
|