Stock Quote Order Level Book

Discussion in 'C++' started by Lorn, Dec 8, 2005.

  1. Lorn

    Lorn Guest

    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
     
    Lorn, Dec 8, 2005
    #1
    1. Advertising

  2. Lorn

    Artie Gold Guest

    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!"
     
    Artie Gold, Dec 8, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. f
    Replies:
    6
    Views:
    541
  2. Replies:
    8
    Views:
    441
    Roland
    Jan 24, 2005
  3. savvy
    Replies:
    1
    Views:
    500
    Cowboy \(Gregory A. Beamer\)
    Jun 28, 2006
  4. Lorn
    Replies:
    0
    Views:
    479
  5. parvathi
    Replies:
    0
    Views:
    443
    parvathi
    Feb 3, 2009
Loading...

Share This Page