Products & Services Solutions Academia Support User Community Company

Learn more about Econometrics Toolbox   

Regression in Monte Carlo

In the general case, these functions process multiple realizations (that is, sample paths) of univariate time series:

The outputs of garchsim and the observed return series input to garchpred and garchinfer can be time series matrices in which each column represents an independent realization. garchfit is different, because the input observed return series of interest must be a vector (that is, a single realization).

When simulating, inferring, and forecasting multiple realizations, the appropriate toolbox function applies a given regression matrix X to each realization of a univariate time series. For example, in the following command, garchsim applies a given X matrix to all 10 columns of the output series {εt}, {σt}, and {yt}:

NumSamples = 100;
NumPaths   = 10;
strm = RandStream('mt19937ar','Seed',22883);
RandStream.setDefaultStream(strm);
[e,s,y] = garchsim(spec,NumSamples,NumPaths,[],X);

In a true Monte Carlo simulation of this process, including a regression component, you would call garchsim inside a loop 10 times, once for each path. Each iteration would pass in a unique realization of X and produce a single-column output.

  


Free Interactive Computational Finance CD

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