[R-SIG-Finance] Problem with getSymbols.oanda in quantmod

Luis Torgo ltorgo at dcc.fc.up.pt
Fri Sep 18 16:30:24 CEST 2009


Dear all,

I think there is a small problem with the getSymbols.oanda() function in 
package quantmod.
I'm using R version 2.9.0 (2009-04-17), and quantmod version 0.3-11.

Here is a trace of the problem:
 > 
setSymbolLookup(GSPC=list(name='^GSPC',src='yahoo'),USDEUR=list(name='USD/EUR',src='oanda',from=as.Date('2009-01-01')))

 > getSymbols(c('GSPC','USDEUR'))
[1] "GSPC"   "USDEUR"
Warning message:
In getSymbols.oanda(Symbols = "USDEUR", env = <environment>, verbose = 
FALSE,  :
  incorrectly specified currency pair USD/EUR

The problem seems to be easy to solve. I think it resorts to changing 
the line in function getSymbols.oanda():
currency.pair <- strsplit(toupper(Symbols[[i]]), "/")[[1]]
into
currency.pair <- strsplit(toupper(Symbols.name), "/")[[1]]

Luis Torgo

-- 
Luis Torgo
   FC/LIAAD - INESC Porto, LA    Phone : (+351) 22 339 20 93
   University of Porto           Fax   : (+351) 22 339 20 99
   R. de Ceuta, 118, 6o          email : ltorgo at liaad.up.pt
   4050-190 PORTO - PORTUGAL     WWW   : http://www.liaad.up.pt/~ltorgo



More information about the R-SIG-Finance mailing list