Create a Bloomberg® connection, and then retrieve frontier market stock data.
Create the Bloomberg connection.
c = blp;
Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg B-PIPE® using bpipe.
Return data as a table by setting the DataReturnFormat property of the connection object. If you do not set this property, the eqs function returns data as a cell array.
c.DataReturnFormat = 'table';
Retrieve equity screening data for the screen named Frontier Market Stocks with 1 billion USD Market Caps.
sname = 'Frontier Market Stocks with 1 billion USD Market Caps';
d = eqs(c,sname);
Display the first three rows in the returned data d.
d(1:3,:)
ans =
3×8 table
Cntry Name IndGroup MarketCap Price_D_1 P_B P_E EPS_1YrGrLF
___________ _____________________________ ________ __________ _________ ______ ______ ___________
'Venezuela' 'MERCANTIL SERVICIOS FINAN-A' 'Banks' 7.3424e+12 70088 278.25 1137.6 1121.9
'Venezuela' 'BANCO DEL CARIBE-A' 'Banks' 2.0442e+12 24531 2321.8 NaN NaN
'Venezuela' 'BANCO PROVINCIAL' 'Banks' 1.2632e+12 11715 52.344 173.72 219.1
The columns in d are:
Country name
Company name
Industry name
Market capitalization
Price
Price-to-book ratio
Price-earnings ratio
Earnings per share
Close the Bloomberg connection.
close(c)
Retrieve Equity Screening Data for a Screen Type
Create the Bloomberg connection.
c = blp;
Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg
B-PIPE® using bpipe.
Retrieve equity screening data for the screen called
Vehicle-Engine-Parts and the screen type equal to
'GLOBAL'.
d = eqs(c,'Vehicle-Engine-Parts','GLOBAL');
Display the first three rows in the returned data d.
d contains Bloomberg equity screening data for the Vehicle-Engine-Parts
screen. The first row contains column headers. The subsequent rows contain the returned
data. The columns in d are:
Ticker symbol
Company name
Market capitalization
Price
Price-earnings ratio
Total return year-to-date
Revenue
Earnings per share
Close the connection.
close(c)
Retrieve Equity Screening Data for a Screen in German
Create the Bloomberg connection.
c = blp;
Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg
B-PIPE using bpipe.
Retrieve equity screening data for the screen called
Vehicle-Engine-Parts, the screen type equal to
'GLOBAL', and return data in German.
d = eqs(c,'Vehicle-Engine-Parts','GLOBAL','GERMAN');
Display the first three rows in the returned data d.
d contains Bloomberg equity screening data for the Vehicle-Engine-Parts
screen. The first row contains column headers in German. The subsequent rows contain the
returned data. The columns in d are:
Ticker symbol
Company name
Market capitalization
Price
Price-earnings ratio
Total return year-to-date
Revenue
Earnings per share
Close the connection.
close(c)
Retrieve Equity Screening Data for a Screen with a Specified Screen Folder Name
Create the Bloomberg connection.
c = blp;
Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg
B-PIPE using bpipe.
Retrieve equity screening data for the Bloomberg screen called Vehicle-Engine-Parts, using the
Bloomberg screen type 'GLOBAL' and the language
'ENGLISH', and the Bloomberg screen folder name 'GENERAL'.
d = eqs(c,'Vehicle-Engine-Parts','GLOBAL','ENGLISH','GENERAL');
Display the first three rows in the returned data d.
d contains Bloomberg equity screening data for the Vehicle-Engine-Parts
screen. The first row contains column headers. The subsequent rows contain the returned
data. The columns in d are:
Ticker symbol
Company name
Market capitalization
Price
Price-earnings ratio
Total return year-to-date
Revenue
Earnings per share
Close the connection.
close(c)
Retrieve Equity Screening Data Using Override Fields
Create the Bloomberg connection.
c = blp;
Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg
B-PIPE using bpipe.
Retrieve equity screening data as of a specified date using these input arguments.
The override field PiTDate is equivalent to the flag
AsOf in the Bloomberg Excel Add-In.
Bloomberg connection c
Bloomberg screen is Vehicle-Engine-Parts
Bloomberg screen type is 'GLOBAL'
Language is 'ENGLISH'
Bloomberg screen folder name is 'GENERAL'
Override field PiTDate is September 9, 2014
d = eqs(c,'Vehicle-Engine-Parts','GLOBAL','ENGLISH','GENERAL',...'OverrideFields',{'PiTDate','20140909'});
Display the first three rows in the returned data d.
d contains Bloomberg equity screening data for the Vehicle-Engine-Parts
screen as of September 9, 2014. The first row contains column headers. The subsequent
rows contain the returned data. The columns in d are:
Bloomberg connection, specified as a connection object
created using blp, blpsrv, or bpipe.
sname — Screen name character vector | string scalar
Screen name, specified as a character vector or string scalar to denote the
Bloomberg V3 session screen name to execute. The screen can be a customized equity
screen or one of the Bloomberg example screens accessed by using the EQS <GO>
option from the Bloomberg terminal.
Data Types: char | string
stype — Screen type 'GLOBAL' | 'PRIVATE'
Screen type, specified as one of the two preceding values to denote the Bloomberg screen type. 'GLOBAL' denotes a Bloomberg screen name and 'PRIVATE' denotes a customized screen
name. When using the optional group input argument,
stype cannot be set to 'PRIVATE' for customized
screen names.
languageid — Language identifier character vector | string scalar
Language identifier, specified as a character vector or string to denote the
language for the returned data. This argument is optional.
Data Types: char | string
group — Group identifier character vector | string scalar
Group identifier, specified as a character vector or string to denote the
Bloomberg screen folder name accessed by using the EQS
<GO> option from the Bloomberg terminal. This argument is optional. When using this argument,
stype cannot be set to 'PRIVATE' for customized
screen names.
Data Types: char | string
ov — Bloomberg override field values cell array
Bloomberg override field values, specified as an
n-by-2 cell array. The first column of the cell
array is the override field. The second column is the override value.
d — Equity screening data cell array (default) | structure | table
Equity screening data, returned as a cell array, structure, or table. The data type
of the equity screening data depends on the DataReturnFormat property of the connection object.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.