Finance
Finance| No Comments »Going to begin to write operators to read/process financial data. This link, points to some good raw data to start with.
Biggest issue so far, timestamps. I need a timestamp utility with usec granularity. The Boost stuff is all good, but it tries to be a bit too clever. I need time data that I can interpolate, use for calculations. The Boost stuff is too symbolic, as opposed to numerical.
gmtime seems to do the trick. I’m going to have to do some testing to see if I can initialize the structure and get the correct results. I’ll need that, plus another 16-bit short to count the milliseconds. The tick timestamps seem to have millisecond granularity. I think there are also methods for converting to different time zones, which could be very useful once we start dealing with exchanges in different time zones.
Looks like I already started a Time data type. It has the proper granulatiry, plus some numeric operators. If I can initialize it from an ascii date/time, I’m in business. ‘mktime’ is what I”m looking for….
I was able to get everything working by using the boost library stuff. I calculate the unix time myself, once I found the proper examples, the entire library fell into place. Timestamps are all good.
So I’ve added two new data types, ScalarArray, and ScalarArrayIn, for homogenous, and inHomogenous scalar arrays of data. The first two nodes will be a read operator, and a buffer type operator. Then a display node.
Got the timestamps fully working. Found a great reference here, that was very helpful in calibrating the timestamps, converting them from unix time, to boost::date_time, and back. Its solid now…


