({{, (RefLink[ARMAProcess, paclet:ref/ARMAProcess])[{(Subscript[a, 1]),…,(Subscript[a, p])},{(Subscript[b, 1]),…,(Subscript[b, q])},v]
represents a weakly stationary autoregressive moving-average process with AR coefficients (Subscript[a, i]), MA coefficients (Subscript[b, j]), and normal white noise variance v.}, {, (RefLink[ARMAProcess, paclet:ref/ARMAProcess])[{(Subscript[a, 1]),…,(Subscript[a, p])},{(Subscript[b, 1]),…,(Subscript[b, q])},Σ]
represents a weakly stationary vector ARMA process with coefficient matrices (Subscript[a, i]) and (Subscript[b, j]) and covariance matrix Σ. }, {, (RefLink[ARMAProcess, paclet:ref/ARMAProcess])[{(Subscript[a, 1]),…,(Subscript[a, p])},{(Subscript[b, 1]),…,(Subscript[b, q])},v,init]
represents an ARMA process with initial data init. }, {, (RefLink[ARMAProcess, paclet:ref/ARMAProcess])[c,…]
represents an ARMA process with a constant c.}})

OpenersNotesSection(Spacer1)Details

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is also known as ARMA and VARMA (vector ARMA).

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a discrete-time and continuous-state random process.

The ARMA process is described by the difference equation (1-(Subscript[a, 1]) (Subscript[\[DiscreteShift], {t,-1}])-⋯-(Subscript[a, p]) (Subscript[\[DiscreteShift], {t,-p}])) y(t)==c+(1+(Subscript[b, 1]) (Subscript[\[DiscreteShift], {t,-1}])+⋯+(Subscript[b, q]) (Subscript[\[DiscreteShift], {t,-q}]))e(t) ,
where y(t) is the state output, e(t) is white noise input, \[DiscreteShift] is the shift operator, and the constant c is taken to be zero if not specified.

The initial data init can be given as a list {…,y[-2],y[-1]} or a single-path (RefLink[TemporalData, paclet:ref/TemporalData]) object with time stamps understood as {…,-2,-1}.

A scalar ARMA process should have real coefficients (Subscript[a, i]), (Subscript[b, j]), and c, and a positive variance v.

An n-dimensional vector ARMA process should have real coefficient matrices (Subscript[a, i]) and (Subscript[b, j]) of dimensions n×n, real vector c of length n, and the covariance matrix Σ should be symmetric positive definite of dimensions n×n.

The ARMA process with zero constant has transfer function g((z^(-1))) , where g(z) equals:

(RefLink[ARMAProcess, paclet:ref/ARMAProcess])[tproc,{p,q}] for a time series process tproc gives an ARMA process of orders p and q, such that its transfer function agrees with (RefLink[PadeApproximant, paclet:ref/PadeApproximant]) about zero with degrees {q,p} of the transfer function of tproc.

(RefLink[ARMAProcess, paclet:ref/ARMAProcess])[tproc] attempts to return an ARMA process such that its transfer function is the same as the one of tproc.

Possible time series processes tproc include (RefLink[ARProcess, paclet:ref/ARProcess]), (RefLink[SARMAProcess, paclet:ref/SARMAProcess]), and (RefLink[SARIMAProcess, paclet:ref/SARIMAProcess]).

