[SciPy-dev] timeseries tdates.py
Pierre GM
pgmdevlist@gmail....
Mon Feb 12 18:29:50 CST 2007
> I am pretty excited about this package as i see it replacing FAME
> TimeIQ and my own hodgepodge stuff
That's the objective. Of course, we may very well be overly optimistic, but at
least that's what we're aiming at.
> > You can use datetime objects w/ the SVN timeseries package anyway.
>
> Cool. Could you give me an example??
Please check the TimeSeriesPackage page on the wiki. That should give you
plenty of examples. We haven't advertised the package yet as it's still
experimental. We were initially shooting for earlier this month, but keep
postponing, taking our sweet time and polishing things.
Anyway, for a more specific answer, if you have a list of dates as datetime
objects, you can transform them into our own DateArray, the class we're
handling data with, and use that as the date component of our TimeSeries
object.
> Of course it depends on the number of missing observations
> I've recently started to do some work with some intraday data so i
> probably need something faster
That sounds great ! We will definitely need your feedback.
> I am new to your timeseries library so i may be completely off base
> here.
> But rrule allows you to configure new/strange "frequencies" (at
> least the dates that should be in the calendar)
> For example many of the emerging stock markets trading only on
> tuesday, wednesday and friday
> How do i go about defining new frequencies? do i need to do so in C?
Well, yeah, that's definitely a problem at this point. We only
support 'regular' frequencies, such as daily, business daily, quarterly,
weekly... That's for conversion from one frequency to another. Note that gaps
in the data are accepted, so your time steps don't have to be regular. It's
of course better if they are, and we provide some functions to fill the gaps
with masked data, but that's not mandatory in most cases.
However, we focused on the easy access of the data. For your particular
example, you would need data on a business daily basis. Then, you could
easily retrieve the data corresponding to tuesday, wednesday and friday
through a condition such as:
dates = series._dates
condition = (dates.day_of_week==1) | (dates.day_of_week==2) |
(dates.day_of_week == 4)
newseries = series[condition]
> Anyway, keep up the good work
Thanks a lot
> PS. Have you seen the scipy 02 paper by Reggie Duggard ???
Nope, unfortunately, but I've been chatting a lot with him recently... Reggie
has been quite helpful i suggesting some ideas for a simplification of
maskedarray.
More information about the Scipy-dev
mailing list