joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
818 stars 224 forks source link

Error in using quantmod for getSymbols() and tq_get() #419

Closed rbchenn closed 2 months ago

rbchenn commented 2 months ago

Hi,

I tried to use tq_get() to get the prices of GSPC and VIX but it fail. Here is my code and the Warning massage.

index_data <- tq_get(c("ˆGSPC", "ˆVIX"),
                     get = "stock.prices",
                     from = date_start,
                     to = date_end)

Warning message:

There was 1 warning in dplyr::mutate(). ℹ In argument: data.. = purrr::map(...). Caused by warning: ! x = 'ˆGSPC', get = 'stock.prices': Error in getSymbols.yahoo(Symbols = "ˆGSPC", env = , verbose = FALSE, : Unable to import “ˆGSPC”. HTTP error 403. Removing ˆGSPC.

joshuaulrich commented 2 months ago

This is an issue with your connection to the Yahoo Finance server. It's not something I can fix in quantmod.