(RefLink[ARMAProcess, paclet:ref/ARMAProcess])[p,q] represents an ARMA process of orders p and q for use in (RefLink[EstimatedProcess, paclet:ref/EstimatedProcess]) and related functions.

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) can be used with such functions as (RefLink[CovarianceFunction, paclet:ref/CovarianceFunction]), (RefLink[RandomFunction, paclet:ref/RandomFunction]), and (RefLink[TimeSeriesForecast, paclet:ref/TimeSeriesForecast]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (57)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Simulate an ARMA process:

sample=RandomFunction[ARMAProcess[1,{-.3,.1},{.4},1],{0,10^2}]

ListPlot[sample,Filling->Axis]

Covariance function:

CovarianceFunction[ARMAProcess[c,{a},{b},(σ^2)],s,t]

DiscretePlot3D[CovarianceFunction[ARMAProcess[{.7,-.4,.5},{1,.4},1.],s,t],{s,0,10},{t,0,10},ExtentSize->1/2,ColorFunction->"Rainbow"]

Correlation function:

DiscretePlot[CorrelationFunction[ARMAProcess[{.4,.2},{1,.1},1],h],{h,0,20},ExtentSize->1/2]

Partial correlation function:

DiscretePlot[PartialCorrelationFunction[ARMAProcess[{.4,.2},{1,.1},1],h],{h,1,20},ExtentSize->1/2]

OpenersExampleSection1(Spacer1)Scope  (38)

OpenersExampleSubsection0(Spacer1)Basic Uses  (11)

Simulate an ensemble of paths:

data=RandomFunction[ARMAProcess[1,{.5},{.2},1],{30},4]

ListLinePlot[data,Filling->Axis]

Simulate with given precision:

RandomFunction[ARMAProcess[1,{2/10,1/10},{2/7},1/10],{1,4},WorkingPrecision->20]["Path"]

Simulate a first-order scalar process:

sample[{a_,b_}]:=RandomFunction[ARMAProcess[{a},{b},.1],{1,10^2}];

Sample paths for positive and negative values of the parameter:

ListPlot[sample[#],Filling->Axis,PlotLabel->StringJoin["{a, b} = ",ToString[#]]]&/@{{-0.9,-0.9},{0.9,0.9}}

Simulate a weakly stationary process with given initial values:

sproc[x_]:=ARMAProcess[0,{.7},{.3},1,{x}];

pts={-4,0,4,8};

samples=Table[SeedRandom[4];RandomFunction[sproc[x],{30}],{x,pts}];

ListLinePlot[samples,DataRange->{0,12},PlotLegends->(StringJoin["x = ",ToString[#]]&/@pts)]

For a process with a trend, initial values influence the behavior of the whole path:

tproc[x_]:=ARMAProcess[0,{1.1},{.3},1,{x}];

tsamples=Table[SeedRandom[4];RandomFunction[tproc[x],{30}],{x,pts}];

ListLinePlot[tsamples,DataRange->{0,12},PlotLegends->(StringJoin["x = ",ToString[#]]&/@pts)]

Simulate a two-dimensional process:

α={{.2,.1},{-.3,.2}};
β={{.2,.5},{-.2,.9}};
Σ={{1,0},{0,.3}};
sample=RandomFunction[ARMAProcess[{α},{β},Σ],{1,10^2}];

Create a 2D sample path function from the data:

s=TimeSeries[sample,ResamplingMethod->Automatic];
f=s["PathFunction"];
g[t_?NumericQ]:=f[t]

The color of the path is the function of time:

ParametricPlot[g[t],{t,1,100},ColorFunction->Function[{x,y,t},(ColorData["BlueGreenYellow"][t])],PlotStyle->Thick,AspectRatio->1,AxesLabel->{x,y}]

Create a 3D sample path function with time:

gg[t_?NumericQ]:=Join[{t},f[t]]

The color of the path is the function of time:

ParametricPlot3D[gg[t],{t,1,100},ColorFunction->Function[{t,x,y},(ColorData["BlueGreenYellow"][t])],PlotStyle->Thick,BoxRatios->1,AxesLabel->{t,x,y}]

Simulate a three-dimensional process:

α={{.2,.1,.1},{-.3,.2,.1},{-.3,.2,-.1}};
β={{.2,.5,.1},{-.2,.9,.5},{.3,.1,-.4}};
Σ={{1,0,0},{0,.3,0},{0,0,.1}};
SeedRandom[4];sample=RandomFunction[ARMAProcess[{α},{β},Σ],{1,10^2}];

Create a sample path function from the data:

s=TimeSeries[sample,ResamplingMethod->Automatic];
f=s["PathFunction"];
g[t_?NumericQ]:=f[t]

The color of the path is the function of time:

ParametricPlot3D[g[t],{t,1,100},ColorFunction->Function[{x,y,z,t},(ColorData["BlueGreenYellow"][t])],PlotStyle->Thick,BoxRatios->1,AxesLabel->{x,y,z}]

Estimate parameters:

sample=RandomFunction[ARMAProcess[{.2},{.1},1],{1,10^3}];
eproc=EstimatedProcess[sample,ARMAProcess[1,1]]

Compare the sample covariance functions with the one of the estimated process:

Show[ListPlot[CovarianceFunction[sample,{8}],Filling->0,PlotStyle->PointSize[Medium]],DiscretePlot[CovarianceFunction[eproc,h],{h,0,8},ExtentSize->1/2]]

Use (RefLink[TimeSeriesModel, paclet:ref/TimeSeriesModel]) to automatically find orders:

TimeSeriesModelFit[sample,"ARMA"]

bestfit=%["BestFit"]

Compare the sample covariance functions with the best time series model:

Show[ListPlot[CovarianceFunction[sample,{8}],Filling->0,PlotStyle->PointSize[Medium]],DiscretePlot[CovarianceFunction[bestfit,h],{h,0,8},ExtentSize->1/2]]

Find maximum likelihood estimator:

proc=ARMAProcess[1,{.3},{.4},1];

SeedRandom[23];data=RandomFunction[proc,{100}];

Fix the constant and the variance and estimate the remaining parameters:

res=FindProcessParameters[data,ARMAProcess[1,{a},{b},1],ProcessEstimator->"MaximumLikelihood"]

Plot the log-likelihood function together with the position of the estimated parameters:

logℒ[x_Real,y_Real]:=LogLikelihood[ARMAProcess[1,{x},{y},1],data]

ContourPlot[logℒ[x,y],{x,0.1,.8},{y,0.1,.8},Epilog->{Red,Point[{a,b}/.res]},Contours->16]

Estimate a vector autoregressive moving average process:

proc=ARMAProcess[{1,2},{{{.2,.1},{.5,.3}}},{{{-.3,.2},{.8,-.1}}},{{1,.3},{.3,.5}}];
data=RandomFunction[proc,{10^3}];

eproc=EstimatedProcess[data,ARMAProcess[1,1]]

Compare covariance functions for each component:

Table[Show[ListPlot[CovarianceFunction[data["PathComponent",i],{8}],Filling->0,PlotStyle->PointSize[Medium],PlotRange->All],DiscretePlot[CovarianceFunction[eproc,h][[i,i]],{h,0,8},ExtentSize->1/2]],{i,1,2}]

Forecast future values:

proc=ARMAProcess[.4,{.1,.4},{-.3},.1];
sample=RandomFunction[proc,{1,50}];

Find the forecast for the next 10 steps:

forecast=TimeSeriesForecast[proc,sample,{10}]

Show the forecast path:

forecast["Path"]

Plot the data and the forecasted values:

ListLinePlot[{sample,forecast},InterpolationOrder->0,Filling->Axis]

Find a forecast for a vector-valued time series process:

proc=ARMAProcess[{{{.3,.1},{.9,.1}}},{{{.2,-.4},{.5,-.3}}},{{1,.2},{.2,.6}}];
data=RandomFunction[proc,{0,15}];

Find the forecast for the next 10 steps:

forecast=TimeSeriesForecast[proc,data,{10}]

Plot the data and the forecast for each component:

Row@Table[ListLinePlot[#["PathComponent",j]&/@{data,forecast},PlotLabel->(Subscript[x, j]),PlotLegends->{"data","forecast"}],{j,1,2}]

OpenersExampleSubsection1(Spacer1)Covariance and Spectrum  (6)

Closed-form correlation function for low order:

CorrelationFunction[ARMAProcess[{a},{b},(σ^2)],h]//PiecewiseExpand

CorrelationFunction[ARMAProcess[{1/3},{1,2},1],h]//PiecewiseExpand

Partial correlation function:

Table[PartialCorrelationFunction[ARMAProcess[{(Subscript[a, 1])},{(Subscript[b, 1])},(σ^2)],h],{h,2}]//FullSimplify

Correlation matrix:

Correlation[ARMAProcess[{(Subscript[a, 1])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)][{1,5}]]//Factor//MatrixForm

Covariance matrix:

Covariance[ARMAProcess[{(Subscript[a, 1])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)][{1,5}]]//Factor//MatrixForm

Covariance function for a vector-valued process:

Σ={{((Subscript[σ, 1])^2),ρ (Subscript[σ, 1])(Subscript[σ, 2])},{ρ (Subscript[σ, 1])(Subscript[σ, 2]),((Subscript[σ, 2])^2)}};
α={{(Subscript[a, 1]),0},{0,(Subscript[a, 2])}};
β={{(Subscript[b, 1]),0},{0,(Subscript[b, 2])}};

TraditionalForm@CovarianceFunction[ARMAProcess[{α},{β},Σ],0]

TraditionalForm@CovarianceFunction[ARMAProcess[{α},{β},Σ],1]

Power spectral density:

Plot[PowerSpectralDensity[ARMAProcess[{-.1,-.4,.3},{.2,.3},1],w],{w,-π,π},Filling->Axis]

PowerSpectralDensity[ARMAProcess[c,{a},{b},(σ^2)],w]

Vector (RefLink[ARProcess, paclet:ref/ARProcess]):

a={{1/7,0},{1/3,0}};
Σ={{1,-1/3},{-1/3,1}};
proc=ARProcess[{a},Σ];

psd=PowerSpectralDensity[proc,ω];
psd//MatrixForm

OpenersExampleSubsection2(Spacer1)Stationarity and Invertibility  (5)

Check if a time series is weakly stationary:

WeakStationarity[ARMAProcess[.2,{1,2},{3},1,{}]]

WeakStationarity[ARMAProcess[2,{.1,.2},{3},1]]

For a vector process:

WeakStationarity[ARMAProcess[{{{.3,.2},{-.4,.1}}},{{{.8,-.4},{.1,.3}}},{{1,.3},{.3,.6}}]]

Find conditions for a process to be weakly stationary:

cond2D=WeakStationarity[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2])},{(Subscript[b, 1])},(σ^2)]]

RegionPlot[cond2D,{(Subscript[a, 1]),-2,2},{(Subscript[a, 2]),-2,2},FrameLabel->Automatic]

Find conditions for higher autoregressive order:

cond3D=WeakStationarity[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1])},(σ^2)]]

RegionPlot3D[cond3D,{(Subscript[a, 1]),-2,2},{(Subscript[a, 2]),-2,2},{(Subscript[a, 3]),-2,2},PlotPoints->40,AxesLabel->Automatic]

Check if a time series is invertible:

proc=ARMAProcess[1,{2/3},{1/4,2},1];

TimeSeriesInvertibility[proc]

For a vector process:

TimeSeriesInvertibility[ARMAProcess[{{{.3,.2},{-.4,.1}}},{{{.8,-.4},{.1,.3}}},{{1,.3},{.3,.6}}]]

Find an invertible representation:

proc=ARMAProcess[1,{1/3},{1,2},1];
TimeSeriesInvertibility[proc]

iproc=ToInvertibleTimeSeries[proc]

The moments are being conserved:

Mean/@{proc[t],iproc[t]}

CovarianceFunction[#,s,t]&/@{proc,iproc}

Find invertibility conditions:

cond2D=TimeSeriesInvertibility[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)]]

RegionPlot[cond2D,{(Subscript[b, 1]),-2,2},{(Subscript[b, 2]),-2,2},FrameLabel->Automatic]

Find conditions for higher moving-average order:

cond3D=TimeSeriesInvertibility[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1]),(Subscript[b, 2]),(Subscript[b, 3])},(σ^2)]]

