Monday, March 27, 2017

kdb schema idea for market depth from bid ask streams

select lUnixts:last unixts, vwap:siz wavg price, desc price, siz idesc price, siz by unixts, sym from lp where side=`BID

basically, for each timetamp, sym, there's a list of prices, the corresponding list of size, liquidity provider, etc.

see http://code.kx.com/wiki/Cookbook/ProgrammingIdioms#How_do_I_extract_regular-size_vwap_series.3F for explanation

FD whitepapers:

  1. http://code.kx.com/qref/wp/sample_aggregation_engine_for_market_depth.pdf
  2. http://code.kx.com/pages/db/DB_Order_Book_a_kdb+_Intra-Day_Storage_and_Access_Methodology.pdf

No comments:

Post a Comment