[R-SIG-Finance] Rbloomberg currency conversion

Ana Nelson nelson.ana at gmail.com
Fri Jun 18 12:02:19 CEST 2010


Hi, Kent,

Thanks for sending version info and a reproducible example! Page 96 of
Bloomberg API Reference has details on the options supported by
Historical Data Request.

"currency Optional string Currency of the ISO Code. The 3 letter ISO code."

So what you probably want is:

 Data <- bdh(conn, Instruments, Field, start_date=StartDate,
option_names="currency", option_values="USD")
> Data
                 date  PX_LAST
2010-05-28 2010-05-28 107.5455
2010-05-31 2010-05-31 107.1952
2010-06-01 2010-06-01 106.5595
2010-06-02 2010-06-02 104.2471
2010-06-03 2010-06-03 107.3662
2010-06-04 2010-06-04 107.9031
2010-06-07 2010-06-07 103.5432
2010-06-08 2010-06-08 104.4109
2010-06-09 2010-06-09 103.2276
2010-06-10 2010-06-10 104.7952
2010-06-11 2010-06-11 105.9525
2010-06-14 2010-06-14 107.6706
2010-06-15 2010-06-15 108.2063
2010-06-16 2010-06-16 110.1559
2010-06-17 2010-06-17 110.1377
2010-06-18 2010-06-18 110.3081
>

Regards,
Ana



More information about the R-SIG-Finance mailing list