Trying to run following R code.
> sp_500 <- sp_500 %>%
+
+ mutate(
+ stock.prices = map(ticker.symbol,
+ function(.x) get_stock_prices(.x,
+ return_format = "tibble",
+ from = "2017-01-01",
+ to = "2017-09-21")
+ ),
+ log.returns = map(stock.prices,
+ function(.x) get_log_returns(.x, return_format = "tibble")),
+ mean.log.returns = map_dbl(log.returns, ~ mean(.$Log.Returns)),
+ sd.log.returns = map_dbl(log.returns, ~ sd(.$Log.Returns)),
+ n.trade.days = map_dbl(stock.prices, nrow)
But I keep getting this error:
Warning: BRK.B download failed; trying again.
Error in mutate_impl(.data, dots) :
Evaluation error: BRK.B download failed after two attempts. Error message:
HTTP error 404..
Does anyone have an idea what am I doing wrong?
Best Regards AnSa