TAQ Data Query Script Files

Descriptions of the sample query script files.

The sample query script files are in:
  • <RAP Enablement Installation Directory>/databases/hana/queries
  • <RAP Enablement Installation Directory>/databases/ase/queries
  • <RAP Enablement Installation Directory>/databases/iq/queries
TAQ Data Query Script Descriptions

Script Name

Description

tick_qry1.sql

Get all ticks for a specified set of 100 securities for a specified three-hour time period on a specified trade date.

tick_qry2.sql

Determine the volume-weighted price of a security considering only the ticks in a specified three-hour interval.

tick_qry3.sql

Determine the top 10 percentage losers for the specified date on the specified exchanges, sorted by percentage loss. The loss is calculated as a percentage of the last trade price of the previous day.

Note: To capture the last price of a given day, run setup_tick_qry3_last_price.sql on the RAPCache database at the end of each trading day. This data is referenced by tick_qry3.sql

tick_qry4.sql

Determine the top 10 most active stocks for a specified date, sorted by cumulative trade volume, by considering all trades.

tick_qry5.sql

Find the most active stocks in the COMPUTER industry (use SIC code).

tick_qry6.sql

Find the 10 stocks with the highest percentage spreads. Spread is the difference between the last ask-price and the last bid-price. Percentage spread is calculated as a percentage of the bid-point price (average of ask and bid price).