Main Content

getBulkData

Bulk data with header information for彭博连接v3

Description

例子

d= getbulkdata(C,,,,s,,,,F返回字段的批量数据F对于安全列表s

例子

d= getbulkdata(C,,,,s,,,,F,,,,o,,,,ov使用覆盖字段返回批量数据owith corresponding override valuesov

例子

d= getbulkdata(C,,,,s,,,,F,,,,o,,,,ov,,,,姓名,,,,Valuereturns the bulk data with additional options specified by one or more name-value pair arguments for Bloomberg®请求设置。

例子

[[d,,,,] = getbulkdata(___另外返回安全列表使用上一个语法中的任何输入参数组合。

Examples

Collapse all

Create the Bloomberg connection.

C= blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博B-PIPE®使用bpipe

Return the dividend history for IBM®

安全='IBM我们的权益';Field ='dvd_hist';% Dividend history field[[d,,,,sec] = getbulkdata(c,security,field)
d= DVD_HIST: {{149x7 cell}} sec = 'IBM US Equity'

dis a structure with one field that contains a cell array with the returned bulk data.Contains the IBM security name.

通过访问结构字段,通过关联的标头信息显示股息历史记录DVD_HIST。该字段是一个包含一个单元格数组的单元格数组。嵌套的单元格阵列包含股息历史数据。使用单元格数组索引访问嵌套单元格的内容。

d.dvd_hist {1}
ANS =列1至6'声明日期''ex-date'记录日期''应付日期'股息金额'股息频率'[735536] [735544] [735546] [735546] [735578] [735578] [0.95] [0.95] [0.95]735445] [735453] [735455] [735487] [0.95]'季度'[735354] [735362] [735362] [735364] [735395] [735395] [735395] [0.95] [0.95] [0.95]'现金“常规现金” ...

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

Close the connection.

关闭(c)

Create the Bloomberg connection.

C= blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博B-PIPE使用bpipe

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

安全='IBM我们的权益';Field ='dvd_hist';% Dividend history field覆盖= {'DVD_START_DT',,,,'DVD_END_DT'};%股息开始和% End datesOverrideValues = {'20040101',,,,'20050101'};[[d,,,,sec] = getbulkdata(c,security,field,override,overridevalues)
d = dvd_hist:{{5x7 cell}} sec ='ibm us equity'

dis a structure with one field that contains a cell array with the returned bulk data.Contains the IBM security name.

通过访问结构字段,通过关联的标头信息显示股息历史记录DVD_HIST。该字段是一个包含一个单元格数组的单元格数组。嵌套的单元格阵列包含股息历史数据。使用单元格数组索引访问嵌套单元格的内容。

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.

关闭(c)

Create the Bloomberg connection.

C= blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或彭博B-PIPE使用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''true'

安全='IBM我们的权益';Fields = {'last_price',,,,'dvd_hist'};收盘价%和% Dividend history fields覆盖= {'DVD_START_DT',,,,'DVD_END_DT'};%股息开始和% End datesOverrideValues = {'20040101',,,,'20050101'};[d,sec] = getBulkdata(c,安全性,字段,覆盖,覆盖价,...'returnFormattedValue',真的)
d = dvd_hist:{{5x7 cell}} last_price:{'188.74'} sec ='ibm us equity'

d是一个具有两个字段的结构。第一个字段DVD_HIST包含带有股息历史数据作为单元格数组的单元阵列。第二个领域LAST_PRICEContains a cell array with the closing price as a character vector.Contains the IBM security name.

Display the closing price.

d。LAST_PRICE
ans = '188.74'

通过访问结构字段,通过关联的标头信息显示股息历史记录DVD_HIST。该字段是一个包含一个单元格数组的单元格数组。嵌套的单元格阵列包含股息历史数据。使用单元格数组索引访问嵌套单元格的内容。

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.

关闭(c)

Create a Bloomberg® connection, and then request dividend history data. ThegetBulkDataFunction returns data for dates as adatetimearray.

Create the Bloomberg connection.

C= blp;

Alternatively, you can connect to the Bloomberg Server usingblpsrv或使用彭博b-pipe®使用bpipe

Return data as a table by setting theDataReturnFormat连接对象的属性。If you do not set this property, thegetBulkData函数返回的数据结构。

返回日期datetime通过设置数组DatetimeType连接对象的属性。在这种情况下,该表包含变量中的日期datetime数组。

C。DataReturnFormat ='table';c.datetimetype ='约会时间';

Return the dividend history for IBM®.

s='IBM我们的权益';f ='dvd_hist';% Dividend history fieldd= getbulkdata(c,s,f);

Display the first three rows of the table.

d.dvd_hist {1}(1:3,:)
ans = 3×7 table DeclaredDate ExmDate RecordDate PayableDate DividendAmount DividendFrequency DividendType ____________________ ____________________ ____________________ ____________________ ______________ _________________ ______________ 31-Oct-2017 00:00:00 09-Nov-2017 00:00:00 10-Nov-2017 00:00:002017年12月9日00:00 1.5'季度'常规现金'25-Jul-2017 00:00:00:00:00 08-2017 00:00:00:00 10- aug-aug-2017 00:00:00:00:00 09--2017年9月00:00:00 1.5'季度'常规现金'25-APR-2017 00:00:00 08-May-2017 00:00:00:00 10月10日至2017年5月10日00:00:00 10-JUN-2017 00:00:00 1.5'季度“常规现金”

Display three declared dates. The宣布变量为adatetimearray.

d.dvd_hist {1} .declareddate(1:3)
ans = 3×1 datetime array 31-Oct-2017 00:00:00 25-Jul-2017 00:00:00 25-Apr-2017 00:00:00

Close the Bloomberg connection.

关闭(c)

Input Arguments

Collapse all

彭博Connection, specified as a connection object created usingblp,,,,blpsrv, 或者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|细绳

彭博数据字段,指定为字符向量,字符串标量,字符矢量的单元格数量或字符串数​​组。字符向量或字符串表示一个彭博数据字段名称。字符向量或字符串数​​组的单元格数组表示多个彭博数据字段名称。有关您可以指定的字段的详细信息,请参阅彭博API Developer’s Guide使用theWAPI option from the Bloomberg terminal.

Example:{'LAST_PRICE';'OPEN'}

Data Types:Char|Cell|细绳

彭博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彭博API Developer’s Guide使用theWAPI option from the Bloomberg terminal.

Example:'end_dt'

Data Types:Char|Cell|细绳

彭博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|细绳

名称值参数

Specify optional pairs of arguments asname1 = value1,...,namen = valuen,,,,where姓名是参数名称和Valueis the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

在R2021a之前,请使用逗号分隔每个名称和值,并附上姓名用引号。

Example:“ return formatratdvalue”,是真的

权利标识符,,,,specified as the comma-separated pair consisting of“ returneids'and a Boolean.true将权利标识符(EID)日期的名称和值添加到返回数据。

Data Types:逻辑

返回格式,,,,specified as the comma-separated pair consisting of'returnFormattedValue'and a Boolean.trueForces all data to be returned as the data type character vector.

Data Types:逻辑

日期时间格式,,,,specified as the comma-separated pair consisting of“使用量”and a Boolean.truereturns date and time values as Coordinated Universal Time (UTC) andFalsedefaults to the Bloombergtzdf settings of the requestor.

Data Types:逻辑

Latest reference data, specified as the comma-separated pair consisting of'forceddelay'and a Boolean.truereturns the latest data up to the delay period specified by the exchange for the security.

Data Types:逻辑

输出参数

Collapse all

彭博数据作为结构,表格或时间表返回。彭博数据的数据类型取决于DataReturnFormatandDatetimeTypeproperties of the connection object. For details about the data, see the彭博API Developer’s Guide使用theWAPI option from the Bloomberg terminal.

Security list, returned as a cell array of character vectors for the corresponding securities ins。内容的内容are identical in value and order tos。您可以使用以下任何标识符返回证券:

  • Buid

  • Cats

  • CINS

  • 常见的

  • 库西普

  • isin

  • sedol1

  • sedol2

  • sicovam

  • SVM

  • 股票行情自动收录器(default)

  • WPK

版本历史记录

Introduced in R2014b