Ramana Sonti
04/30/2017
library(data.table)
library(quantmod)
library(dplyr)
library(zoo)
getSymbols('^DJI',src='yahoo', from='2002-01-01', to='2002-12-31')
[1] "DJI"
trends <- data.frame(Date = index(DJI), coredata(DJI)) %>% select(Date, DJI.Close)
head(trends)
Date DJI.Close
1 2002-01-02 10073.40
2 2002-01-03 10172.14
3 2002-01-04 10259.74
4 2002-01-07 10197.05
5 2002-01-08 10150.55
6 2002-01-09 10094.09