Message Boards Message Boards


Potential bug with TimeSeriesWindow and InfiniteFuture?

Posted 1 year ago
2 Replies
0 Total Likes

I've posted on SE, but it seems not have enjoyed any interest, while it may prove to be an important issue for users of TimeSeries functionality

I use Wolfram Mathematica 12.1 and want to subset a TimeSeries, but noticed that TimeSeriesWindow returns last observation even for range that does not intersect with the original TimeSeries.

Here is an example:

   TimeSeries[Transpose[{#, Range@(Length@#)}]],
   {{2022, 1, 1}, InfiniteFuture}] &@(DateRange[{2000, 1}, {2002, 
    1}, {1, "Month"}])

So intuitively this should return nothing as tmin is {2022, 1, 1} for TimeSeriesWindow, but the TimeSeries ends earlier at {2002, 1}.

But it does and returns TimeSeries[{{{2002,1},12.1}}].

While if I use something like {2100,12,1} instead of InfiniteFuture M will correctly return an error stating that there are no values.

So is it just me? Can you reproduce it? What am I doing wrong?

POSTED BY: Alex Isakov
2 Replies
Posted 1 year ago

It is really amazing how little time series issues are relevant to our community :/

POSTED BY: Alex Isakov

It does appear to be a bug. You should report the issue to Wolfram Support.

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract