## Documentation Center |

Plot ARMAX/GARCH model responses

`garchplot` has been removed.

`garchplot(Innovations,Sigmas,Series)`

`garchplot(Innovations,Sigmas,Series)` lets
you visually compare matched innovations, conditional standard deviations,
and returns. It provides a convenient way to compare innovations series,
simulated using `garchsim` or estimated
using `garchfit`, with companion
conditional standard deviations, or returns series. You can also use `garchplot` to
plot forecasts, computed using `garchpred`,
of conditional standard deviations and returns.

In general, `garchplot` produces a tiered
plot of matched time series. `garchplot` does not
display an empty or missing input array; it allocates no space to
the array in the tiered figure window. `garchplot` displays
valid (nonempty) `Innovations`, `Sigmas`,
and `Series` arrays in the top, center, and bottom
plots, respectively. Because `garchplot` assigns
a title and label to each plot according to its position in the argument
list, you can ensure correct plot annotation by using empty matrices
(`[]`) as placeholders.

You can plot several paths of each array simultaneously because `garchplot` color
codes corresponding paths of each input array. However, the plots
can become cluttered if you try to display more than a few paths of
each input at one time.

Time series column vector or matrix of innovations. As
a column vector, | |

Time series column vector or matrix of conditional standard
deviations. In general, | |

Time series column vector or matrix of asset returns.
In general, |

Plot `Innovations`, `Sigmas`,
and `Series`, assuming that they are not empty:

garchplot(Innovations) garchplot(Innovations, [], Series) garchplot([], Sigmas, Series) garchplot(Innovations, Sigmas, Series) garchplot(Innovations, Sigmas, []) garchplot(Innovations, Sigmas)

Load the Deutschmark/British pound foreign-exchange rate data and convert prices to returns:

load Data_MarkPound dem2gbp = price2ret(Data);

Use the estimated model to generate a single path of 1000 observations for return series, innovations, and conditional standard deviation processes:

[coeff,errors,LLF,innovations,sigmas] = ... garchfit(dem2gbp); rng('default') % make output reproducible [e,s,y] = garchsim(coeff, 1000); ____________________________________________________________ Diagnostic Information Number of variables: 4 Functions Objective: internal.econ.garchllfn Gradient: finite-differencing Hessian: finite-differencing (or Quasi-Newton) Nonlinear constraints: armanlc Nonlinear constraints gradient: finite-differencing Constraints Number of nonlinear inequality constraints: 0 Number of nonlinear equality constraints: 0 Number of linear inequality constraints: 1 Number of linear equality constraints: 0 Number of lower bound constraints: 4 Number of upper bound constraints: 4 Algorithm selected medium-scale: SQP, Quasi-Newton, line-search ____________________________________________________________ End diagnostic information Max Line search Directional First-order Iter F-count f(x) constraint steplength derivative optimality Procedure 0 5 -7915.72 -2.01e-06 1 27 -7916.01 -2.01e-06 7.63e-06 -7.68e+03 1.41e+05 2 34 -7959.65 -1.508e-06 0.25 -974 9.85e+07 3 42 -7964.03 -3.102e-06 0.125 -380 5.1e+06 4 48 -7965.9 -1.578e-06 0.5 -92.8 4.43e+07 5 60 -7967 -1.566e-06 0.00781 -520 1.6e+07 6 67 -7967.28 -2.407e-06 0.25 -231 2.23e+07 7 75 -7972.64 -2.711e-06 0.125 -177 8.62e+06 8 81 -7981.52 -1.356e-06 0.5 -150 1.33e+07 9 93 -7981.75 -1.473e-06 0.00781 -72.7 2.59e+06 10 99 -7982.65 -7.366e-07 0.5 -45.5 1.89e+07 11 107 -7983.07 -8.323e-07 0.125 -79.7 4.93e+06 12 116 -7983.11 -1.224e-06 0.0625 -20.5 7.44e+06 13 121 -7983.9 -7.633e-07 1 -32.5 1.42e+06 14 126 -7983.95 -7.983e-07 1 -7.62 6.66e+05 15 134 -7983.95 -7.972e-07 0.125 -13 5.73e+05 Local minimum possible. Constraints satisfied. fmincon stopped because the predicted change in the objective function is less than the selected value of the function tolerance and constraints are satisfied to within the selected value of the constraint tolerance. No active inequalities.

Plot the results:

garchplot(e,s,y)

Was this topic helpful?