Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Stock Quote Order Level Book (http://www.velocityreviews.com/forums/t450363-stock-quote-order-level-book.html)

Lorn 12-08-2005 03:04 AM

Stock Quote Order Level Book
 
I'm going to be attempting my most challenging programming task to date
and was wondering if I could get some input on what would be the most
efficient way of working with stock price quote data for an entire
order book. I'm working with a raw text data stream that delivers
quotes in realtime for each price level with the quantity of shares,
the ID of the exchange that is honoring the quote, and the side of the
market it is on. For instance, a typical feed might look something like
this:

Symbol, Side, Price, Shares, ID

XYZ, S, 33.02, 100, ARCA
XYZ, B, 33.01, 200, NYSE
XYZ, B, 33, 1000, NYSE
XYZ, S, 33.02, 0, ARCA

A quote is deemed as having been removed from the book when a share
size of 0 is received, as in the last quote received above.

I'd like to have the data sorted into two containers (bidSide and
askSide) by price into an order book in realtime... but I'm having a
difficult time deciding on the best way to do this due to the fact that
it should be the most efficient design possible regarding speed. If
anyone has some experience with this type of data or could suggest a
possible route (lists, maps, or, etc.?), it would be hugely appreicated
as I'm definitely taking on a bit more than I can chew.

Many thanks,
Lorn Davies


Artie Gold 12-08-2005 04:51 AM

Re: Stock Quote Order Level Book
 
Lorn wrote:
> I'm going to be attempting my most challenging programming task to date
> and was wondering if I could get some input on what would be the most
> efficient way of working with stock price quote data for an entire
> order book. I'm working with a raw text data stream that delivers
> quotes in realtime for each price level with the quantity of shares,
> the ID of the exchange that is honoring the quote, and the side of the
> market it is on. For instance, a typical feed might look something like
> this:
>
> Symbol, Side, Price, Shares, ID
>
> XYZ, S, 33.02, 100, ARCA
> XYZ, B, 33.01, 200, NYSE
> XYZ, B, 33, 1000, NYSE
> XYZ, S, 33.02, 0, ARCA
>
> A quote is deemed as having been removed from the book when a share
> size of 0 is received, as in the last quote received above.
>
> I'd like to have the data sorted into two containers (bidSide and
> askSide) by price into an order book in realtime... but I'm having a
> difficult time deciding on the best way to do this due to the fact that
> it should be the most efficient design possible regarding speed. If
> anyone has some experience with this type of data or could suggest a
> possible route (lists, maps, or, etc.?), it would be hugely appreicated
> as I'm definitely taking on a bit more than I can chew.
>
> Many thanks,
> Lorn Davies
>


1. Since you don't have a question about C++ /per se/ posting in
news:comp.programming would be vastly more appropriate.

2. Given your description above, what happens if there are multiple
orders for the same price on the same exchange -- and *one* (no way to
know which one, eh?) gets zeroed out?

3. This is homework, isn't it?

4. Look up `priority queue'. GIYF.

HTH,
--ag
--
Artie Gold -- Austin, Texas
http://goldsays.blogspot.com (new post 8/5)
http://www.cafepress.com/goldsays
"If you have nothing to hide, you're not trying!"


All times are GMT. The time now is 05:06 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.