Quantmod Error 'Cannot Open Url'

Quantmod Error 'cannot open URL'

Another (temporary) solution is to call one of the following before the actual getSymbols script:

options(download.file.method="libcurl")
or

options(download.file.method="wget")
or

options(download.file.method="wininet")

The first option works for me (on Mac).

Thanks Paul Gilbert from Rmetrics (bottom post)

Does the quantmod link to yahoo stop working?

Referencing this quantmod issue thread, this is a problem originating from Yahoo, and there is a fix in the development version of quantmod. Until that fix is released on CRAN, you can try installing the development version.

As described in the installation instructions in the quantmod readme:

remotes::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")
# or
devtools::install_github("joshuaulrich/quantmod", ref="157_yahoo_502")

getSymbols() from quantmod in R doesn't work

The latest version of quantmod on CRAN is 0.4-14, so you need to upgrade. Also note that Google Finance no longer provides any data.


You're using MRAN and R-3.3.x. MRAN may have quantmod_0.4-14, but they apparently do not for older R versions. And CRAN only provides Windows binaries for the latest minor version of R (currently 3.6.x).

You can install the latest quantmod from CRAN on R-3.3.x, but you will have to do some of the steps manually. Download quantmod_0.4-14 from CRAN then call:

install.packages("quantmod_0.4-14.tar.gz", repos = NULL, type = "source")

I think that should work. Comment if you still have issues.

Error in getSymbols function usage in R(https)

I tried :

library(quantmod)
# Create an object containing the Pfizer ticker symbol
symbol <- "PFE"
# Use getSymbols to import the data
getSymbols(symbol, src="yahoo", auto.assign=T)
# because src='google' throws error, yahoo was used, and even that is down

When I tried other source, it worked:

# "quantmod::oanda.currencies" contains a list of currencies provided by Oanda.com
currency_pair <- "GBP/CAD"
# Load British Pound to Canadian Dollar exchange rate data
getSymbols(currency_pair, src="oanda")
str(GBPCAD)

It seems there are issues with google and yahoo while we use quantmod pkg.

I will suggest you to use 'Quandl' instead. Plz goto Quandl website, register for free and create API key, and then copy it in below:

# Install Quandl
install.packages("Quandl")
# or from github
install.packages("devtools")
library(devtools)
install_github("quandl/quandl-r")

# Load the Quandl package
library(Quandl)

# use API for full access
Quandl.api_key("xxxxxx")

# Download APPLE stock data
mydata = Quandl::Quandl.datatable("ZACKS/FC", ticker="AAPL")

For HDFC at BSE, you can use:

hdfc = Quandl("BSE/BOM500180")

for more details:

https://www.quandl.com/data/BSE-Bombay-Stock-Exchange?keyword=HDFC

I get an error from R when I run quantmod (getDividens)

Try using lapply :

library(quantmod)

result <- Reduce(merge, lapply(Tick, function(x) {
tryCatch({
getDividends(x, from= "2016-01-04", to="2017-03-09", src="yahoo")
}, error = function(e) {}
)
}))


Related Topics



Leave a reply



Submit