Bloomberg fund price set currency

272 views Asked by At

I get the error message

Error in bdh_Impl(con, securities, fields, start.date, end.date, options, : Sub-element '(null)' does not exist.

It only appears when I try to set options = c("curr"="SEK"). If i delete that row, it downloads the data correctly

> startdate <- as.Date("2018-01-01")
> enddate <- as.Date("2018-03-21")
> fund <- bdh("/isin/FI0008813258",
+     "tot_return_index_gross_dvds",
+     startdate,
+     enddate 
+     , options = c("curr"="SEK")
+     )
1

There are 1 answers

0
DTYK On BEST ANSWER

Based on what I have found online, you have to spell currency out in full:

startdate <- as.Date("2018-01-01")
enddate <- as.Date("2018-03-21")
fund <- bdh("/isin/FI0008813258",
          "tot_return_index_gross_dvds",
          startdate,
          enddate 
          , options = c("currency"="SEK")
          )