Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getbulkdata

Bulk data with header information for Bloomberg connection V3

Syntax

d = getbulkdata(c,s,f)
d = getbulkdata(c,s,f,o,ov)
d = getbulkdata(c,s,f,o,ov,Name,Value)
[d,sec] = getbulkdata(___)

Description

example

d = getbulkdata(c,s,f) returns the bulk data for the fields f for the security list s.

example

d = getbulkdata(c,s,f,o,ov) returns the bulk data using the override fields o with corresponding override values ov.

example

d = getbulkdata(c,s,f,o,ov,Name,Value) returns the bulk data with additional options specified by one or more Name,Value pair arguments for additional Bloomberg® request settings.

example

[d,sec] = getbulkdata(___) additionally returns the security list sec using any of the input arguments in the previous syntaxes.

Examples

collapse all

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg B-PIPE® using bpipe.

Return the dividend history for IBM®.

security = 'IBM US Equity';
field = 'DVD_HIST'; % Dividend history field

[d,sec] = getbulkdata(c,security,field) 
d = 

    DVD_HIST: {{149x7 cell}}

sec = 

    'IBM US Equity'

d is a structure with one field that contains a cell array with the returned bulk data. sec contains the IBM security name.

Display the dividend history with the associated header information by accessing the structure field DVD_HIST. This field is a cell array that contains one cell array. The nested cell array contains the dividend history data. Access the contents of the nested cell using cell array indexing.

d.DVD_HIST{1}
ans = 

  Columns 1 through 6

    'Declared Date'    'Ex-Date'    'Record Date'    'Payable Date'    'Dividend Amount'    'Dividend Frequency'
    [       735536]    [ 735544]    [     735546]    [      735578]    [         0.95]      'Quarter'           
    [       735445]    [ 735453]    [     735455]    [      735487]    [         0.95]      'Quarter'           
    [       735354]    [ 735362]    [     735364]    [      735395]    [         0.95]      'Quarter'           
    ...

  Column 7

    'Dividend Type'
    'Regular Cash' 
    'Regular Cash' 
    'Regular Cash' 
    ...

The first row of the dividend history data is the header information that describes the contents of each column.

Close the connection.

close(c)

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg B-PIPE using bpipe.

Return the dividend history for IBM with dividend dates from January 1, 2004 through January 1, 2005.

security = 'IBM US Equity';
field = 'DVD_HIST';                        % Dividend history field
override = {'DVD_START_DT','DVD_END_DT'};  % Dividend start and 
                                           % End dates
overridevalues = {'20040101','20050101'};

[d,sec] = getbulkdata(c,security,field,override,overridevalues)
d = 

    DVD_HIST: {{5x7 cell}}

sec = 

    'IBM US Equity'

d is a structure with one field that contains a cell array with the returned bulk data. sec contains the IBM security name.

Display the dividend history with the associated header information by accessing the structure field DVD_HIST. This field is a cell array that contains one cell array. The nested cell array contains the dividend history data. Access the contents of the nested cell using cell array indexing.

d.DVD_HIST{1}
ans = 

  Columns 1 through 6

    'Declared Date'    'Ex-Date'    'Record Date'    'Payable Date'    'Dividend Amount'    'Dividend Frequency'
    [       732246]    [ 732259]    [     732261]    [      732291]    [         0.18]      'Quarter'           
    [       732155]    [ 732165]    [     732169]    [      732200]    [         0.18]      'Quarter'           
    [       732064]    [ 732073]    [     732077]    [      732108]    [         0.18]      'Quarter'           
    [       731973]    [ 731983]    [     731987]    [      732016]    [         0.16]      'Quarter'           

  Column 7

    'Dividend Type'
    'Regular Cash' 
    'Regular Cash' 
    'Regular Cash' 
    'Regular Cash'

The first row of the dividend history data is the header information that describes the contents of each column.

Close the connection.

close(c)

Create the Bloomberg connection.

c = blp;

Alternatively, you can connect to the Bloomberg Server using blpsrv or Bloomberg B-PIPE using bpipe.

Return the closing price and dividend history for IBM with dividend dates from January 1, 2004 through January 1, 2005. Specify the data return format as a character vector by setting the name-value pair argument 'returnFormattedValue' to 'true'.

security = 'IBM US Equity';
fields = {'LAST_PRICE','DVD_HIST'};        % Closing price and 
                                           % Dividend history fields
