In this post, I am updating that implementation for creating that Bloomberg API wrapper, but now enabling data retrieving process for
- Reference data (Ex. previous close bid for EUR Curncy)
- Bulk reference data (Ex. all curve members for USD swap curve - retrieving ISIN codes + yellow key)
- Historical data (Ex. daily close prices for EONIA Index between 31.5 - 24.6.2013)
- First, we retrieve curve members for four different swap curves (bulk reference data).
- Then, we retrieve security name and previous close value for first members (overnight index) for each of the four curves (reference/snapshot data).
- Finally, we retrieve daily historical data between 31.5.2013 - 24.6.2013 for overnight index for each of the four curves (historical data). Note, that historical data retrieves date/value-pairs.
The idea of this wrapper class is to serve as a simple black box interface into BBCOM server to retrieve any type of desired market data. Design is, that there is no design at all. The functionality of Bloomberg API can safely assumed to be quite stable, so I made a decision to keep everything inside one monolithic class for the maximum user convinience reasons. By that way, it is now very easy to import this one wrapper class into a new VBA project and just start to use it. Remember to create reference to Bloomberg API COM 3.5 Type Library in your VB editor before using this class.
If there is anything unusual going on with this, just let me know. For the time being, I will collect all the possible fixes and updates into this posting. I hope this helps in your working with Bloomberg-related market data. Have a nice day.
Most of the data types from BCOM API are converted implicitly into corresponding VBA data types without any problems, such as
BLPAPI_CHAR = VBA String
BLPAPI_DATE = VBA Date
BLPAPI_FLOAT64 = VBA Double
BLPAPI_STRING = VBA String
However, BCOM data type BLPAPI_INT32 was causing runtime error 458 (Variable uses an automation not supported in Visual Basic). I assume this data type to be Unsigned Integer. Problem has been fixed by converting this data type explicitly into VBA Long data type. You can investigate Datatype property for bFieldValue object in wrapper method getServerData_reference.