cancel
Showing results for 
Search instead for 
Did you mean: 

Reconstructing and Viewing Order Book

VA
New Contributor
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. 
5 REPLIES 5

kuentang
New Contributor

Please see attached. 


HTH,


Kim


This is indeed an old problem. See attached: 


Am Donnerstag, 1. Dezember 2016 08:01:55 UTC+1 schrieb VA:
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. 

VA
New Contributor
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...? 


kuentang
New Contributor

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

 

 

 

 

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von VA
Gesendet: Freitag,
2. Dezember 2016 17:35
An: Kdb+ Personal Developers
Betreff: [personal kdb+] Re: Reconstructing and Viewing Order Book

 

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...? 

 

 


On Thursday, December 1, 2016 at 9:35:37 PM UTC, kuentang wrote:

Please see attached. 

 

HTH,

 

Kim

 

This is indeed an old problem. See attached: 



Am Donnerstag, 1. Dezember 2016 08:01:55 UTC+1 schrieb VA:

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. 

--
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-kdbplus+unsubscribe@googlegroups.com.
To post to this group, send email to personal-kdbplus@googlegroups.com.
Visit this group at https://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.

VA
New Contributor
Which software do you use for visualising the order book? And do please post two more screenshots! This is incredibly interesting.

VA
New Contributor
And do your order books have market orders or just limit orders?