Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

timeseries

RavenPack News Analytics intraday and historical data

Syntax

d = timeseries(c,symbol,{startdate,enddate})
d = timeseries(c,symbol,{startdate,enddate},fields)

Description

example

d = timeseries(c,symbol,{startdate,enddate}) retrieves RavenPack® News Analytics intraday or historical data. This function uses the RavenPack News Analytics connection c, RavenPack entitled symbol, and a date range between the start date startdate and end date enddate.

example

d = timeseries(c,symbol,{startdate,enddate},fields) retrieves RavenPack News Analytics intraday or historical data for specific RavenPack fields.

Examples

collapse all

Create a RavenPack News Analytics connection c using the user name username and password pwd.

c = ravenpack('username','pwd');

Retrieve RavenPack News Analytics data for the last 15 minutes. Here, the symbol is set to the entitled symbol (entity-scores :rpna-4.0-eqt). The start date is set to 15 minutes ago. The end date is the current date and time.

symbol = '(entity-scores :rpna-4.0-eqt)';
startdate = now-.01;
enddate = now;

d = timeseries(c,symbol,{startdate,enddate});

d is a table that contains the RavenPack News Analytics data.

Display the first four columns of the first record of intraday data.

d(1,1:4)
ans = 

       TIMESTAMP_UTC        RP_ENTITY_ID    ENTITY_TYPE     ENTITY_NAME 
    ____________________    ____________    ___________    _____________

    20-Jan-2015 15:52:30    '94A811'        'COMP'         'Novartis AG'

Each row in the table is one record of news data. Here, the first four columns specify a news event on January 20, 2015 about a company.

List the columns in the data.

d.Properties.VariableNames
ans = 

  Columns 1 through 4

    'TIMESTAMP_UTC'    'RP_ENTITY_ID'    'ENTITY_TYPE'    'ENTITY_NAME'

  Columns 5 through 8

    'POSITION_NAME'    'RP_POSITION_ID'    'COUNTRY_CODE'    'RELEVANCE'

  Columns 9 through 13

    'TOPIC'    'GROUP'    'TYPE'    'SUB_TYPE'    'PROPERTY'

  Columns 14 through 19

    'EVALUATION_METHOD'    'MATURITY'    'CATEGORY'    'ESS'    'AES'    'AEV'

  Columns 20 through 24

    'ENS'    'ENS_SIMILARITY_GAP'    'ENS_KEY'    'ENS_ELAPSED'    'G_ENS'

  Columns 25 through 27

    'G_ENS_SIMILARITY...'    'G_ENS_KEY'    'G_ENS_ELAPSED'

  Columns 28 through 31

    'EVENT_SIMILARITY...'    'NEWS_TYPE'    'SOURCE'    'RP_STORY_ID'

  Columns 32 through 35

    'RP_STORY_EVENT_I...'    'RP_STORY_EVENT_C...'    'PRODUCT_KEY'    'COMPANY'

  Columns 36 through 43

    'ISIN'    'CSS'    'NIP'    'PEQ'    'BEE'    'BMQ'    'BAM'    'BCA'

  Columns 44 through 46

    'BER'    'ANL_CHG'    'MCQ'

For details about each column in the table, see RavenPack News Analytics User Guide and Service Overview in the RavenPack Developer Zone Overview.

Close the RavenPack News Analytics connection.

close(c)

Create a RavenPack News Analytics connection c using the user name username and password pwd.

c = ravenpack('username','pwd');

Retrieve RavenPack News Analytics data for the last minute using RavenPack fields. Here, the symbol is set to the entitled symbol (entity-scores :rpna-4.0-eqt). The start date is set to a minute ago. The end date is the current date and time. The fields list contains these fields:

  • ENTITY_NAME

  • CATEGORY

  • SUB_TYPE

symbol = '(entity-scores :rpna-4.0-eqt)';
startdate = now-.001;
enddate = now;
fields = {'ENTITY_NAME','CATEGORY','SUB_TYPE'};

d = timeseries(c,symbol,{startdate,enddate},fields)
d = 

       TIMESTAMP_UTC                   ENTITY_NAME                CATEGORY    SUB_TYPE
    ____________________    __________________________________    ________    ________

    31-Dec-2014 18:18:39    'Ernst & Young LLP'                   []          []      
...

d is a table that contains RavenPack News Analytics data for the companies with news events. Each row in the table is a news event for a company.

