Update to the Thomson Reuters Tick History API for R

We have released an update to the TRTH API for R package. This update adds additional functionality to the submitRequest and submitFTPRequest functions where it is now possible to submit and display requests in Local time. Previously this was only available in GMT.

Please contact us if you would like the updated install file and any additional information.

Market Capitalisation in Thomson Reuters Tick History

There is no direct field in TRTH for market capitalisation however it’s still possible to retrieve this using a simple two-step process.

Once you’ve populated your instrument list, under the fields tab and Corporate Actions message type, select the field Default Share Type > Thousands of Shares. This will give you the field for number of shares outstanding. You can use this along with last prices to calculate market cap figures. It will be required to retrieve two separate requests for the different Message Types, one for shares outstanding and one for last prices.

TRTH API for “R”

Sirca is pleased to announce the beta release of the TRTH API package for the open source programming language “R”.  This is an exclusive release only available to our academic user base. The package allows Tick History users to directly import data from within R.

Users must first create a TH credential object in R to authenticate with the TH services.  The credential object is created using the createCredential function. Once you have established a session with the Tick History service you can use it for later requests.

In a similar fashion to MATLAB, the TRTH API R package lets user import data in two ways.  The simplest way to import data into R is by using the submitRequest function, but only use this if you are intending to request single day, single RIC.  It is also possible to request larger requests using the submitFTPRequest function.  The latter submits the request to the Tick History service for batch processing.

We have also implemented the expandChains function, so that it is possible to expand chain RICs within R.  The function is very simple to use, you only need provide the credential object, the chain RIC and the date and time.

If you are interested to find out more about the package, e.g features, functionalities and installation instructions please contact us.

Consolidated Instruments / Tick History

Consolidated instruments, also known as composites, refer to a set of Thomson Reuters instruments that update with a message stream from multiple sources or data streams, so that all trades and the best available quotes across the multiple sources, are condensed into a single stream. These sources typically include the primary exchange or market as well as the set of regional or ECN (Electronic Communication Network) markets (often referred to as the secondary market) where the instrument trades domestically. An example of a similar service, outside Thomson Reuters, is the Option Price Reporting Authority (OPRA), which consolidates option contracts on participating exchanges.

In the USA, the primary exchanges or markets are:
  • NYSE
  • NYSE Amex
  • NYSE Arca
  • NASDAQ
The set of regional or secondary markets are:

  • OMX BX
  • National SE
  • Chicago SE
  • Third Market Corp
  • OMX PSX
  • International Securities Exchange
  • FINRA
  • BATS Trading Inc
  • Direct Exchange Holdings EDGX
  • Direct Exchange Holding EDGA
  • Chicago Board Option Exchange

Instruments that are listed on one of the primary exchanges or markets: NYSE, NYSE Amex or NYSE Arca, can trade on any of the regional exchanges, while instruments that are listed on NASDAQ can trade with Unlisted Trading Privileges (UTP) at any of the regional or secondary markets.

Stocks that trade on NYSE, NYSE Amex or NASDAQ markets are often referred to as “listed” stocks. Listed stocks cannot be traded on any of the other listed exchanges. NYSE Amex trades primarily in small-cap stocks, Exchange Traded Funds (ETFs) and derivatives, NYSE trades in medium to large cap stocks and funds, while NASDAQ trades primarily in technology listings of varying market capitalization.

For the primary NYSE exchanges, the consolidated instrument is always indicated as the ticker symbol without an exchange id; that is, the consolidated instrument ticker is either represented as 1, 2 or 3 letters. Where the instrument is a preference share, rights issue, unit issue, or “when_issued”, the consolidated instrument has the appropriate _p, _r, _u, or _w suffix appended, e.g. JP_p represents the consolidated preference share for JP Morgan.