RegionPlot3D[cond3D,{(Subscript[b, 1]),-2,2},{(Subscript[b, 2]),-2,2},{(Subscript[b, 3]),-2,2},PlotPoints->50,AxesLabel->Automatic,ViewPoint->{1,1,1}]

OpenersExampleSubsection3(Spacer1)Estimation Methods  (5)

The available methods for estimating an (RefLink[ARMAProcess, paclet:ref/ARMAProcess]):

methods={Automatic,"MethodOfMoments","MaximumConditionalLikelihood","MaximumLikelihood","SpectralEstimator"};

SeedRandom[11];
data=RandomFunction[ARMAProcess[2,{.4},{.3},1],{100}];

Grid[res=Table[{m,EstimatedProcess[data,ARMAProcess[1,1],ProcessEstimator->m]},{m,methods}],Frame->All,Spacings->{1,2},Alignment->{Left,Center}]

Compare log-likelihoods:

LogLikelihood[#[[2]],data]&/@res

Method of moments admits the following solvers:

solvers={Automatic,"LeastSquares","FindRoot","NSolve"};

SeedRandom[14352];
data=RandomFunction[ARMAProcess[{.4},{.3},1],{100}];

Grid[res=Table[{m,EstimatedProcess[data,ARMAProcess[1,1],ProcessEstimator->{"MethodOfMoments",Method->m}]},{m,solvers}],Frame->All,Spacings->{1,2},Alignment->{Left,Center}]

This method allows for fixed parameters:

EstimatedProcess[data,ARMAProcess[c,{.4,b},{m},v],ProcessEstimator->"MethodOfMoments"]

Some relations between parameters are also permitted:

EstimatedProcess[data,ARMAProcess[c,{a*b,b},{a},v],ProcessEstimator->"MethodOfMoments"]

Maximum conditional likelihood method allows the following solvers:

solvers={Automatic,"FindMaximum","NMaximize"};

SeedRandom[14];
data=RandomFunction[ARMAProcess[2,{.4,.2},{.3},1],{100}];

Grid[Table[{m,EstimatedProcess[data,ARMAProcess[2,1],ProcessEstimator->{"MaximumConditionalLikelihood",Method->m}]},{m,solvers}],Frame->All,Spacings->{1,2},Alignment->{Left,Center}]

This method allows for fixed parameters:

EstimatedProcess[data,ARMAProcess[c,{.1,b},{m},v],ProcessEstimator->"MaximumConditionalLikelihood"]

Some relations between parameters are also permitted:

EstimatedProcess[data,ARMAProcess[c,{b,b},{m},v],ProcessEstimator->"MaximumConditionalLikelihood"]

Maximum likelihood method allows the following solvers:

solvers={Automatic,"FindMaximum","NMaximize"};

SeedRandom[14];
data=RandomFunction[ARMAProcess[2,{.4,.2},{.3},1],{100}];

Grid[Table[{m,EstimatedProcess[data,ARMAProcess[2,1],ProcessEstimator->{"MaximumLikelihood",Method->m}]},{m,solvers}],Frame->All,Spacings->{1,2},Alignment->{Left,Center}]

This method allows for fixed parameters:

EstimatedProcess[data,ARMAProcess[c,{.1,b},{m},v],ProcessEstimator->"MaximumLikelihood"]

Some relations between parameters are also permitted:

EstimatedProcess[data,ARMAProcess[c,{b,b},{m},v],ProcessEstimator->"MaximumLikelihood"]

Spectral estimator allows users to specify windows used for (RefLink[PowerSpectralDensity, paclet:ref/PowerSpectralDensity]) calculation:

SeedRandom[14];
data=RandomFunction[ARMAProcess[2,{.4,.2},{.3},1],{100}];

Grid[Table[{m,EstimatedProcess[data,ARMAProcess[2,1],ProcessEstimator->{"SpectralEstimator", "Window"->m}]},{m,{10,BartlettWindow,{3,HannWindow}}}],Frame->All,Spacings->{1,2},Alignment->{Left,Center}]

Spectral estimator allows the following solvers:

solvers={Automatic,"FindMinimum","NMinimize"};

Grid[Table[{m,EstimatedProcess[data,ARMAProcess[2,1],ProcessEstimator->{"SpectralEstimator",Method->m}]},{m,solvers}],Frame->All,Spacings->{1,2},Alignment->{Left,Center}]

This method allows for fixed parameters:

EstimatedProcess[data,ARMAProcess[c,{.1,b},{m},v],ProcessEstimator->"SpectralEstimator"]

Some relations between parameters are also permitted:

EstimatedProcess[data,ARMAProcess[c,{b,b},{m},v],ProcessEstimator->"SpectralEstimator"]

OpenersExampleSubsection4(Spacer1)Process Slice Properties  (5)

Single time (RefLink[SliceDistribution, paclet:ref/SliceDistribution]):

SliceDistribution[ARMAProcess[c,{a},{b},σ^2],t]//Mean

Multiple time slice distributions:

SliceDistribution[ARMAProcess[1.2,{.2},{.3},1],{s,s+3}]//Covariance

SliceDistribution[ARMAProcess[{.2},{.3},1],{1,2,3}]//Mean

Slice distribution of a vector-valued time series:

α={{(Subscript[a, 1]),0},{0,(Subscript[a, 2])}};
β={{(Subscript[b, 1]),0},{0,(Subscript[b, 2])}};
Σ={{((Subscript[σ, 1])^2),ρ (Subscript[σ, 1])(Subscript[σ, 2])},{ρ (Subscript[σ, 1])(Subscript[σ, 2]), ((Subscript[σ, 2])^2)}};
ARMAProcess[{α},{β},Σ][t]//Mean

First-order probability density function:

pdf[t_]=PDF[ARMAProcess[c,{a},{b},(σ^2),{}][t],x]//PiecewiseExpand//Simplify[#,σ>0]&

times={1,2,3,4};

Plot[Evaluate@Table[pdf[t]/.{c->1.5,a->.7,b->.6,σ->1},{t,times}],{x,-4,12},Filling->Axis,PlotLegends->(StringJoin["t = ",ToString[#]]&/@times)]

Stationary mean and variance:

μ=Mean[ARMAProcess[c,{a},{b},(σ^2)][∞]]

v=Variance[ARMAProcess[c,{a},{b},(σ^2)][∞]]

Compare with the density function of a normal distribution:

PDF[NormalDistribution[μ,Sqrt[v]],x]

FullSimplify[%-PDF[ARMAProcess[c,{a},{b},(σ^2)][∞],x]]

Compute the expectation of an expression:

Expectation[x[t]^2,x\[Distributed]ARMAProcess[c,{a},{b},(σ^2)]]

Calculate a probability:

Probability[x[t]<6,x\[Distributed]ARMAProcess[c,{a},{b},(σ^2)]]

Skewness and kurtosis are constant:

Skewness[ARMAProcess[c,{a},{b},(σ^2)][t]]

Kurtosis[ARMAProcess[c,{a},{b},(σ^2)][t]]

Moment of order r:

Table[Moment[ARMAProcess[c,{a},{b},(σ^2)][t],r],{r,0,4}]//Together

Generating functions:

CharacteristicFunction[ARMAProcess[c,{a},{b},(σ^2)][t],w]

MomentGeneratingFunction[ARMAProcess[c,{a},{b},(σ^2)][t],w]

(RefLink[CentralMoment, paclet:ref/CentralMoment]) and its generating function:

Table[CentralMoment[ARMAProcess[c,{a},{b},(σ^2)][t],r],{r,0,4}]

CentralMomentGeneratingFunction[ARMAProcess[c,{a},{b},(σ^2)][t],w]

(RefLink[FactorialMoment, paclet:ref/FactorialMoment]) has no closed form for symbolic order:

Table[FactorialMoment[ARMAProcess[c,{a},{b},(σ^2)][t],r]//Simplify,{r,0,3}]

FactorialMomentGeneratingFunction[ARMAProcess[c,{a},{b},(σ^2)][t],w]

(RefLink[Cumulant, paclet:ref/Cumulant]) and its generating function:

Table[Cumulant[ARMAProcess[c,{a},{b},(σ^2)][t],r],{r,0,4}]

CumulantGeneratingFunction[ARMAProcess[c,{a},{b},(σ^2)][t],w]

OpenersExampleSubsection5(Spacer1)Representations  (6)

Approximate a SARMA process with an (RefLink[ARMAProcess, paclet:ref/ARMAProcess])[4,3]:

proc=SARMAProcess[.4,{-.3,-.1},{.5},{12,{-.2},{.3}},1];
aproc=ARMAProcess[proc,{4,3}]

Compare the covariance function for the original and the approximate processes:

DiscretePlot[CovarianceFunction[#,h],{h,0,10},ExtentSize->1/2,PlotLabel->Head[#]]&/@{proc,aproc}

Approximate a vector process:

proc=ARProcess[{.4,.2},{{{.2,.5},{-.3,.5}},{{-.2,.3},{-.1,-.4}}},{{.6,.2},{.2,.4}}];
aproc=ARMAProcess[proc,{1,3}]

Approximate an ARIMA process with fixed initial conditions by an ARMA process:

proc=ARIMAProcess[{.2,-.3,-.2},1,{.8,-.2,.7},1.,{}];
aproc=ARMAProcess[proc,{2,3}]

Compare sample paths:

SeedRandom[13];sample=RandomFunction[proc,{100}];
SeedRandom[13];asample=RandomFunction[aproc,{100}];
ListLinePlot[{sample,asample},PlotLegends->{"ARIMA","ARMA"}]

Approximate a SARIMA process with fixed initial conditions with an ARMA process:

proc=SARIMAProcess[{.2,-.3,-.1},1,{.6,.2},{4,{.3},1,{}},1];
aproc=ARMAProcess[proc,{8,12}]

Compare sample paths:

SeedRandom[13];sample=RandomFunction[proc,{150}];
SeedRandom[13];asample=RandomFunction[aproc,{150}];
ListLinePlot[{sample,asample},PlotLegends->{"SARIMA","ARMA"}]

Represent an AR process as an equivalent ARMA process:

ARMAProcess[ARProcess[c,{(Subscript[a, 1]),(Subscript[a, 2])},v]]

MA:

ARMAProcess[MAProcess[c,{(Subscript[b, 1]),(Subscript[b, 2])},v]]

ARIMA with known integration order:

ARMAProcess[ARIMAProcess[c,{(Subscript[a, 1]),(Subscript[a, 2])},1,{(Subscript[b, 1]),(Subscript[b, 2])},v]]

SARMA with known seasonal order:

ARMAProcess[SARMAProcess[c,{(Subscript[a, 1]),(Subscript[a, 2])},{(Subscript[b, 1]),(Subscript[b, 2])},{4,{(Subscript[α, 1]),(Subscript[α, 2])},{(Subscript[β, 1]),(Subscript[β, 2])}},v]]

SARIMA with known integration and seasonal orders:

ARMAProcess[SARIMAProcess[c,{(Subscript[a, 1])},2,{(Subscript[b, 1])},{4,{(Subscript[α, 1])},1,{(Subscript[β, 1])}},v]]

(RefLink[TransferFunctionModel, paclet:ref/TransferFunctionModel]) representation:

TransferFunctionModel[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)],z]

For a vector-valued process:

α={{.2,.3},{0,.1}};
β={{-.3,.9},{.5,-.4}};
Σ={{1,0},{0,1}};
TransferFunctionModel[ARMAProcess[{α},{β},Σ],z]

(RefLink[StateSpaceModel, paclet:ref/StateSpaceModel]) representation:

StateSpaceModel[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)]]

For a vector-valued process:

α={{.2,.3},{0,.1}};
β={{-.3,.9},{.5,-.4}};
Σ={{1,0},{0,1}};
StateSpaceModel[ARMAProcess[{α},{β},Σ]]

OpenersExampleSection3(Spacer1)Applications  (4)

Fit an ARMA model for the hourly measurements of temperature in August:

temp=TimeSeries[];

temp["Source"]

DateListPlot[temp,Filling->Axis]

Find process parameters:

tsm=TimeSeriesModelFit[temp,"ARMA"]

eproc=tsm["BestFit"]

Check if the process is weakly stationary:

WeakStationarity[eproc]

The low-order ARMA model does not capture the seasonal trend well:

ListPlot[CorrelationFunction[#,{100}]&/@{temp,eproc},PlotLegends->{"Data","Model"},PlotStyle->PointSize[Medium]]

Daily mean temperature readings in September 2012 near your location:

temp=TimeSeries[];

temp["Source"]

DateListPlot[temp,Joined->True,Filling->Bottom]

Find model parameters:

eproc=EstimatedProcess[temp,ARMAProcess[3,1]]

Check if the process is weakly stationary:

WeakStationarity[eproc]

Forecast for a week ahead:

forecast=TimeSeriesForecast[eproc,temp,{7}]

Plot forecast with original data:

DateListPlot[{temp,forecast},Joined->True,Filling->Axis]

The daily exchange rates of the euro to the dollar from May 2012 through September 2012:

data=TemporalData[];

data["Source"]

DateListPlot[data,Joined->True,Filling->Bottom]

Fit an ARMA process to the exchange rates:

eproc=EstimatedProcess[data,ARMAProcess[2,1]]

Forecast for 10 business days ahead:

forecast=TimeSeriesForecast[eproc,data,{0,10}]

Plot forecast with original data:

DateListPlot[{data,forecast},Joined->True,Filling->Axis]

Monthly water levels on Lake Mead:

ExampleData[{"Statistics","LakeMeadLevels"},"LongDescription"]

Create (RefLink[TemporalData, paclet:ref/TemporalData]) starting with observation from February 1935:

levels=ExampleData[{"Statistics","LakeMeadLevels"},"TimeSeries"]

DateListPlot[levels]

Find a time series model:

tsm=TimeSeriesModelFit[levels,"ARMA"]

eproc=tsm["Process"]

Check if the residuals exhibit any significant serial correlation:

{#["ACFPlot"],#["PACFPlot"]}&@tsm["FitResiduals"]

Forecast the water level for the next 10 years:

forecast=TimeSeriesForecast[eproc,levels,{120}];

DateListPlot[{levels,forecast},Joined->True,Filling->Axis]

OpenersExampleSection4(Spacer1)Properties & Relations  (7)

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a generalization of (RefLink[MAProcess, paclet:ref/MAProcess]):

TransferFunctionModel[ARMAProcess[{},{(Subscript[b, 1]),(Subscript[b, 2]),(Subscript[b, 3])},(σ^2)],z]

TransferFunctionModel[MAProcess[{(Subscript[b, 1]),(Subscript[b, 2]),(Subscript[b, 3])},(σ^2)],z]

%-%%

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a generalization of (RefLink[ARProcess, paclet:ref/ARProcess]):

TransferFunctionModel[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{},(σ^2)],z]

TransferFunctionModel[ARProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},(σ^2)],z]

%-%%

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a special case of (RefLink[ARIMAProcess, paclet:ref/ARIMAProcess]):

TransferFunctionModel[ARIMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},0,{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)],z]

TransferFunctionModel[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)],z]