Close the RavenPack News Analytics connection.

close(c)

Create a RavenPack News Analytics connection c using the user name username and password pwd.

c = ravenpack('username','pwd');

Retrieve RavenPack News Analytics data for the last day. Here, the symbol is set to the entitled symbol (entity-scores :rpna-4.0-eqt). The start date is set to 1 day ago. The end date is the current date and time.

symbol = '(entity-scores :rpna-4.0-eqt)';
startdate = now-1;
enddate = now;

d = timeseries(c,symbol,{startdate,enddate});

d is a table that contains the RavenPack News Analytics data.

To retrieve more than 3 days of historical news data, use the RavenPack News Analytics Data Feed Tool.

Display the first four columns of the first record of historical data.

d(1,1:4)
ans = 

       TIMESTAMP_UTC        RP_ENTITY_ID    ENTITY_TYPE              ENTITY_NAME          
    ____________________    ____________    ___________    _______________________________

    19-Jan-2015 16:21:00    'D5E3FF'        'COMP'         'Tekmira Pharmaceuticals Corp.'

Each row in the table is one record of news data. Here, the first four columns specify a news event on January 19, 2015 about a company.

List the columns in the data.

d.Properties.VariableNames
ans = 

  Columns 1 through 4

    'TIMESTAMP_UTC'    'RP_ENTITY_ID'    'ENTITY_TYPE'    'ENTITY_NAME'

  Columns 5 through 9

    'POSITION_NAME'    'RP_POSITION_ID'    'COUNTRY_CODE'    'RELEVANCE'    'TOPIC'

  Columns 10 through 14

    'GROUP'    'TYPE'    'SUB_TYPE'    'PROPERTY'    'EVALUATION_METHOD'

  Columns 15 through 20

    'MATURITY'    'CATEGORY'    'ESS'    'AES'    'AEV'    'ENS'

  Columns 21 through 24

    'ENS_SIMILARITY_GAP'    'ENS_KEY'    'ENS_ELAPSED'    'G_ENS'

  Columns 25 through 28

    'G_ENS_SIMILARITY...'    'G_ENS_KEY'    'G_ENS_ELAPSED'    'EVENT_SIMILARITY...'

  Columns 29 through 32

    'NEWS_TYPE'    'SOURCE'    'RP_STORY_ID'    'RP_STORY_EVENT_I...'

  Columns 33 through 38

    'RP_STORY_EVENT_C...'    'PRODUCT_KEY'    'COMPANY'    'ISIN'    'CSS'    'NIP'

  Columns 39 through 46

    'PEQ'    'BEE'    'BMQ'    'BAM'    'BCA'    'BER'    'ANL_CHG'    'MCQ'

For details about each column in the table, see RavenPack News Analytics User Guide and Service Overview in the RavenPack Developer Zone Overview.

Close the RavenPack News Analytics connection.

close(c)

Input Arguments

collapse all

RavenPack News Analytics connection, specified as a connection object created using ravenpack.

RavenPack entitled symbol, specified as a character vector, string scalar, or cell array with one character vector.

Data Types: char | cell | string

Start date, specified as a numeric scalar, character vector, string scalar, or datetime array to denote the start date of the date range for the returned news data.

Example: now-.01

Data Types: double | char | string | datetime

End date, specified as a numeric scalar, character vector, string scalar, or datetime array to denote the end date of the date range for the returned news data.

Example: now

Data Types: double | char | string | datetime

RavenPack fields list, specified as a character vector, string scalar, cell array of one or more character vectors, or string array. Each character vector corresponds to a RavenPack field. The fields determine the news data to return. For details about the fields, contact RavenPack.

Example: {'ENTITY_NAME','CATEGORY','SUB_TYPE'}

Data Types: char | cell | string

Output Arguments

collapse all

RavenPack News Analytics data, specified as a table.

Tips

  • Before creating a RavenPack News Analytics connection:

    • Start the RavenPack Data Gateway process.

    • Add the full path of the Data Gateway Client JAR file to the static or dynamic Java® class path.

    For details, see ravenpack.

  • If you encounter this error, decrease the date range using the input arguments startdate and enddate.

    Java exception occurred:
    com.ravenpack.data.DataGatewayException: TIMEOUT
    while invoking remote function:
    jl-api.getQuoteRange
    

Introduced in R2015b

Was this topic helpful?