Where more than 3 characters are used to describe the ticker symbol on the NYSE or NYSE Amex exchanges, the consolidated instrument is indicated with a .K exchange identifier suffix, e.g. QUAD.K is the consolidate instrument for QUAD.N trading on the NYSE (QUAD is the ticker symbol for Quad/Graphics Inc.). This convention is used so that the consolidated instrument will not conflict with a possible 4 character page-based code.

Assume GE.N is the symbol for General Electric trading on the primary NYSE exchange, General Electric can trade on the following exchanges:

  • NYSE – GE.N (primary listing)
  • OMX BX – GE.B
  • National SE – GE.C
  • Chicago SE – GE.MW
  • Third Market Corp – GE.TH
  • OMX PSX – GE.PH
  • NYSE Arca – GE.P
  • FINRA – GE.DF
  • BATS Trading Inc – GE.Z
  • Direct Exchange Holdings EDGX – GE.DG
  • Direct Exchange Holding EDGA – GE.DY
  • Chicago Board Option Exchange – GE.W
The consolidated instrument is GE.

The quote and trade message stream of the consolidated instrument includes the quote and trade message stream applicable to the primary and the regional exchanges or markets where the instrument trades.

Each quote message will indicate the exchange of origin for the quote via the Field Identifiers (FID) “BID_MMID1” or “ASK_MMID1” – these FIDs will update with the appropriate exchange IDs as follows:
  • NYSE – NYS
  • NYSE Amex – ASE
  • OMX BX – BOS
  • National SE – CIN
  • Chicago SE – MID
  • Third Market Corp – THM
  • OMX PSX – XPH
  • NYSE Arca – PSE
  • FINRA – ADF
  • BATS Trading Inc – BAT
  • BATS Y EXCHANGE – BTY
  • Direct Exchange Holdings EDGX – DEX
  • Direct Exchange Holding EDGA – DEA
  • Chicago Board Option Exchange – WCB
Each trade message will indicate the exchange of origin for the trade via the FID “IRGXID”.

Any message that is reported with the consolidated instrument is also reported with the applicable regional or ECN instrument, e.g. a message reported with the consolidated instrument GE with a trade venue of NYS will also be reported as a trade in the instrument GE.N; while a quote reported with GE as quote venue PSE, will also be reported as a Quote to the instrument GE.P.

Consolidated Instruments on NASDAQ

All consolidated instruments on NASDAQ have the exchange suffix .O. These instruments will update with the message stream of trading and quote activity on the NASDAQ exchange as well as regional exchanges and markets – commonly known as Unlisted Trading Privileges (UTP). For example, MSFT.O is the consolidated instrument for Microsoft Inc. trading on NASDAQ, MSFT.OQ represents the instrument trading on NASDAQ, while MSFT.DF, MSFT.A; MSFT.B, MSFT.C, MSFT.P, MSFT.Z, MSFT.DY, MSFT.DG, MSFT.ZY, MSFT.PH, MSFT.MW, MSFT.W, MSFT.P represent Microsoft Inc. trading UTP on a regional exchange or market.

Consolidated Instruments in Germany

In Germany, a consolidated instrument exists for all instruments trading on XETRA or the Frankfurt SE. The consolidated will include all quotes and trades for instruments trading on the primary or regional exchanges:
  • XETRA
  • Frankfurt
  • Stuttgart
  • Hamburg
  • Dusseldorf
  • Berlin
  • Munich
  • Hanover
The Consolidated instrument has the exchange id suffix code .DEU. The quote message of the consolidated instrument will indicate the exchange of origin for the quote via the FID “GV5_TEXT” – where the first 3 characters indicate the exchange of the Buyer and the last 3 characters indicate the exchange of the Seller, where the following IDs are applicable:
  • GER – Xetra
  • FRA – Frankfurt
  • BER – Berlin
  • DUS – Dusseldorf
  • HAM – Hamburg
  • HAN – Hanover
  • MUN – Munich
  • STU – Stuttgart
Similarly, for Trades, the venue is indicated by the FID “GV6_TEXT”.

