| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Datafeed Toolbox |
| Contents | Index |
| Learn more about 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 fetch returns the data. |
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') also specifies the currency in which to report the data.
Note The Thomson 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
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |