newbie - Handling Stock Data

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

I have some calculations I do on stock data using the date, open, hi,
low, close data for a period of time ie(month qtr year). I can perform
these calculations easily in excel. I would like to build a graphics
GDI+ app from this in C#. From a performance standpoint should I load
this data into excel and pull it into C# or should I perform the calcs
within C# (Array processing??)

Thanks in advance - Dan
 
You'll be blown away by this, hopefully you'll use it. I am a HUGE advocate
of these guys and an occasional beta tester. The performance, flexibility,
support, beauty - all top notch. It's a charting component that does
exactly what you're wanting to do, including automatic data binding to a SQL
db and the newest version even has a wizard to do the binding for you (nice
touch for SUPER fast getting off the ground)

http://www.dundas.com
http://www.dundas.com/charting/charthome/index.aspx?section=ChartHome&body=body.htm

Good luck
Craig

PS - It's not often I go out of my way to put in a plug for a 3rd party
component. These guys are just that good :)
 
Thanks but I have alot of custom stuff I need to do so I
will need to do it myself. An further ideas on
approach.... excel vs all native C#?

Thanks - Dan
 
I would go with native C#. I sounds like you are working on a stock
trading/predication system and C# will first most be faster since excel has
to parse each cell formula at runtime for each cell where C# can be compiled
and secondly you will have more abilities/functions available in C# that
will help you with import of raw stock history data and even consume online
quote providers.

Later on you can also use the C# solution to build into alerting mechanism
which are much harder to build in Excel.
 
Thanks Robert,

You are right...I am building a prediction system. Since
I am new to C# how would you recommend loading the
data..Into an array..and calculating the values there?

Thanks - Dan
 
Dan,

There are two issues here. The first is the processing of the data.
Excel might be a little too much overhead, as a previous poster explained,
the cell values have to be calculated. However, if it is easier to model
the calculations in excel, then it might be worth your time to use that, if
you can accept the speed.

The second part is the charting of the results. A previous poster
recommended a Dundas chart, which you said wouldn't work, because you have a
lot of custom stuff to do. You also mentioned you are doing a stock
trading/predication system. I think you neglected to look at the following
page, which seems to have images of the graphs that can be produced by the
component for exactly that type of system (watch for line wrap):

http://www.dundas.com/Charting/Gallery/Gallery.aspx?ImgGroup=Stock

I think that your best bet would be to do the calcs in C# (instead of
going out to Excel), and then use some sort of charting mechanism (Excel,
Dundas, whatever) to display what you want.

Hope this helps.
 
Back
Top