473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Dec 8 '05 #1
1 3180
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!"
Dec 8 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marion Slaughter | last post by:
----FA48570F00BB51C Content-Type: text/html; charset="iso-35B2-E" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>...
9
by: simon.harris | last post by:
I have a 'master' stock list with current stock levels (integer) and another table that contains transactions (i.e. item#, #items added/ removed, date, user etc). What I need is an update query...
4
by: peter | last post by:
In the sample northwind database when an order is sent the sent value come of the instock value. I can not work out how they have done this . I can see that it is an eventprocedure but can not...
0
by: Lorn | last post by:
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...
3
by: Zarf | last post by:
I search a book on how to program stock chart in vb net thank you.
37
by: panjap | last post by:
hello I am currently working on a project for college, based on a shop and have created querues which allow me to total up new customer orders however i am currently sruggling on how to create a...
1
by: baker951 | last post by:
I have a problem that some companies in my supplier table deliver on more than one day in a week, is it possible to add more than one value to a single field or do i need seperate fields. Also i...
1
by: asmusdk | last post by:
I am working on creating a stock management database for a small company. The company receives the merchandise from a handful of suppliers and stocks it before it is sent to the customers –...
40
by: sazd1 | last post by:
Hi Student2 I am working on similar kind of thing for stock calculation but could not find any solution to my problem even after putting my problem to different forums. I saw your post that you...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.