Skip to content
Prev 4869 / 15274 Next

Problem with getSymbols.oanda in quantmod

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