Skip to content

download yahoo quotes using tseries get.hist.quote(), error 404

3 messages · Marco Bianchi, Jeff Ryan

#
I am using the command get.hist.quote() from the tseries library to  
download daily equity prices for European stocks.
As I am looping over a long list of tickers, at some point the R code  
is crushing on some tickers giving error 404,
as if the ticker was unknown to Yahoo.

The problem is that I have experienced this 404 error with tickers  
like TEF.MC or HSBA.L (Telefonica and Barclays) which are liquid  
stocks and correct tickers in finance.yahoo.com.

Are other R-finance users experiencing the same problem? Is this  
related to R or the nature is more operating system problem (I am  
running R under Windows XP)?

I have also investigated the possibility to use getSymbols() command  
in quantmod library, but then it seems that a number of European  
stocks are not available? Also,
using get.hist.quote() gives the possibility to download the time  
series as calendar days (rather than trading days), hence producing a  
series of equal length for each ticker.
I do not seem to see the same feature available in quantmod  
getSymbols() command...

Any help from other R-finance users very much appreciated.

Marco
#
You may just be getting timed out by the yahoo servers, as they have  
every right to throttle requests.

Try adding in Sys.sleep(1) between calls, as well as a try call.

getSymbols works on TEF.MC, though my testing is limited to ssh on an  
iPhone so it is a bit limited.

getSymbols also does no processing of raw data by design. Post  
download processing is better handled by tools in zoo/xts/R than  
trying to wrap into getSymbols was the thinking.

Using ?merge.xts against a common time index would be the best way to  
assure identical times across symbols.

Best,
Jeff

Jeffrey A. Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics
www.insightalgo.com

On Dec 12, 2009, at 5:45 AM, Marco Bianchi
<marcolondonuk at googlemail.com> wrote: