Error In Download.filepasteyahoo.url S= Symbols.name & A = From.m
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Quantmod, getSymbols error trying to replicate answer up vote 5 down vote favorite 2 I just downloaded the package Quantmod and have been playing with getSymbols. I want to be able to get data for multiple stocks as in this question: getSymbols and using lapply, Cl, and merge to extract close prices. Unfortuantely, when I try to duplicate the answer: tickers <- c("SPY","DIA","IWM","SMH","OIH","XLY", "XLP","XLE","XLI","XLB","XLK","XLU") getSymbols(tickers, from="2001-03-01", to="2011-03-11") I get the following error message: Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : cannot open URL 'http://chart.yahoo.com/table.csv?s=SPY&a=2&b=01&c=2001&d=2&e=11&f=2011&g=d&q=q&y=0&z=SPY&x=.csv' In addition: Warning message: In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : cannot open: HTTP status was '0 (null)' Here is my sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] quantmod_0.4-0 TTR_0.22-0 xts_0.9-7 zoo_1.7-10 Defaults_1.1-1 loaded via a namespace (and not attached): [1] grid_3.0.2 lattice_0.20-23 tools_3.0.2 r quantmod share|
4 messages Nimbus Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ quantmod and yahoo historical data download error - did yahoo changed the url? Hi, I am facing issues with downloading historical data from yahoo using quantmod this morning: [1] "BAL" Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=BAL&a=8&b=17&c=2014&d=8&e=18&f=2014&g=d&q=q&y=0&z=BAL&x=.csv'In addition: http://stackoverflow.com/questions/20850143/quantmod-getsymbols-error-trying-to-replicate-answer Warning message: In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : cannot open: HTTP status was '404 Not Found' To me it looks like yahoo change urls (again?) since if I go to yahoo webpage http://finance.yahoo.com/q/hp?s=BAL+Historical+Pricesand hover over link "Download to Spreadsheet" I can see this http://real-chart.finance.yahoo.com/table.csv?s=BAL&d=8&e=18&f=2014&g=d&a=5&b=25&c=2008&ignore=.csv. It looks ichart changed http://r.789695.n4.nabble.com/quantmod-and-yahoo-historical-data-download-error-did-yahoo-changed-the-url-td4697125.html to real-chart and maybe parameters have also changed. Best regards, Samo _______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance-- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go. Daniel Cegiełka Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: quantmod and yahoo historical data download error - did yahoo changed the url? 2014-09-18 9:49 GMT+02:00 Samo Pahor <[hidden email]>: > Hi, > > I am facing issues with downloading historical data from yahoo using > quantmod this morning: > [1] "BAL" > Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : > cannot open URL > 'http://ichart.finance.yahoo.com/table.csv?s=BAL&a=8&b=17&c=2014&d=8&e=18&f=2014&g=d&q=q&y=0&z=BAL&x=.csv'> In addition: Warning message: > In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : > cannot open: HTTP status was '404 Not Found' > > To me it looks
post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ http://r.789695.n4.nabble.com/Quantmod-Yahoo-ticker-download-error-td4703742.html ♦ Quantmod Yahoo ticker download error Hello,Tickers with - get error when trying to download ZB-PA but not ZBK.When I manually download it from https://r-forge.r-project.org/forum/forum.php?thread_id=28604&forum_id=1032&group_id=316 Yahoo I get this link, that works.http://real-chart.finance.yahoo.com/table.csv?s=ZB-PA&a=00&b=2&c=2015&d=01&e=23&f=2015&g=d&ignore=.csvThe Quantmod tried to download from this link, which does not exist.http://ichart.finance.yahoo.com/table.csv?s=ZB-PA&a=0&b=01&c=2015&d=1&e=24&f=2015&g=d&q=q&y=0&z=ZB-PA&x=.csvIf this part could be replaced "q=q&y=0&z=ZB-PA&x" error in with "d&ignore" and it will work both with ZB-PA and ZBK.Maybe this forum is not the correct place to suggest this improvement, please point me in right direction.Maybe someone can help me out to fix this script error?My script stop writing to the database if one of error in download.filepasteyahoo.url these tickers get this error described above (no data exist for symbol ZB-PA to be stored in the database. Anyone know how to ignore tickers that get this error so the script can continue to load all tickers that has downloaded data?Please find attached scripts.Error when trying to download ticker data from Yahoo Finance for ZB-PA.================================="Downloading ZB-PAError in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=ZB-PA&a=0&b=01&c=2015&d=1&e=24&f=2015&g=d&q=q&y=0&z=ZB-PA&x=.csv'In addition: Warning message:In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : InternetOpenUrl failed: 'The operation timed out', error - did not download (likely due to rate limitingDownloading ZBKWarning message:In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, : downloaded length 1653 != reported length 200> View(clean.symbols)> "=====================================================================> # Save data to MySQL> > library(RMySQL)> > con <- dbConnect(RMySQL::MySQL(), host="localhost", user="donedge",password="p@ssw0rd", dbname= "daily")> > # Loop through each symbol> > for (i in 1:nrow(clean.symbols)){+ symbol <- clean.symbols[i,]$Symbol+ df = data.frame(Date=index(get(symbol)), coredata(get(symbol