MATLAB: How to request gross profit from Bloomberg

bloombergMATLAB

I have a list of securities that I want to collect annual gross profit information for, for a given timespan. How can I use MATLAB to do that?

Best Answer

In MATLAB, we can request the gross profit for a list of securities using the following code:
Note: this assumes you have already established the Bloomberg connection as variable "c", if you have not yet done so, please follow this guide:
>> securities = {'IBM US Equity'}
>> [d,sec] = history(c,securities,'Gross_profit',...
'01/01/2010','12/31/2015',{'yearly','actual',...
'all_calendar_days','nil_value'},'USD');
You can add other securities to the "securities" list in order to request the data for multiple securities.