How to I fetch the economic data corresponding to the preliminary GDP release as opposed to the default final GDP release using the HISTORY command in Datafeed Toolbox 4.5?

3 views (last 30 days)
I am pulling historical economic data releases from Bloomberg. I would like to pull data from the preliminary release. MATLAB by default fetches the data from the final release. Is there a way to override this and pull data from the preliminary release?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 25 Oct 2013
This feature is not available in Datafeed Toolbox 4.5.
As a simple workaround you could use the code in the attached M-file to achieve this. Please copy and replace the file ‘history.m’ to the folder below:
$MATLAB/toolbox/datafeed/datafeed/@blp
where $MATLAB is the MATLAB root folder obtained by typing the following in the
MATLAB Command Window.
>> matlabroot
Please note that you would need administration rights on your computer to be able to copy and overwrite files in this folder.
After you have copied the new ‘history.m’ file to this location you could use the switch provided in the Bloomberg API to select the release.
Below is an example showing how to fetch 'GDP CQOQ Index' from the preliminary release:
>> c = blp;
>> [d1, sec1] = history(b, 'GDP CQOQ Index', 'BN_SURVEY_MEDIAN', '01/01/1996', '01/01/2010',[],[],'overrideFields',{'RELEASE_STAGE_OVERRIDE','P'})
The valid override values are:
'A' for Advance Release, 'P' for Preliminary Release or 'F' for Final Release.

More Answers (0)

Products


Release

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!