joshuaulrich / quantmod

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

Error with getSymbols #346

Closed rabarros01 closed 2 years ago

rabarros01 commented 2 years ago

Description

For about two weeks I have been trying to download stock prices from Yahoo Finance using "getSymbols" in quantmod, and for many many stock prices I get the following error message

Warning: Unable to import “UNH”. argument "conn" is missing, with no default

where UNH is just one of the tickers I get the error message above

Expected behavior

This error should not appear, and the stock prices should be obtainable.

Minimal, reproducible example

For example, the code I am running is

window = 2000 first.date = Sys.Date() - window last.date = Sys.Date() freq.data = 'daily'

tickers = c("^GSPC","ACN","BABA","GOOGL","BRK-B","UNH") data.stocks = getSymbols(tickers, from = first.date, to = last.date, periodicity = "daily") BRK.B = get("BRK-B") data = cbind(Cl(GSPC),Cl(ACN),Cl(BABA),Cl(GOOGL),Cl(BRK.B),Cl(UNH))

Kind regards, rabarros01

joshuaulrich commented 2 years ago

Have you updated to the latest development version? This should have been fixed in #333.

BlueFx commented 2 years ago

Hi, I got the same problem. I use the version 0.4.18 (think it is the latest one).

joshuaulrich commented 2 years ago

0.4.18 is the latest on CRAN. The latest development version is 0.4.18.1.

rabarros01 commented 2 years ago

Hi,

just to let everyone know that the issue has been fixed in quantmod

Kind regards, rabarros01

joshuaulrich commented 2 years ago

Thanks for following up!