[R-SIG-Finance] Rbloomberg currency conversion

Voss, Kent VOSSK at kochind.com
Fri Jun 18 16:44:12 CEST 2010


Thanks so much Ana, that worked a treat.  I've been looking for the API
Reference guide and cannot seem to find it.  I've found the API
Developer's Guide (version 2.22, published May 28, 2010), but I can't
find the details on options supported by bdh.  Could you let me know the
exact name of the Reference guide and then I'll see if I can track it
down on Bloomberg.

Thanks again,
Kent 

-----Original Message-----
From: Ana Nelson [mailto:nelson.ana at gmail.com] 
Sent: Friday, June 18, 2010 3:02 AM
To: r-sig-finance at stat.math.ethz.ch
Cc: Voss, Kent
Subject: Re: [R-SIG-Finance] Rbloomberg currency conversion

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