override = {'DVD_START_DT','DVD_END_DT'};  % Dividend start and 
                                           % End dates
overridevalues = {'20040101','20050101'};

[d,sec] = getbulkdata(c,security,fields,override,overridevalues,...
                      'returnFormattedValue',true)
d = 

      DVD_HIST: {{5x7 cell}}
    LAST_PRICE: {'188.74'}

sec = 

    'IBM US Equity'

d is a structure with two fields. The first field DVD_HIST contains a cell array with the dividend historical data as a cell array. The second field LAST_PRICE contains a cell array with the closing price as a character vector. sec contains the IBM security name.

Display the closing price.

d.LAST_PRICE
ans = 

    '188.74'

Display the dividend history with the associated header information by accessing the structure field DVD_HIST. This field is a cell array that contains one cell array. The nested cell array contains the dividend history data. Access the contents of the nested cell using cell array indexing.

d.DVD_HIST{1}
ans = 

  Columns 1 through 6

    'Declared Date'    'Ex-Date'    'Record Date'    'Payable Date'    'Dividend Amount'    'Dividend Frequency'
    [       732246]    [ 732259]    [     732261]    [      732291]    [         0.18]      'Quarter'           
    [       732155]    [ 732165]    [     732169]    [      732200]    [         0.18]      'Quarter'           
    [       732064]    [ 732073]    [     732077]    [      732108]    [         0.18]      'Quarter'           
    [       731973]    [ 731983]    [     731987]    [      732016]    [         0.16]      'Quarter'           

  Column 7

    'Dividend Type'
    'Regular Cash' 
    'Regular Cash' 
    'Regular Cash' 
    'Regular Cash'

The first row of the dividend history data is the header information that describes the contents of each column.

Close the connection.

close(c)

Input Arguments

collapse all

Bloomberg connection, specified as a connection object created using blp, blpsrv, or bpipe.

Security list, specified as a character vector or string scalar for one security or a cell array of character vectors or string array for multiple securities. You can specify the security by name or by CUSIP, and with or without the pricing source.

Data Types: char | cell | string

Bloomberg data fields, specified as a character vector, string scalar, cell array of character vectors, or string array. A character vector or string denotes one Bloomberg data field name. A cell array of character vectors or string array denotes multiple Bloomberg data field names. For details about the fields you can specify, see the Bloomberg API Developer’s Guide using the WAPI <GO> option from the Bloomberg terminal.

Example: {'LAST_PRICE';'OPEN'}

Data Types: char | cell | string

Bloomberg override field, specified as a character vector, string scalar, cell array of character vectors, or string array. A character vector or string denotes one Bloomberg override field name. A cell array of character vectors or string array denotes multiple Bloomberg override field names. For details about the fields you can specify, see the Bloomberg API Developer’s Guide using the WAPI <GO> option from the Bloomberg terminal.

Example: 'END_DT'

Data Types: char | cell | string

Bloomberg override field value, specified as a character vector, string scalar, cell array of character vectors, or string array. A character vector or string denotes one Bloomberg override field value. A cell array of character vectors or string array denotes multiple Bloomberg override field values. Use this field value to filter the Bloomberg data result set.

Example: '20100101'

Data Types: char | cell | string

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'returnFormattedValue',true

collapse all

Entitlement identifiers, specified as a Boolean. true adds a name and value for the entitlement identifier (EID) date to the return data.

Data Types: logical

Return format, specified as a Boolean. true forces all data to be returned as the data type character vector.

Data Types: logical

Date time format, specified as a Boolean. true returns date and time values as Coordinated Universal Time (UTC) and false defaults to the Bloomberg TZDF <GO> settings of the requestor.

Data Types: logical

Latest reference data, specified as a Boolean. true returns the latest data up to the delay period specified by the exchange for the security.

Data Types: logical

Output Arguments

collapse all

Bloomberg return data, returned as a structure with the Bloomberg data. For details about the returned data, see the Bloomberg API Developer’s Guide using the WAPI <GO> option from the Bloomberg terminal.

Security list, returned as a cell array of character vectors for the corresponding securities in s. The contents of sec are identical in value and order to s. You can return securities with any of the following identifiers:

  • buid

  • cats

  • cins

  • common

  • cusip

  • isin

  • sedol1

  • sedol2

  • sicovam

  • svm

  • ticker (default)

  • wpk

Introduced in R2014b

Was this topic helpful?