TAQ data tables include real-time price quotes and trade prices that are updated frequently during a trading day. Queries against these tables use intraday price and quote fluctuations.
The tick queries are representative of the query workloads generated in pre-trade analysis and trade order generation. Although this is a partial list of possible queries, these queries constitute a reasonable sample test for use in performance and tuning analysis and also as a template for building a library of queries. The sample TAQ queries can also be modified to build a native T-SQL access layer to present data to computational applications.
The TAQ data queries are optimized to run with the Risk Analytics Platform sample data in both VLDBServer and RAPCache databases.
The TAQ data queries for VLDBServer all begin with a commit statement.
This commit statement causes the data to refresh,
so the query accesses the most recent data. When you write your
own queries for VLDBServer, be sure to precede the query with a commit statement.
Script name |
Description |
---|---|
Get all ticks for a specified set of 100 securities for a specified three-hour time period on a specified trade date. |
|
Determine the volume-weighted price of a security considering only the ticks in a specified three-hour interval. |
|
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. |
|
Determine the top 10 most active stocks for a specified date, sorted by cumulative trade volume, by considering all trades. |
|
Find the most active stocks in the COMPUTER industry (use SIC code). |
|
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). |
An additional SQL script setup_tick_qry3_last_price.sql should be run on RAPCache at the end of
each trading day to capture the last price of that day. This data
is referenced by tick_qry3.sql.