[Numpy-discussion] Question on timeseries, for financial application

Pierre GM pgmdevlist@gmail....
Sun Dec 13 02:31:06 CST 2009

On Dec 13, 2009, at 12:11 AM, Robert Ferrell wrote:
> Have you considered creating a TimeSeries for each data series, and  
> then putting them all together in a dict, keyed by symbol?

That's an idea

> One disadvantage of one big monster numpy array for all the series is  
> that not all series may have a full set of 1800 data points.  So the  
> array isn't really nicely rectangular.

Bah, there's adjust_endpoints to take care of that.

> Not sure exactly what kind of analysis you want to do, but grabbing a  
> series from a dict is quite fast.

Thomas, as robert F. pointed out, everything depends on the kind of analysis you want. If you want to normalize your series, having all of them in a big array is the best (plain array, not structured, so that you can apply .mean and .std directly without having to loop on the series). If you need to apply the same function over all the series, here again having a big ndarray is easiest. Give us an example of what you wanna do.

More information about the NumPy-Discussion mailing list