HiSo I tried running the p but i'm stuck as i get the following error: In download.file(url, destfile, method = method, quiet = quiet) : cannot open URL 'http://chart.yahoo.com/table.csv?s=DJI&a=2&b=13&c=2012&d=2&e=07&f=2017&g=d&q=q&y=0&z=DJI&x=.csv': HTTP status was '404 Not Found'
Here is the R code: library(vars)library(tawny)library(quantmod)library(MASS)library(stats)library(DEoptim)library(sn)library(SkewHyperbolic)library(tseries)symbols<-getSymbols(c("^GSPC", "^DJI"))endDate <- Sys.Date()startDate <- endDate - as.difftime(52*5, unit="weeks")quoteType <- "Close"p <- do.call(cbind, lapply(symbols, get.hist.quote, start=startDate, end=endDate, quote=quoteType)) [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.