Skip to content

Operators

Lag (), lead (), and shift-time (𝒯) operators in the time-series tradition. The shape characters are exported; ℬ!/ℒ! are in-place forms.

@example
using TimeseriesTools
x = Timeseries(1:5, 0.0:0.1:0.4)
ℬ(x)         # one-step lag

Reference

TimeseriesBase.Operators.ℬ Function
julia
(x, [n=1])

The backshift operator: a copy of x with its elements circularly shifted forward by n positions (default 1), so that ℬ(x)[i] == x[i-1]. See ℬ! for the in-place form, and , 𝒯.

source
TimeseriesBase.Operators.ℬ! Function
julia
ℬ!(x, [n=1])

In-place : circularly shift the elements of x forward by n positions (default 1).

source
TimeseriesBase.Operators.ℒ Function
julia
(x, [n=1])

The lead operator: a copy of x with its elements circularly shifted backward by n positions (default 1), so that ℒ(x)[i] == x[i+1]; the inverse of . See ℒ! for the in-place form.

source
TimeseriesBase.Operators.ℒ! Function
julia
ℒ!(x, [n=1])

In-place : circularly shift the elements of x backward by n positions (default 1).

source
TimeseriesBase.Operators.𝒯 Function
julia
𝒯(x, t)
𝒯(t)

The time-shift operator: translate the time index of x by t, returning a time series whose times are times(x) .+ t (the data is unchanged). The one-argument form 𝒯(t) returns a function that applies this shift.

See also , .

source