| GARCH Toolbox | ![]() |
Presample Data and Transient Effects
This example simulates a return series, yTrue, then uses the inference function garchinfer to infer
and
from the simulated return series. First, the example uses automatically generated presample data to infer the approximate residuals and conditional standard deviation processes, and then uses explicitly specified presample data to infer the exact residuals and conditional standard deviation processes. The example finally compares the approximate conditional standard deviation processes with the exact conditional standard deviations processes to reveal the effect of transients in the approximate results. The effect of transients in the estimation, or inference, process parallels that in the simulations process described in Automatically Generated Presample Data.
Note
This example uses garchinfer, rather than garchfit, to avoid introducing differences as a result of the optimization. While garchsim uses an ARMA model as a linear filter to transform an uncorrelated input innovations process into a correlated output returns process , garchinfer reverses this process (as does garchfit) by inferring innovations and standard deviation processes from the observations in .
|
spec = garchset('C',0,'AR',[0.5 -0.8],'K',0.0002,... 'GARCH',0.8,'ARCH',[0.1 0.05]) spec = Comment: 'Mean: ARMAX(2,0,?); Variance: GARCH(1,2)' Distribution: 'Gaussian' R: 2 C: 0 AR: [0.5000 -0.8000] VarianceModel: 'GARCH' P: 1 Q: 2 K: 2.0000e-004 GARCH: 0.8000 ARCH: [0.1000 0.0500]
garchinfer in step 4. From the table in User-Specified Presample Data, notice that the PreInnovations array must have at least max(M,Q) = 2 rows, PreSigmas must have at least P = 1 row, and PreSeries must have at least R = 2 rows.
garchinfer without any explicit presample data to infer the approximate residuals and conditional standard deviations based on the default, or automatic, presample data inference approach (see the garchfit and garchinfer functions for details).
garchinfer again, but this time use the first two rows of the true simulated data as presample data. Use of the presample data allows you to infer the exact residuals and conditional standard deviations,
In fact, if you were to plot the first realization of the original simulated conditional standard deviations, sTrue(3:end,1), on the current figure, it would lie completely on top of the blue curve.
Although the figure highlights the first realization of conditional standard deviations, the comparison holds for any realization, and for the inferred residuals as well.
Thus, this example reveals the link between simulation and inference: garchsim can be thought of as a correlation filter capable of processing multiple realizations simultaneously, and is the complement of garchinfer, which can be thought of as a whitening, or inverse, filter capable of processing multiple realizations simultaneously. Although the estimation engine garchfit is capable of processing only a single realization at a time, the transient effects highlighted in this example are exactly the same when applied to the estimation.
| Specifying Presample Data | Alternative Technique for Estimating ARMA(R,M) Parameters | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2010 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |