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.

Retrieve Current and Historical Data Using Thomson Reuters

This example shows how to connect to the Reuters® Market Data System (RMDS) and retrieve current and historical Thomson Reuters™ market data. Before connecting to Thomson Reuters, configure the RMDS connections. For details, see Configuring Reuters Market Data System Connections.

Connect to Thomson Reuters

Connect to Thomson Reuters using a delayed connection specified by 'dIDN_RDF'. This connection type lets you retrieve current data.

c = reuters('myNS::remoteSession','dIDN_RDF');

Retrieve Current Data

Retrieve current data for Google®.

sec = 'GOOG.O';

d = fetch(c,sec)
d = 

    PROD_PERM: 74.00
    RDNDISPLAY: 66.00
    DSPLY_NAME: 'DELAYED-15GOOGLE'
    ...

d contains a large number of Thomson Reuters market data fields. This output shows the product permissions information, PROD_PERM, the display information for the IDN terminal device, RDNDISPLAY, and the expanded name for the instrument, DSPLY_NAME. sec contains the Thomson Reuters security name for Google.

Close the Thomson Reuters connection.

close(c)

Retrieve Historical Data

Connect to Thomson Reuters using a connection that is not delayed as specified by 'IDN_RDF'. This connection type lets you retrieve historical data.

c = reuters('myNS::remoteSession','IDN_RDF');

Retrieve monthly market data from June 1, 2012 through December 31, 2012 for Google.

fromdate = '06/01/2012'; % beginning of date range for historical data 
todate = '12/31/2012'; % ending of date range for historical data 
period = 'm'; % monthly period for data

d = history(c,sec,fromdate,todate,period)
d = 

         DATE: [7x1 double]
        CLOSE: [7x1 double]
         OPEN: [7x1 double]
         HIGH: [7x1 double]
          LOW: [7x1 double]
       VOLUME: [7x1 double]
         VWAP: [7x1 double]
    BLOCK_VOL: [7x1 double]
          ASK: [7x1 double]
          BID: [7x1 double]

d is a structure with the following fields:

  • Date

  • Closing price

  • Open price

  • High price

  • Low price

  • Volume

  • Volume weighted average price (VWAP)

  • Block volume

  • Ask price

  • Bid price

For this example, the structure fields contain market data from June through December.

Display the open price.

d.OPEN
ans =

        702.24
        679.50
        759.05
        ...

Close the Thomson Reuters Connection

close(c)

See Also

| | |

Was this topic helpful?