%-%%

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a special case of (RefLink[FARIMAProcess, paclet:ref/FARIMAProcess]):

TransferFunctionModel[FARIMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},0,{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)],z]

TransferFunctionModel[ARMAProcess[{(Subscript[a, 1]),(Subscript[a, 2]),(Subscript[a, 3])},{(Subscript[b, 1]),(Subscript[b, 2])},(σ^2)],z]

%-%%

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a special case of (RefLink[SARMAProcess, paclet:ref/SARMAProcess]):

TransferFunctionModel[SARMAProcess[{a},{b},{1,{α},{β}},(σ^2)],z]

TransferFunctionModel[ARMAProcess[{a+α,-a α},{ b+β,b β},(σ^2)],z]

Simplify[%-%%]

(RefLink[ARMAProcess, paclet:ref/ARMAProcess]) is a special case of (RefLink[SARIMAProcess, paclet:ref/SARIMAProcess]):

TransferFunctionModel[SARIMAProcess[{a},0,{b},{1,{α},0,{β}},(σ^2)],z]

TransferFunctionModel[ARMAProcess[{a+α,-a α},{ b+β,b β},(σ^2)],z]

Simplify[%-%%]

Squared values of a (RefLink[GARCHProcess, paclet:ref/GARCHProcess]) follow an ARMA process:

