![bloomberg api vba bloomberg api vba](https://pic2.zhimg.com/v2-3d5db06346bfc6498310906eb9f7c11d_r.jpg)
I guess that most of the people will retrieve option chains, bond chains or curve member chains from Bloomberg. Using override follows exactly, what has been presented above for reference data. Nothing else has been changed, except we have now override possibility also for this type of data retrieving. Public Function bulkReferenceData( ByRef securities As Variant, _ The new class public interface function has been defined to be the following: If you already did not know, you can retrieve multiple fields for multiple securities, as that example program shows.
Bloomberg api vba code#
There is an example tester program given for reference data retrieving in the code section below, with and without override. Personally I have to give a credit for Bloomy people for giving out this function, since it is a really great tool, which truly increases your productivity. If you play with this FLDS for a while, you should become pretty comfortable with this override possibility in Bloomberg. Just for an example, if you select BEST_FPERIOD_OVERRIDE (default value = 1FY) to be 3FY, you can see that the value for BEST_EPS also changes. You should now have a view for all the fields, which can be overriden for this specific field (BEST_EPS). Write best eps into FLDS query input box and press ENTER
![bloomberg api vba bloomberg api vba](https://i.ytimg.com/vi/cw8NO9UVaUY/maxresdefault.jpg)
For example, you can test the override in your Bloomberg with the following commands: To implement an override to any field, we need to set up one array for override field names and another for override values. Excellent source for investigating possible override options for a field, is Bloomberg itself and its FLDS function.
![bloomberg api vba bloomberg api vba](http://image2.slideserve.com/4653788/bloomberg-worksheet-functions-n.jpg)
What is new here, is the override optionality. Needless to say, we still need to give arrays for securities (Bloomberg tickers with yellow key) and fields (Bloomberg field names). Optional ByRef overrideValues As Variant) As Variant Optional ByRef overrideFields As Variant, _ Public Function referenceData( ByRef securities As Variant, _ Now, let us investigate these function interfaces a bit to be able to understand, what has been changed.įor referenceData, the new class interface function has been defined to be the following: I assume that you are familiar of these data query types already. Anyway, to be more specific about the new public function interfaces, we have now three separate public functions for different types of data queries: So, everything is (and hopefully will be) inside one class module. However, I still have not compromised the basic principle which says, that the wrapper is a compact one-module entity, which can be imported easily into your new VBA project. Handling all those different mandatory/optional input parameters for all different types of market data started to be a bit too messy operation to handle and public interface function mutated itself into a scary-looking monster. With this updated version, I have now decided to break the class public interface function (previously getData function) into three separate functions. If you are not familiar with the previous versions, you might want to take a look at these first. I am finally publishing some updates (hopefully also improvements) to the existing version for Bloomberg BCOM wrapper.