I want to initialize a curreny pair using FinancialInstrument. The data contains exchange rates for a certain currency pair (e.g. USD_CHF, USD_EUR etc.).
But this doesn't work, why?
> currency("USD")
[1] "USD"
> instrument("USD_CHF",currency="USD",multiplier=1)
primary_id :"USD_CHF"
currency :"USD"
multiplier :1
tick_size : NULL
identifiers: list()
type : NULL
> getInstrument("USD_CHF")
[1] FALSE
Warning message:
In getInstrument("USD_CHF") :
instrument USD_CHF not found, please create it first.
Or at first it works after creating there is an output with the correct primary_id. However getInstrument doesn't work..and my code thereafter neither.