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.

  1. Specify a time series as an AR(2) conditional mean model and GARCH(1,2) conditional variance model. Note that this is an elaborate specification, typically unwarranted for a real-world financial time series, and is meant for illustration purposes only.
  2. Simulate 102 observations for each of 5 realizations and reserve the first 2 rows of observations for the presample data needed by 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.
  3. Using observations 3 and beyond as the observed return series input, call 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).
  4. Call 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,
  5. A graphical comparison of the first realization of the approximate and the exact inferred conditional standard deviations reveals the distinction between automatically generated and user-specified presample data.

  1. Notice that the approximate and exact standard deviations are asymptotically identical. The only difference between the two curves is attributable to the transients induced by the default initial conditions.

    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