| Datafeed Toolbox™ | ![]() |
data = fetch(Connect, 'Security')
data = fetch(Connect, 'Security', 'Fields')
data = fetch(Connect, 'Security', 'Fields', 'Date')
data = fetch(Connect, Security, 'Fields', 'FromDate',
'ToDate')
data = fetch(Connect, Security, 'Fields', 'FromDate',
'ToDate', 'Period')
data = fetch(Connect, Security, 'Fields', 'FromDate',
'ToDate', 'Period, 'Currency')
| Connect | Thomson Datastream connection object created with the datastream function. |
| 'Security' | MATLAB® string containing the name of a security, or cell array of strings containing names of multiple securities. This data is in a format recognizable by the Thomson Datastream data server. |
| 'Fields' | (Optional) MATLAB string or cell array of strings indicating the data fields for which to retrieve data. |
| 'Date' | (Optional) MATLAB string indicating a specific calendar date for which you request data. |
| 'FromDate' | (Optional) Start date for historical data. |
| 'ToDate' | (Optional) End date for historical data. If you specify a value for 'ToDate', 'FromDate' cannot be an empty value. |
| 'Period' | (Optional) Period within a date range. Period values are:
|
| 'Currency' | (Optional) Currency in which the data is reported. |
Note You can enter the optional arguments 'Fields', 'FromDate', 'ToDate', 'Period', and 'Currency' as MATLAB strings or empty arrays ([ ]). |
data = fetch(Connect, 'Security') returns the default time series for the indicated security.
data = fetch(Connect, 'Security', 'Fields') returns data for the specified security and fields.
data = fetch(Connect, 'Security', 'Fields', 'Date') returns data for the specified security and fields on a particular date.
data = fetch(Connect, Security, 'Fields', 'FromDate', 'ToDate')returns data for the specified security and fields for the indicated date range.
data = fetch(Connect, Security, 'Fields', 'FromDate', 'ToDate', 'Period') returns instrument data for the given range with the indicated period.
data = fetch(Connect, Security, 'Fields', 'FromDate', 'ToDate', 'Period, 'Currency') additionally specifies the currency in which the data is reported.
Note The Datastream® interface returns all data as strings. For example, it returns Price data to the MATLAB workspace as a cell array of strings within the structure. There is no way to determine the data type from the Datastream interface. |
Return the trailing one-year price time series for the instrument 'P', which is the default value for the 'Fields' argument using the command:
data = fetch(Connect, 'ICI')
Or the command:
data = fetch(Connect, 'ICI', 'P')
Return the closing and opening prices for the instruments P and PO on the date September 1, 2007.
data = fetch(Connect, 'ICI', {'P', 'PO'}, '09/01/2007')Return the monthly closing and opening prices for the securities ICI and IBM from 09/01/2005 to 09/01/2007:
data = fetch(Connect, {'ICI', 'IBM'}, {'P', 'PO'}, ...
'09/01/2005', '09/01/2007', 'M')datastream.close, datastream, datastream.get, datastream.isconnection
![]() | datastream.close | datastream.get | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |