TimeSeriesResample

TimeSeriesResample[tseries]

uniformly resamples tseries according to its minimum time increment.

TimeSeriesResample[tseries,rspec]

resamples tseries according to rspec.

Details and Options

  • TimeSeriesResample is often used to convert irregular time series to regular ones. It can also be used to align time series.
  • The time series tseries can be a list of values {x1,x2,}, a list of time-value pairs {{t1,x1},{t2,x2},}, a TimeSeries, an EventSeries, or TemporalData.
  • Some basic settings for rspec include:
  • dtuse uniform times with spacing dt
    {t_(0),t_(1),dt}use times t0 to t1 with spacing dt
    {{t1,t2,}}use explicit times {t1,t2,}
  • If dt is set to Automatic, the minimum time increment in tseries is used.
  • The following settings for rspec are useful if tseries contains multiple paths:
  • "Union"use all times present in tseries
    "Intersection"use times common to all paths
    {"Times",p}use times from path p
  • If times are not given, then tseries is assumed to be regular with unit spacing.
  • TimeSeriesResample takes the following option:
  • ResamplingMethodAutomaticthe method to use for resampling paths
    CalendarType"Gregorian"the calendar system to interpret the dates
    HolidayCalendar{"UnitedStates","Default"}the holiday calendar schedule for business days
    TimeZoneAutomaticthe time zone specification for dates

Examples

open allclose all

Basic Examples  (1)

Resample an irregular time series:

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

The resampled time series is now regularly sampled:

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

Scope  (13)

Options  (6)

Applications  (5)

Possible Issues  (1)

See Also

MovingMap  TimeSeriesAggregate  TimeSeriesThread  RegularlySampledQ  MinimumTimeIncrement  TimeSeriesShift  TimeSeriesRescale  TimeSeriesMap  TimeSeriesMapThread  TimeSeriesInsert  TimeSeriesModelFit  TimeSeriesWindow  TemporalData  TimeSeries  EventSeries  ResamplingMethod

Introduced in 2014
(10.0)