Consolidated Instruments in Japan

In Japan, three sets of composite instruments exists:

  • Exchange ID: ”.J1” – includes on-board and off-board trading for TSE, TOSTNET and OSE J-NET, e.g. instruments with suffix codes: “.T”, “0.T” and “L.OS”
  • Exchange ID: “.J2” – includes off-board trading only for TOSTNET and OSE J-NET, e.g. instruments with suffix codes: “0.T” and “L.O”
  • Exchange ID: “ .J3” – includes on-board and off board trading for TSE, OSE, Nagoya, TOSTNET and OSE J-NET, e.g. instruments with suffix codes: “ .T”, “.OS”, “.NG”, “0.T” and “L.OS”
All off-board trades are indicates by the FID “STOCK_TYPE” containing the following values:

  • OL – TOSNET Single
  • OB – TOSNET Fixed
  • OF – TOSNET Basket
All on-board trades are indicated by the FID “TRDTONEA_1” containing the following values:
  • T – TSE sourced
  • O – OSE sourced
  • N – Nagoya sourced
Quote for composite instruments are not available.

Seamless Access to TRTH for MATLAB® Users

MathWorks® has built a package for MATLAB® to import data seamlessly from Thomson Reuters Tick History (TRTH) via our API. This package saves TRTH users from having to know any web service programming.

MATLAB® users have two ways to import data into MATLAB®: 1.) you can choose to import directly via the TRTH API or; 2.) import data downloaded from TRTH.

To use the TRTH API with MATLAB®, you must first create a rdth object in MATLAB® with your username and password. This will create and maintain a connection to the TRTH API service which will be used by other rdth functions later on.

The MATLAB® fetch command can be used to import data directly from the TRTH. This is equivalent to creating a preview in the TRTH user interface.

The fetch command is used in two ways. Firstly, it retrieves information on a security you provide. The other use is to retrieve data for a security and the message types you specify.

The fetch command is ideal for small requests (typically requests consisting of no more than 30,000 rows). For larger requests, the submitftp command is recommended. It submits an FTP pull request to TRTH, which downloads data into a file that you can later import into MATLAB® with the rdthloader command. This is the recommended approach for large requests.

Additional parameters can be set in rdthloader to customise an import, such as limiting the number of rows to import or selectively import data within a certain date range.

You can even poll the progress of a submitftp command from with MATLAB® so program execution can continue as soon as the data is available.

The reference manual and detailed examples for this package, are available from MathWorks®’s website here.

At last …. API access to Tick History for academic users!

By far the most common way currently for the academic community to access data from Thomson Reuters Tick History is via a web browser.

This requires a person to interact with a computer to set query parameters on a web page, execute a query and then download the results. Results can then be loaded into a software package for analysis and further processing. We see a wide range of packages such as Excel, SAS, Matlab, and R being used for this.

In order to make the process less labour intensive and more reliable, some users write software to automate the process. In order to do this, they need to be able to write code that accesses Tick History via a different interface called an Application Programming Interface (API). This allows a software developer to create tools to automatically download Tick History data and process it. As this is being done by software, it can be scheduled to run automatically. API access to Tick History has been available to commercial customers of Thomson Reuters Tick History for some time.
The good news is that Sirca has recently invested in new server infrastructure in order to allow access to the Tick History API for our Academic members. We should add that Sirca has also recently undertaken a substantial code optimisation effort. This has resulted in considerably faster execution of API queries – up to 40% faster than previously and 30% faster on average.

A note of caution for academic users however, a reasonable degree of programming ability is required to use the Tick History API. As this is a web service, a wide range of programming languages can be used.
Please get in touch with us if you need access to the Tick History API user documentation, or if you would like to talk about this in more detail. We will be progressively enabling API access to all of Sirca’s datasets over the next few months, we will keep you posted.

Short Sales / Short Selling

