TAQ data queries   

Chapter 3: Sample Queries

Tick query examples

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

TRADESIZE     INSTRUMENT_ID     RANKING
   254800               386           1
   242900               618           2
   241800               919           3
   239900               148           4
   234700               239           5
   234100               292           6
   230000               358           7
   225500               297           8
   225300               732           9
   223200               130          10

Query description: tick_qry6 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).

INSTRUMENT_ID      PER       PER_RANK
          781   0.4000000           1
          916   0.3333333           2
          581   0.2168674           3
          662   0.1739130           4
          620   0.0582524           5
          145   0.0535714           6
          703   0.0505050           7
          725   0.0458015           8
          323   0.0442477           9
          413   0.0388349          10




Copyright © 2005. Sybase Inc. All rights reserved.  

View this book as PDF