Canonical `freq` strings
We use pandas to handle time-frequencies. However, some frequency names are just aliases, which are resolved to a canonical form, see:
-
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases
-
https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#anchored-offsets
For example Y (yearly) becomes A-DEC, since Y is just an alias for A (annual, end of year), and it is further resolved to specify the month. Similarly, AS (annual, start of year) is resolved as AS-JAN.
I would recommend that we only handle the canonical form in GluonTS and make sure that we convert it as soon as possible in all places.
To get the canonical form, we can use pandas.tseries.frequencies.to_offset.
And maybe we should avoid using freqstr at all.
In time_feature, we currently support these frequencies:
-
yearly
-
monthly
-
weekly
-
daily
-
hourly
-
minutely
I would propose to also add:
- secondly
- quarterly
The question is how we should support other frequencies and multiples of frequencies. For example, while 12M (12 months) is a valid frequency, A (annual) frequency should be used instead. In this case adding the month as a time-feature doesn't make much sense, while for 1M it does.
Is there a reason why quarterly and secondly are harder to implement than the others?
Hi @jaheba I also ran into freq issues when using time-series based on US business days. As you know, we have to construct DeepAREstimator (and other estimators) with freq string but what I really need is custom business day offsets. Otherwise, all the lags are shifted when using make_evaluation_predictions. Why not simply use offsets provided by pandas?
Hi,
I need to work on second and microsecond data. Is it possible in version 0.5 using the freq argument? Or is there a workaround?
Thanks,
Alex
Hi @jaheba,
I am trying to understand whether gluon-ts can address second and microsecond forecasting use cases. This is linked to my other question on #367.
Could you please confirm if this is possible or not?
Thanks,
Alex
@alexcombessie, I'm wondering about this myself.