| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Econometrics Toolbox |
| Contents | Index |
| Learn more about Econometrics Toolbox |
Y = vgxsim(Spec,T)
[Y,W] = vgxsim(Spec,T,X,Y0,W0,NumPaths))
vgxsim simulates a multivariate time series process.
| Spec | A multivariate time series specification structure for an n-dimensional time series process, as created by vgxset. |
| T | Number of observations to simulate. |
| X | Exogenous inputs. nPX paths of regression design matrices associated with T observations of an n-dimensional time series process, where each design matrix linearly relates nX exogenous inputs to each time series at each observation time. X is a T-by-nPX matrix of cell arrays with n-by-nX design matrices in each cell. If Y has multiple paths, X must contain either a single path or no fewer than the same number of paths as in Y. Extra paths are ignored. |
| Y0 | Presample time series process. nPY0 presample paths of an n-dimensional time series process with TY0 samples for each path, collected in a TY0-by-n-by-nPY0 array. If Y0 is empty or if TY0 is less than the maximum AR lag in Spec, presample values are padded with zeros. If TY0 is greater than the maximum AR lag, the most recent samples from the last rows of each path of Y0 are used. If Y0 has multiple paths, Y0 must contain either a single path or no fewer than the same number of paths as in Y. Extra paths are ignored. |
| W0 | Presample innovations process. nPW0 presample paths of an n-dimensional innovations process with TW0 samples for each path, collected in a TW0-by-n-by-nPW0 array. If W0 is empty or if TW0 is less than the maximum MA lag in Spec, presample values are padded with zeros. If TW0 is greater than the maximum MA lag, the most recent samples from the last rows of each path of W0 are used. If W0 has multiple paths, W0 must contain either a single path or no fewer than the same number of paths as in W. Extra paths are ignored. |
| NumPaths | Number of paths to simulate. If NumPaths > 1, X, Y0, or W0 must have either a single path or no fewer than NumPaths paths. |
| Y | Time series process. NumPaths paths of an n-dimensional time series process with T observations for each path, collected in a T-by-n-by-NumPaths array. Times are ordered by row from oldest to most recent. |
| W | Innovations process. NumPaths paths of an n-dimensional innovations process with T observations for each path, collected in a T-by-n-by-NumPaths array. Times are ordered by row from oldest to most recent. |
Start with a 2-dimensional VARMA(2, 2) specification structure in Spec with presample data for the time series and innovations process:
load vgxexample Spec Y0 W0
Simulate 60 time steps of the time series process and plot the result:
Y = vgxsim(Spec, 60, [], Y0, W0); vgxplot(Spec, Y);

Simulate 20 realizations of the time series process and plot the result:
Y = vgxsim(Spec, 60, [], Y0, W0, 20); vgxplot(Spec, Y);

![]() | vgxset | vgxvarx | ![]() |
View demos and recorded presentations led by industry experts.
Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |