[V,Y] = filter(model,Z,Name,Value)
numObs-by-numPaths matrix of disturbances, zt, used to drive the innovation process, εt. For a variance process the innovation process is given by
As a column vector, Z represents a single path of the underlying disturbance series. As a matrix, Z represents numObs observations of numPaths paths of the underlying disturbance series. filter assumes that observations across any row occur simultaneously. The last row contains the most recent observation.
Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
Presample disturbances, providing initial values for the input disturbance series, Z. If Z0 is a column vector, then filter applies it to each output path. If Z0 is a matrix, then it must have at least numPaths columns. If the number of columns exceeds numPaths, then filter uses only the first numPaths columns.
Z0 must have at least model.Q rows to initialize the conditional variance model. If the number of rows in Z0 exceeds model.Q, then filter uses only the most recent observations. The last row contains the most recent observation.
Default: Necessary presample observations are set equal to an independent sequence of standardized disturbances drawn from the distribution in model.
Positive presample conditional variances, providing initial values for the model. If V0 is a column vector, then filter applies it to each output path. If V0 is a matrix, then it must have at least numPaths columns. If the number of columns exceeds numPaths, then filter uses only the first numPaths columns.
V0 must have at least max(model.P,model.Q)rows to initialize the variance equation. If the number of rows in V0 exceeds the number necessary, then filter uses only the most recent observations. The last row contains the most recent observation.
Default: Necessary presample observations are set equal to the unconditional variance of the process.
numObs-by-numPaths matrix of conditional variances of the mean-zero, heteroscedastic innovations associated with Y.
numObs-by-numPaths time series matrix of response data. Y usually represents a mean-zero, heteroscedastic time series of innovations with conditional variances given in V. Y might also represent a time series of mean-zero, heteroscedastic innovations plus an offset. The inclusion of an offset is signaled by a nonzero Offset value in the input model. If the input model includes an offset, filter adds the offset to the underlying mean-zero, heteroscedastic innovations so that Y represents a time series of offset-adjusted innovations.
Specify a GARCH(1,1) model with Gaussian innovations.
model = garch('Constant',0.005,'GARCH',0.8,'ARCH',0.1);
Simulate the model using Monte Carlo simulation. Then, standardize the simulated innovations and filter them.
rng(1); % For reproducibility [v,e] = simulate(model,100,'E0',0,'V0',0.05); Z = e./sqrt(v); [V,E] = filter(model,Z,'Z0',0,'V0',0.05);
Confirm that the outputs of simulate and filter are identical.
ans = 1
The logical value 1 confirms the two outputs are identical.
 Bollerslev, T. "Generalized Autoregressive Conditional Heteroskedasticity." Journal of Econometrics. Vol. 31, 1986, pp. 307–327.
 Bollerslev, T. "A Conditionally Heteroskedastic Time Series Model for Speculative Prices and Rates of Return." The Review of Economics and Statistics. Vol. 69, 1987, pp. 542–547.
 Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. Time Series Analysis: Forecasting and Control. 3rd ed. Englewood Cliffs, NJ: Prentice Hall, 1994.
 Enders, W. Applied Econometric Time Series. Hoboken, NJ: John Wiley & Sons, 1995.
 Engle, R. F. "Autoregressive Conditional Heteroskedasticity with Estimates of the Variance of United Kingdom Inflation." Econometrica. Vol. 50, 1982, pp. 987–1007.
 Hamilton, J. D. Time Series Analysis. Princeton, NJ: Princeton University Press, 1994.
filter generalizes simulate. That is, both filter a series of disturbances to produce output responses, innovations, and conditional variances. However, simulate autogenerates a series of mean-zero, unit-variance, independent and identically distributed (iid) disturbances according to the distribution in the model object, model. In contrast, filter lets you directly specify your own disturbances.