Short sales of equity is an area of increasing interest to academic researchers and we frequently receive requests for help with such data. End of day summary information on short sales data is available for several exchanges.Examples include,Australia(.AX), Hong Kong (.HK),Korea(.KQ),Taiwan(.TW),Thailand(.BK),India(.BO and .NS) andPoland(.WA).The access procedure is similar for each exchange but differs sometimes in the detail.In each case you need to use a RIC indicating you want short sale information.For .AX, .HK, .KQ and .TW that RIC contains a “stat” string.For example, BHPstat.AX specifies the end of day short sale summary for BHP.AX, 0001stat.HK identifies short sale data for 0001.HK and 000250stat.KQ corresponds to short sale data for 000250.KQ.The extra RIC string is slightly different for the other exchanges.It is “ss” for .BK, .BO and .NS and “s” for .WA.For example, ADVAss.BK, or AAAIss.NS, or ACPPs.WA. Notice these short sales RICs all contain a mixture of upper and lower case letters.Case is relevant for these RICs and must be entered correctly. Once the appropriate short sales RICs are correctly specified, you next need to select the correct data fields.These are the End of Day Message Type found under the Fields tab.Select them all and Preview a small data sample to see what is available.The range of populated fields varies from exchange to exchange but Volume is available from every exchange.Last is provided by .HK and .KQ. Short sales summary data is available too under the Time & Sales Message Type.If you choose this source then you will receive summary data as it was delivered to Thomson Reuters IDN service.That can be more than once per day.For instance, .HK has a morning and afternoon summary signal.Both are visible here.In order to see these you need to select a different range of fields.Time & Sales data has its own Short Sales category under the Transactions heading.Choose these to view the Time & Sales sourced “stat” data.A word of warning is warranted here though.The Time & Sales sourced data shows exactly when that data was received by Thomson Reuters.This could be a day after the interval it represents.For instance, if you compare Time & Sales Short Sales values with those obtained through the End of Day Message Type for BHPstat.AX you will see the Time & Sales data lags the End of Day data by one day.The End of Day data date has been reset to the interval to which it corresponds whereas the Time & Sales date shows when the summary was received.Naturally, that is after the interval ends. Information on individual short sales is also available, sometimes.The “stat”, “ss” and “s” RICs identify end-of-interval summary data but information for individual short sales can be found too, when it is reported.This last qualification is important because it seems many short sales are not reported on some exchanges.Nevertheless, when they are, they can be found by requesting data as normal, for example, BHP.AX, rather than BHPstat.AX, and by making use of the Qualifiers field under Trade Transactions.In the case of ASX listed equity, Qualifier fields containing SH[GV4_TEXT] indicate short sale trades.Qualifier codes for short sales could differ at other exchanges (see Where to get help for TRTH? for a link to more help on qualifier codes). SIRCA members have one final source for end of day net short sales summary data. That source is SIRCA’s Data Consult team.SIRCA members can submit a Data Consult request (see Sirca DataConsults for more details) to obtain the same End of Day summary data as described above for .AX, but over a longer interval.The oldest such data you source from TRTH begins with 11 June 2008.The Data Consult Team can source the same ASX data as far back as late 2001. SpeedGuide (see Speedguide Explained for help of using Speedguide) is another useful source for short sales information, either to discover instruments eligible for short selling, or to identify those that are restricted from short selling.The Speedguide page WORLD/NOSHORT01 gives RIC Chains (see What is a RIC Chain? for more on these) for various countries identifying short selling restrictions.WORLD/NOSHORT02 continues that listing and also provides RIC Chains for equity and bond securities inPoland that can be short sold.The Speedguide page ASIA-SHORTSELL gives RIC chains forIndia andThailand covering both stocks that are restricted and not restricted from short selling.Other Speedguide pages, like JK/FAQ, show stocks that are eligible for short selling.In the case of JK/FAQ, eligible stocks in Jakata are shown.