TimeSeriesShift
TimeSeriesShift[tseries,shift]
shifts the time series tseries to the left or right according to shift.
Details and Options
- TimeSeriesShift is used to align the start of a time series with a particular time.
- The input 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.
- Settings for shift include:
-
τ shift by τ {k,step} shift k steps {{tmin}} set t1=tmin - The shift τ can be any real number or a time Quantity.
- For integer k, {k} is equivalent to giving {k,MinimumTimeIncrement[tseries]}.
- The step can be a number or date step such as "Year", "Month", "Day", etc.
- TimeSeriesShift threads over paths for multipath TemporalData.
- TimeSeriesShift takes the following options:
-
CalendarType "Gregorian" the calendar system to interpret the dates HolidayCalendar {"UnitedStates","Default"} the holiday calendar schedule for business days TimeZone Automatic the time zone specification for dates
Examples
open allclose allBasic Examples (3)
Scope (13)
Basic Uses (7)
Data Types (6)
Shift the times for a vector forward 2:
Shift the times for a series of time-value pairs backward by 2:
Shift the values from a TimeSeries forward by 10:
Shift the values of an EventSeries forward by 5:
Shift the paths of TemporalData ahead 10:
Options (3)
CalendarType (1)
HolidayCalendar (2)
Shift a time series by a business day using the default HolidayCalendar:
Applications (1)
Specify rates for TimeValue:
Note that the first time step must be 0 to define the initial rate. Shift the time series:
Possible Issues (2)
TimeSeriesShift may break temporal regularity:
The next day in Germany is not a business day:
Preserve temporal regularity by shifting by a business day:
Specifying a new HolidayCalendar overrides that option in the input:
Shift by one business day with the same HolidayCalendar:
Specify a new HolidayCalendar:
Text
Wolfram Research (2014), TimeSeriesShift, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeSeriesShift.html (updated 2017).
CMS
Wolfram Language. 2014. "TimeSeriesShift." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/TimeSeriesShift.html.
APA
Wolfram Language. (2014). TimeSeriesShift. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimeSeriesShift.html