timeseries
Description
Examples
Retrieve Timeseries Data for One Security
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
c
— Refinitiv DataScope Select connection
connection object
Refinitiv DataScope Select connection, specified as a connection object created with
datascopeSelect
.
sec
— Security
string array | cell array of character vectors
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
— Fields
string array | cell array of character vectors
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"]
startdate
— Start date
datetime
array | string scalar | character vector | numeric scalar
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
enddate
— End date
datetime
array | string scalar | character vector | numeric scalar
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
d
— Timeseries data
table
Timeseries data, returned as a table with these variables:
IdentifierType
Identifier
Field names, specified in the
fields
input argument
Version History
Introduced in R2023a
See Also
Functions
External Websites
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)