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 3188
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.progr amming 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!" This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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>
<title>Untitled Document</title>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859=
|
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 that runs down
the transaction table and modifies the 'master' stock level
accordingly. I've created an 'update query' and put in the
field. In the 'update to' slot I've got !
+ !
Running the query comes up with the message 'updating n records'...
|
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 understand it or
relate it to my data base.
I want to be able to say that some thing has been shipped in a sales
table and deduct the value from the instock value in my products table.
|
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 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...
|
by: Zarf |
last post by:
I search a book on how to program stock chart in vb net
thank you.
| |
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 system which will update the stock level one a customer pruchases an item in the product table, and then a warning message should appear when the stock reaches the re order level
do i create a new query for this or use the following below
below are my...
|
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 want a query that shows the companys details whenthe user has to type in the day of the week that the company delivers on. Can you help?
Also i have created 2 update querys to try an update my stock levels. However the way i have got it is that it...
|
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 – retail outlets.
The company works on a concession basis – i.e. the customers do not pay for the delivered goods but sell it on and then take a percentage of the sales. The goods delivered to the retailers can be considered to be “in stock” at the...
|
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 have solved this problem of stock calculation.
i need help for that too.
I am using vb express and MsAccess as database.
I am trying to write a query for the calculation of Stock.
My tables are as under:
PurchaseTable(PTId, PDate,ItemId,...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |