Skip to content
Prev 8540 / 15274 Next

Currency data from GOOGLE/Yahoo finance.

Ashim,

Unfortunately I couldn't get any data from Yahoo or Google either. I thought you had to do something like?getSymbols("CURRENCY:INRUSD",src="google"), but that doesn't work anymore either.?

Best solution I can give you is to use the Oanda source for currency data. They do limit you to 500 days of data but you can easily write a loop changing the "from" and "to" times and rbind the xts object together afterwards.

INRUSD <- getSymbols('INR/USD', src='oanda', auto.assign = FALSE)


Regards, ?

Wolfgang Wu




----- Urspr?ngliche Message -----
Von: Ashim Kapoor <ashimkapoor at gmail.com>
An: r-sig-finance at r-project.org
Cc: 
Gesendet: 8:32 Donnerstag, 22.September 2011 
Betreff: [R-SIG-Finance] Currency data from GOOGLE/Yahoo finance.

Dear R-helpers,

I am trying to use getSymbols to download INR/USD data from yahoo or google
finance. In each case I 1st list the website and then the R error which I
get on trying to download the symbol. Could someone please tell me where I
am wrong?

http://www.google.com/finance?q=inrusd
Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=",
:
? cannot open URL '
http://finance.google.com/finance/historical?q=inrusd&startdate=Jan+01,+2007&enddate=Sep+22,+2011&output=csv
'
In addition: Warning message:
In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=",? :
? cannot open: HTTP status was '400 Bad Request'

http://in.finance.yahoo.com/q?s=USDINR%3DX&ql=1
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,
:
? cannot open URL '
http://chart.yahoo.com/table.csv?s=USDINR=X&a=0&b=01&c=2007&d=8&e=22&f=2011&g=d&q=q&y=0&z=USDINR=X&x=.csv
'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,? :
? unable to resolve 'chart.yahoo.com'

Best Regards,
Ashim

??? [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance at r-project.org 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.