Guest User

Untitled

a guest
Jan 23rd, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. startdate <- "2017-11-05"
  2. enddate <- "2018-01-20"
  3.  
  4. Symbols <- c("XOM","MSFT","JNJ", "BRK.B","GE","CVX","WFC","PG","JPM","VZ","PFE","T","IBM","MRK","BAC","DIS","ORCL","PM","INTC","SLB")
  5.  
  6.  
  7.  
  8. dailyreturns = lapply(Symbols, function(sym) {
  9. dailyReturn(na.omit(getSymbols(sym, from= startdate, to = enddate, auto.assign=FALSE, src = "yahoo")))
  10. })
  11.  
  12. Warning: BRK.B download failed; trying again.
  13.  
  14. Warning: BRK.B download failed; trying again.
  15. Error: BRK.B download failed after two attempts. Error message:
  16. HTTP error 404.
  17. Called from: getSymbols.yahoo(Symbols = "BRK.B", env = <environment>, verbose = FALSE,
  18. warnings = TRUE, auto.assign = FALSE, from = "2017-11-05",
  19. to = "2018-01-20")
Add Comment
Please, Sign In to add comment