| GARCH Toolbox | ![]() |
Ordinary Least Squares Regression
The following example illustrates an ordinary least squares regression by simulating a return series that scales the daily return values of the New York Stock Exchange Composite Index. It also provides an example of a constant conditional variance model.
NYSE data set and convert the price series to a return series.
Display flag to 'off' to suppress the optimization details that garchfit normally displays.
spec = garchset('P',0,'Q',0,'C',0,'Regress',1.2,'K',0.00015,... 'Display', 'off') spec = Comment: 'Mean: ARMAX(0,0,?); Variance: GARCH(0,0)' Distribution: 'Gaussian' C: 0 Regress: 1.2000 VarianceModel: 'GARCH' K: 1.5000e-004 Display: 'off'
[e,s,y] = garchsim(spec,2000,1,[],nyse); [coeff,errors] = garchfit(spec,y,nyse); garchdisp(coeff,errors) Mean: ARMAX(0,0,1); Variance: GARCH(0,0) Conditional Probability Distribution: Gaussian Number of Model Parameters Estimated: 3 Standard T Parameter Value Error Statistic ----------- ----------- ------------ ----------- C 4.9091e-006 0.00027114 0.0181 Regress(1) 1.2251 0.028909 42.3786 K 0.00014662 4.6945e-006 31.2334
| Note This example is shown purely for illustration purposes. Although you can use the GARCH Toolbox to perform OLS, it is computationally inefficient and is not recommended. |
| Generating Forecasted Explanatory Data | Regression in a Monte Carlo Framework | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2010 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |