I have some stock market price data organized as follows in a structure:
struct PriceInfo
{
string Date;
unsigned int Time;
double Open;
double High;
double Low;
double Close;
unsigned int Volume;
};
This struct organizes price data per interval of date and interval of time, where time is measured in minutes. So for instance, minute data would look like this:
121009 930 2100 2200 2075 2150 10000
121009 931 ....
121009 932
Where 930 is 9:30 am and 121009 Dec 10th 2009. A whole day's worth of data, measured in 1min intervals, runs from 930 to 1614 pm. The data file I have contains years+ of data and my first project is to be able to do analysis on individual days, such as on the price data for 12/10/09 only or for a range of days, such as 12/10/09 to 3/03/11.
One way to organize the data is to do a simple std::vector <PriceInfo>
where we create a vector of objects.
But my question is, what's the most intuitive container to use with data organized as such to create individual day containers to analyze? Is there anything else other than say a map
that can allow one to do things like searching and retrieving, while controlling for the date and time?
Thanks,
TR