| | |
Java Stock Trend Analysis Program :)
![]() |
Alright guys.. I'm back in the java forums for help/suggestions. I'm sure one of the Daniweb java programming geniuses will be able to decide if this idea is too difficult or needs to be revised.
I was thinking of writing a stock trend analysis program. There will be a stock object that contains an array of 10 doubles, each of which contain a dollar amount for the value of a specific stock. Every 6 seconds, a double is recorded from a quote streaming program provided by a broker. After all 10 doubles have been entered into the array (1 minute later), the program will evaluate the current angle of the slope, the curve's concavity, the integrated area of the curve between position 0 of the array and position 9. Based on this information, the stock is then sorted by whether or not it is a priority*, then by the angle of the slope.
Each object stock will contain:
int open- value at which the specific stock opened at
int volume- volume of the current traded shares of the day
int integrate- value of the integral from array position 0 to position 9
int slope- slope of the curve measured between positions 8 and 9 of the array.. this will be an angle between -90 degrees and 90 degrees.
String symbol- that specific stock's symbol
boolean priority- evaluates to true if the stock's concavity has just shifted, the value of position 9 in the array is less than the opening stock value, and if the slope is rising/falling depending on concavity.
On execution, the program will immediately retrieve information regarding every stock, (open, symbol), and saves every stock to an arraylist of stock objects
Next, the program will output everything to a graphical interface (probably a table)
Finally, the program will begin retrieving stock data from the broker, and update the table every minute.
What do yall think? I could easily write everything.. except the streamreader that communicates with the broker.. I have yet to discover how to do this.. The brokerage firm I use actually uses java for its instant quote streamer data, so hopefully that will make things less complicated.. but if you have any suggestions, know how to write a streamreader, or know of a program like this that has already been created then please post
I was thinking of writing a stock trend analysis program. There will be a stock object that contains an array of 10 doubles, each of which contain a dollar amount for the value of a specific stock. Every 6 seconds, a double is recorded from a quote streaming program provided by a broker. After all 10 doubles have been entered into the array (1 minute later), the program will evaluate the current angle of the slope, the curve's concavity, the integrated area of the curve between position 0 of the array and position 9. Based on this information, the stock is then sorted by whether or not it is a priority*, then by the angle of the slope.
Each object stock will contain:
int open- value at which the specific stock opened at
int volume- volume of the current traded shares of the day
int integrate- value of the integral from array position 0 to position 9
int slope- slope of the curve measured between positions 8 and 9 of the array.. this will be an angle between -90 degrees and 90 degrees.
String symbol- that specific stock's symbol
boolean priority- evaluates to true if the stock's concavity has just shifted, the value of position 9 in the array is less than the opening stock value, and if the slope is rising/falling depending on concavity.
On execution, the program will immediately retrieve information regarding every stock, (open, symbol), and saves every stock to an arraylist of stock objects
Next, the program will output everything to a graphical interface (probably a table)
Finally, the program will begin retrieving stock data from the broker, and update the table every minute.
What do yall think? I could easily write everything.. except the streamreader that communicates with the broker.. I have yet to discover how to do this.. The brokerage firm I use actually uses java for its instant quote streamer data, so hopefully that will make things less complicated.. but if you have any suggestions, know how to write a streamreader, or know of a program like this that has already been created then please post
>Next, the program will output everything to a graphical interface (probably a table)
would be nicer if you can give outout in form of graph with something like JGraph, maybe??? If so, you would like to keep your calculated values in DB (in case let say, in middle of the day system crash, you will only loose data which been currently processed and data send to you while recovering from crash)
I think I can be good exercise
would be nicer if you can give outout in form of graph with something like JGraph, maybe??? If so, you would like to keep your calculated values in DB (in case let say, in middle of the day system crash, you will only loose data which been currently processed and data send to you while recovering from crash)
I think I can be good exercise
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
thanks.. but from what I've read, I would have to know specifics about the program to invoke specific methods and such.. and I seriously doubt they will let me have a look at the source 
..but, I believe there is a way via secure http that I can access the information that I want.. I am currently looking into this, and it seems relatively easy..
if anyone finds out a way in which one can communicate with a java program w/out directly knowing its source code and methods, then please inform me. Thanks

