TimeSeriesAggregate

TimeSeriesAggregate[tseries,dt]
computes the mean value of tseries over non-overlapping windows of width dt.

TimeSeriesAggregate[tseries,dt,f]
applies the function f to the values of tseries in non-overlapping windows of width dt.

DetailsDetails

  • TimeSeriesAggregate is often used in time series analysis to compute aggregated statistics like yearly averages or monthly totals.
  • TimeSeriesAggregate breaks the time series tseries into disjoint windows of equal width dt and applies a function f to the values in each segment.
  • If there are no values in a segment, the segment is ignored.
  • The time series tseries can be a list of values , a list of time-value pairs , a TimeSeries, EventSeries, or TemporalData.
  • The window width dt can be given as a positive number, a Quantity, or as a date increment.
  • The window specification can be used to determine the alignment of new times within each window.
  • Settings for window alignment align include Left, Center (default), and Right.
  • TimeSeriesAggregate threads pathwise for multipath TemporalData.

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Average successive pairs of values:

In[1]:=
Click for copyable input
Out[1]=

Compute the quarterly totals for a financial time series:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Aggregate multiple paths simultaneously:

In[1]:=
Click for copyable input

Average over blocks of width 0.15:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
Introduced in 2014
(10.0)