Main Content

timeseries

Request timeseries data from Refinitiv DataScope Select

Since R2023a

    Description

    d = timeseries(c,sec,fields,startdate,enddate) returns timeseries data using:

    • DataScope Select object created by the datascopeSelect function

    • Refinitiv™ security list information (for example, Reuters® Instrument Codes, or RICs)

    • Refinitiv fields

    • Start date of the date range

    • End date of the date range

    example

    Examples

    collapse all

    Use a DataScope Select connection to retrieve timeseries data for one security.

    Create a Refinitiv DataScope Select connection by using a username and password. The appearance of the connection object c in the MATLAB® workspace indicates a successful connection.

    c = datascopeSelect("username","password")

    Retrieve timeseries data for the ABDE.O security. Using the timeseries function, retrieve the ask price for the past five days.

    sec = ["ABDE.O","Ric"];
    fields = ["Ask Price"];
    startdate = datetime("yesterday")-5;
    enddate = datetime("today");
    d = timeseries(c,sec,fields,startdate,enddate)
        d =
      
      5x3 table
      
        IdentifierType    Identifier    Ask Price
        ______________    __________    ________
      
           {'Ric'}        {'ABDE.O'}     167.59 
           {'Ric'}        {'ABDE.O'}     167.24 
           {'Ric'}        {'ABDE.O'}     167.66 
           {'Ric'}        {'ABDE.O'}     170.13 
           {'Ric'}        {'ABDE.O'}     163.66

    Input Arguments

    collapse all

    Refinitiv DataScope Select connection, specified as a connection object created with datascopeSelect.

    Security, specified as an N-by-2 string array or cell array of character vectors. The first column of the string array or cell array identifies the security. The second column identifies the type of security (for example, Reuters Instrument Code, or RIC).

    Example: ["IBM.N","Ric"]

    Fields, specified as a string array or cell array of character vectors. You can search for fields in MyRefinitiv.

    Example: ["Ask Price","Previous Close Price"]

    Start date of the date range, specified as a datetime array, string scalar, character vector, or numeric scalar.

    Example: datetime("yesterday")

    Data Types: double | char | string | datetime

    End date of the date range, specified as a datetime array, string scalar, character vector, or numeric scalar.

    Example: datetime("today")

    Data Types: double | char | string | datetime

    Output Arguments

    collapse all

    Timeseries data, returned as a table with these variables:

    • IdentifierType

    • Identifier

    • Field names, specified in the fields input argument

    Version History

    Introduced in R2023a