..but, I believe there is a way via secure http that I can access the information that I want.. I am currently looking into this, and it seems relatively easy..
if anyone finds out a way in which one can communicate with a java program w/out directly knowing its source code and methods, then please inform me. Thanks
I could tell you a lot about that, but can't because of contractual obligations.
My work involves (among other things) maintaining a piece of software that generates analysis charts from streaming stockmarket information...
We use our own systems for capturing (which I don't maintain), filtering/retrieving from the database/stream (which I help maintain), and presenting (which I do maintain) the data.
It's far from a trivial task to do all that. Our software is maintained by a team of some 25 people fulltime, plus another dozen or so to maintain the database and hardware.
And that doesn't include the people sending us the information (stock exchanges, banks, investment firms, etc.).
We use JFreeChart (on the Java side, we also have .NET and C++ software) for charting, with some ten thousand lines of custom code to generate the data to be charted and customise the charts every which way.
I do hope you define "every stock" as "every stock from a list we're interested in"?
We DO have every stock (from the exchanges we capture, something like a hundred of them I think) and there's tens of thousands of the buggers.
Add options, futures, warrants, bonds, CDS, CDX, currency futures, etc. etc. and we are now working with roughly 2 million instruments.
The only way to talk to a Java program (or any program for that matter) is to know its public API (if it has one) and how to talk to it (RMI, SOAP, COM, etc. etc.).
For this kind of information that's almost certainly quite well hidden, and the public interface you see in that applet won't have any means to talk to it from software. It will in fact itself talk to another piece of software on their servers to retrieve the information over a secure channel, probably RMI or SOAP.
To give you an idea of the cost of that data:
We market our data at an initial price of several hundred dollars per workstation per year plus a flat fee of I think $1 per instrument per workstation per month.
Things are sold in packages (an instrument type for an exchange for example).
The money involved is tremendous. Deals can run into the hundreds of thousands of dollars, even millions of dollars, per year.
If you work for a company that has a business need to get the data, you'll be able to get budget to get the data legally.
If not you're likely going to have to resort to some simulated system instead, which would be good to have anyway for testing purposes so you can have predictable data for testing.
If you're serious about getting such data and can get the budget I may be able to bring you into contact with some of our account managers. But only if you're dead serious please, this business is no joke and me (and them) are busy enough as it is.
My work involves (among other things) maintaining a piece of software that generates analysis charts from streaming stockmarket information...
We use our own systems for capturing (which I don't maintain), filtering/retrieving from the database/stream (which I help maintain), and presenting (which I do maintain) the data.
It's far from a trivial task to do all that. Our software is maintained by a team of some 25 people fulltime, plus another dozen or so to maintain the database and hardware.
And that doesn't include the people sending us the information (stock exchanges, banks, investment firms, etc.).
We use JFreeChart (on the Java side, we also have .NET and C++ software) for charting, with some ten thousand lines of custom code to generate the data to be charted and customise the charts every which way.
I do hope you define "every stock" as "every stock from a list we're interested in"?
We DO have every stock (from the exchanges we capture, something like a hundred of them I think) and there's tens of thousands of the buggers.
Add options, futures, warrants, bonds, CDS, CDX, currency futures, etc. etc. and we are now working with roughly 2 million instruments.
The only way to talk to a Java program (or any program for that matter) is to know its public API (if it has one) and how to talk to it (RMI, SOAP, COM, etc. etc.).
For this kind of information that's almost certainly quite well hidden, and the public interface you see in that applet won't have any means to talk to it from software. It will in fact itself talk to another piece of software on their servers to retrieve the information over a secure channel, probably RMI or SOAP.
To give you an idea of the cost of that data:
We market our data at an initial price of several hundred dollars per workstation per year plus a flat fee of I think $1 per instrument per workstation per month.
Things are sold in packages (an instrument type for an exchange for example).
The money involved is tremendous. Deals can run into the hundreds of thousands of dollars, even millions of dollars, per year.
If you work for a company that has a business need to get the data, you'll be able to get budget to get the data legally.
If not you're likely going to have to resort to some simulated system instead, which would be good to have anyway for testing purposes so you can have predictable data for testing.
If you're serious about getting such data and can get the budget I may be able to bring you into contact with some of our account managers. But only if you're dead serious please, this business is no joke and me (and them) are busy enough as it is.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
•
•
I could tell you a lot about that, but can't because of contractual obligations.
My work involves (among other things) maintaining a piece of software that generates analysis charts from streaming stockmarket information...
We use our own systems for capturing (which I don't maintain), filtering/retrieving from the database/stream (which I help maintain), and presenting (which I do maintain) the data.
It's far from a trivial task to do all that. Our software is maintained by a team of some 25 people fulltime, plus another dozen or so to maintain the database and hardware.
And that doesn't include the people sending us the information (stock exchanges, banks, investment firms, etc.).
We use JFreeChart (on the Java side, we also have .NET and C++ software) for charting, with some ten thousand lines of custom code to generate the data to be charted and customise the charts every which way.
I do hope you define "every stock" as "every stock from a list we're interested in"?
We DO have every stock (from the exchanges we capture, something like a hundred of them I think) and there's tens of thousands of the buggers.
Add options, futures, warrants, bonds, CDS, CDX, currency futures, etc. etc. and we are now working with roughly 2 million instruments.
The only way to talk to a Java program (or any program for that matter) is to know its public API (if it has one) and how to talk to it (RMI, SOAP, COM, etc. etc.).
For this kind of information that's almost certainly quite well hidden, and the public interface you see in that applet won't have any means to talk to it from software. It will in fact itself talk to another piece of software on their servers to retrieve the information over a secure channel, probably RMI or SOAP.
To give you an idea of the cost of that data:
We market our data at an initial price of several hundred dollars per workstation per year plus a flat fee of I think $1 per instrument per workstation per month.
Things are sold in packages (an instrument type for an exchange for example).
The money involved is tremendous. Deals can run into the hundreds of thousands of dollars, even millions of dollars, per year.
If you work for a company that has a business need to get the data, you'll be able to get budget to get the data legally.
If not you're likely going to have to resort to some simulated system instead, which would be good to have anyway for testing purposes so you can have predictable data for testing.
If you're serious about getting such data and can get the budget I may be able to bring you into contact with some of our account managers. But only if you're dead serious please, this business is no joke and me (and them) are busy enough as it is.
By "every stock", I meant every single one that is traded daily (even the pink sheets). I planned on having a txt file with all the stock symbols on it, where a program would read them all in... however, if there are that many then perhaps I should limit myself.. I have no clue of how much ram and processor resources that this program will need..
hmm.. I found the URL that executes the java applets (there are actually 3-4 programs that open up simultaneously), and I found this code in the html:
Java Syntax (Toggle Plain Text)
<APPLET height=1 archive=scottraderv4_2_2.jar width=1 code="MainClassApplet.class">
And about your proposal, I'm simply some teen who is just 'discovering' the stock market.. so I don't wish to waste your time or your colleague's time either.. I just thought this program would help my trading strategies a bit.. but, if someone did want to obtain your software, about how much would it cost for the simplest form?
Last edited by joshSCH; Jun 10th, 2007 at 12:02 pm.
If this is just a simple and plain educational java project, I would suggest you not to think a lot about it. After all, the aim here is to learn and not to make a professional grade software. I assume you wouldn't have that kind of money to throw around.
Create a dummy 'stock broker' database which would be used pull out data. I am pretty sure the people who are to see this project don't expect you to connect to a real 'Stock broker' when you explain to them the constraints faced.
Other than that, its your call in the end.
Create a dummy 'stock broker' database which would be used pull out data. I am pretty sure the people who are to see this project don't expect you to connect to a real 'Stock broker' when you explain to them the constraints faced.
Other than that, its your call in the end.
I don't accept change; I don't deserve to live.
best would indeed be to make your own dummy dataset and present that.
If you feel interested you can make some sort of generator even that creates new data based on some trend information and previous values as a simulator, so it appears to have life data.
By having that pretty much external to your main system you can have it so that you could relatively easily create a connector to have your system talk to real datasources instead if and when you get access to them.
And no, you wouldn't have the money it takes as a student.
Even a small contract to supply once daily updates for a few hundred instruments could set you back $10K.
If you feel interested you can make some sort of generator even that creates new data based on some trend information and previous values as a simulator, so it appears to have life data.
By having that pretty much external to your main system you can have it so that you could relatively easily create a connector to have your system talk to real datasources instead if and when you get access to them.
And no, you wouldn't have the money it takes as a student.
Even a small contract to supply once daily updates for a few hundred instruments could set you back $10K.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Other Threads in the Java Forum
- Previous Thread: Quick Questions!
- Next Thread: Seeking help in Java Projects
| Thread Tools | Search this Thread |
-xlint add android api applet application array automation bank bi binary blackberry block bluetooth class clear client code compile compiler component database developmenthelp dice eclipse equation error event fractal functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image infinite int j2me j2seprojects java javac javame javaprojects jetbrains jni jpanel jtable julia learningresources lego linux mac main map method mobile myregfun netbeans notdisplaying number online openjavafx pearl problem program project qt scanner screen scrollbar server set singleton sms sort spamblocker sql sqlserver storm string superclass swing system textfields thread threads time title tree tutorial-sample update variablebinding windows xor






