Datafeed Toolbox | ![]() ![]() |
Syntax
data = fetch(Connect, 'Security') data = fetch(Connect, 'Security', 'HEADER
', 'Flag'
) data = fetch(Connect, 'Security', 'GETDATA
', 'Fields
') data = fetch(Connect, 'Security', 'TICKS
') data = fetch(Connect, 'Security', 'TIMESERIES
', 'Date') data = fetch(Connect, 'Security', 'HISTORY
', 'Field', 'FromDate', 'ToDate') ticker = fetch(Connect, 'SearchString', 'LOOKUP
', 'Market'
)
Arguments
Connect |
Bloomberg connection object created with the bloomberg command. |
Security |
A MATLAB string containing the name of a security in a format recognizable by the Bloomberg server. (Note: For header data only, Security may be a cell array of strings containing a list of securities.) |
|
A MATLAB string indicating the dates from which data is to be retrieved. Possible values are:DEFAULT : Data from most recent bid, ask, or trade. If a Flag value is not specified, 'DEFAULT' is assumed.TODAY : Today's data only.ENHANCED : Data from most recent date of each individual field. |
|
A MATLAB string or cell array of strings indicating specific fields for which data is to be provided. Valid field names are in the file @bloomberg/bbfields.mat . The variable bbfieldnames contains the list of field names. |
Date |
Date string or serial date number indicating date for the time series. Specify now for today's time series data. |
FromDate |
Beginning date for historical data. |
ToDate |
End date for historical data. |
Market |
A MATLAB string indicating the market in which a particular security trades. Market values are:Comdty (Commodities)Corp (Corporate bonds)Curncy (Currencies)Equity (Equities)Govt (Government bonds)Index (Indexes)M-Mkt (Money Market securities)Mtge (Mortgage-backed securities)Muni (Municipal bonds)Pfd (Preferred stocks) |
Description
For a given security, fetch
returns header (default), field, time series, and historical data via the Bloomberg connection
data = fetch(Connect, 'Security')
fills the header fields with data from the most recent date with a bid, ask, or trade.
data = fetch(Connect, 'Security', '
returns data based upon the value of HEADER
', 'Flag'
)
Flag
.
Flag
is DEFAULT
, fetch
fills the header fields with data from the most recent date with a bid, ask, or trade. (This is the equivalent of data = fetch(Connect, Security)).
Flag
is TODAY
, fetch
returns the header field data with data from today only.
Flag
is ENHANCED
, fetch returns the header field data for the most recent date of each individual field. In this case, for example, the bid and ask group fields could come from different dates.
data = fetch(Connect, 'Security', '
returns the data for the specified fields of the indicated security. GETDATA
', 'Fields
')
data = fetch(Connect, 'Security', '
returns today's tick data.TICKS
')
data = fetch(Connect, 'Security', '
returns the tick data for a security for the specified date. For today's tick data, specifyTIMESERIES
', 'Date')
data = fetch(Connect, 'Security','TIMESERIES'
, now) data = fetch(Connect, 'Security', 'TICKS
') is an equivalent command.
data = fetch(Connect, 'Security', '
returns historical data for the specified field for the date range FromDate to ToDate. HISTORY
', 'Field', 'FromDate',
ToDate)
ticker = fetch(Connect, 'SearchString', '
uses LOOKUP
', 'Market'
)
SearchString
to find the ticker symbol for a security trading in a designated market. The output ticker
is a column vector of possible ticker values.
Examples
For a United States equity with ticker ABC:
returns the opening and closing prices.
returns the closing price for the given dates.
See Also
bloomberg
, close
, get
, isconnection
![]() | close | get | ![]() |