Reconstructing and Viewing Order Book

347 views
Skip to first unread message

VA

unread,
Dec 1, 2016, 2:01:55 AM12/1/16
to Kdb+ Personal Developers
Greetings all, 

I am currently working on an order book reconstruction. I have a few ideas how to do it, but I am struggling to come up with an idea for how to actually view/chart it. Because it is a multidimensional table. 

For example, right now I am thinking of making a table like this: 

Price/Time 10:00 10:01 10:02
10 1 2 3
20 2 2
30 1 1 3

But, there are BID and ASK quantities and how exactly to table them and then view throughout time... no idea.


If I make the order book look like this: 

time Px time
5 4 3 2 1 0 1 2 3 4 5
88.68299 1 1 1 1 1
77.45233 5 5 5 5
67.93601 1 1
64.83352 3 3 3
52.72378
1 1 1 1 1 35.29648
1 1 1 1 32.2256
1 1 1 23.20569
2 2 1.197277

then I have no idea how to view it. Essentially, I do not have a solid plan on the structure of the resulting Orderbook just yet. 

Any ideas and suggestions would be very much appreciated, I think this is a very interesting problem. 

kuentang

unread,
Dec 1, 2016, 4:35:37 PM12/1/16
to Kdb+ Personal Developers

Please see attached. 


HTH,


Kim


This is indeed an old problem. See attached: 

VA

unread,
Dec 2, 2016, 11:41:43 AM12/2/16
to Kdb+ Personal Developers
Hi Kim, 

Thank you your response. 

This is the structure that I have come to have as well. Colour will bring the 3rd dimension. However, interestingly, according to your table, prices went up half-way through the period (and then at the end as well) despite being sold off. I would imagine if there was such a pressure on selling the priced would definitely go down, not up...? 

Kim Tang

unread,
Dec 2, 2016, 12:42:20 PM12/2/16
to personal...@googlegroups.com

There were two news release and both were positive. Now we can discuss how we can categorize a news J. Enjoy the next one. I still have two more but they are more complicated and need a deep understanding of micro structure of an orderbook.

 

Kim

 

--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbpl...@googlegroups.com.
To post to this group, send email to personal...@googlegroups.com.
Visit this group at https://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.

image002.png

VA

unread,
Dec 2, 2016, 3:03:16 PM12/2/16
to Kdb+ Personal Developers
Which software do you use for visualising the order book? And do please post two more screenshots! This is incredibly interesting.

VA

unread,
Dec 2, 2016, 3:11:17 PM12/2/16
to Kdb+ Personal Developers
And do your order books have market orders or just limit orders?
Reply all
Reply to author
Forward
0 new messages