proc=GARCHProcess[1,{.2,.3},{.2}];

SeedRandom[34];data=RandomFunction[proc,{10^6}];

(RefLink[CorrelationFunction, paclet:ref/CorrelationFunction]) and (RefLink[PartialCorrelationFunction, paclet:ref/PartialCorrelationFunction]) of squared values:

dataSQ=data^2;
ListPlot[#[dataSQ,{1,30}],Filling->Axis,PlotRange->{-.2,1},PlotLabel->#]&/@{CorrelationFunction,PartialCorrelationFunction}

The corresponding ARMA process:

arma=ARMAProcess[proc]

(RefLink[CorrelationFunction, paclet:ref/CorrelationFunction]) and (RefLink[PartialCorrelationFunction, paclet:ref/PartialCorrelationFunction]) of the ARMA process:

ListPlot[#[arma,{1,30}],Filling->Axis,PlotRange->{-.2,1},PlotLabel->#]&/@{CorrelationFunction,PartialCorrelationFunction}

OpenersExampleSection5(Spacer1)Possible Issues  (3)

Some properties are defined only for weakly stationary processes:

CovarianceFunction[ARMAProcess[{2,.3},{.3,.2},(σ^2)],h]

Use (RefLink[FindInstance, paclet:ref/FindInstance]) to find a weakly stationary process:

FindInstance[a>0&&WeakStationarity[ARMAProcess[{a,.2},{.3,.2},(σ^2)]],a]

CovarianceFunction[ARMAProcess[{.4,.2},{.3,.2},(σ^2)],h]

(RefLink[ToInvertibleTimeSeries, paclet:ref/ToInvertibleTimeSeries]) does not always exist:

ToInvertibleTimeSeries[ARMAProcess[{.2},{.3,1},.2]]

There are zeros of the (RefLink[TransferFunctionModel, paclet:ref/TransferFunctionModel]) on the unit circle:

TransferFunctionZeros[TransferFunctionModel[ARMAProcess[{.2},{.3,1},.2]]]

Abs[%]

The method of moments may not find a solution in estimation:

SeedRandom[4];
data=RandomFunction[ARMAProcess[2,{.4},{.3},1],{100}];

EstimatedProcess[data,ARMAProcess[c,{.4,b},{1},v],ProcessEstimator->{"MethodOfMoments",Method->"NSolve"}]

Use the "FindRoot" method instead:

EstimatedProcess[data,ARMAProcess[c,{.4,b},{1},v],ProcessEstimator->{"MethodOfMoments",Method->"FindRoot"}]

OpenersExampleSection6(Spacer1)Neat Examples  (2)

Simulate a weakly stationary three-dimensional (RefLink[ARMAProcess, paclet:ref/ARMAProcess]):

A={{.2,.1,.1},{0,-.2,.3},{.2,-.1,.3}};
B={{.1,.2,-.1},{-.1,.3,.1},{.1,.1,0}};
S={{.8,.1,-.2},{.1,.5,.1},{-.2,.1,.3}};
proc1=ARMAProcess[{A},{B},S];
data1=RandomFunction[proc1,{100}]["Values"];

Graphics3D[{ColorData["SolarColors"][RandomReal[]],Tube@Line@data1}]

Non-weakly stationary process, starting at the origin:

a={{.9,.2,.8},{-.2,.8,-.3},{.2,.2,.4}};
proc2=ARMAProcess[{a},{B},S,{}];
data2=RandomFunction[proc2,{100}]["Values"];

Graphics3D[{ColorData["SolarColors"][RandomReal[]],Tube@Line@data2}]

Simulate paths from an ARMA process:

SeedRandom[154];
data=RandomFunction[ARMAProcess[{.3},{.6},1],{50},200];

Take a slice at 50 and visualize its distribution:

sd=data["SliceData",50];

cf=ColorData["Rainbow"];
sliced=BarChart[Last[#],Axes->False,BarOrigin->Left,AspectRatio->4,ChartStyle->(cf/@Rescale[MovingAverage[First[#],2],{Min[sd],Max[sd]},{0,1}]),ImageSize->55]&[HistogramList[sd,{Range[Min[sd],Max[sd],(Max[sd]-Min[sd])/20]}]];

Plot paths and histogram distribution of the slice distribution at 50:

ListLinePlot[data,ImageSize->400,PlotRange->All,
AspectRatio->3/4,Epilog->Inset[sliced,{51,0},{0,11}],PlotStyle->(cf/@Rescale[sd]),BaseStyle->Directive[Thin,Opacity[0.5]],PlotRangePadding->{{0,15},{.5,.5}}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[MAProcess, paclet:ref/MAProcess])  ▪  (RefLink[ARProcess, paclet:ref/ARProcess])  ▪  (RefLink[ARIMAProcess, paclet:ref/ARIMAProcess])  ▪  (RefLink[FARIMAProcess, paclet:ref/FARIMAProcess])  ▪  (RefLink[SARMAProcess, paclet:ref/SARMAProcess])  ▪  (RefLink[SARIMAProcess, paclet:ref/SARIMAProcess])  ▪  (RefLink[WeakStationarity, paclet:ref/WeakStationarity])  ▪  (RefLink[TimeSeriesInvertibility, paclet:ref/TimeSeriesInvertibility])  ▪  (RefLink[ToInvertibleTimeSeries, paclet:ref/ToInvertibleTimeSeries])  ▪  (RefLink[NormalDistribution, paclet:ref/NormalDistribution])  ▪  (RefLink[MultinormalDistribution, paclet:ref/MultinormalDistribution])  ▪  (RefLink[TransferFunctionModel, paclet:ref/TransferFunctionModel])  ▪  (RefLink[StateSpaceModel, paclet:ref/StateSpaceModel])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Probability & Statistics, paclet:guide/ProbabilityAndStatistics])}, {▪(RefLinkPlain[Time Series Processes, paclet:guide/TimeSeriesProcesses])}, {▪(RefLinkPlain[Scientific Models, paclet:guide/ScientificModels])}, {▪(RefLinkPlain[Random Processes, paclet:guide/RandomProcesses])}, {▪(RefLinkPlain[Finite Markov Processes, paclet:guide/MarkovProcesses])}})}})