| 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 |
This example fits the NASDAQ daily returns from example nasdaq data set to an ARMA(1,1)/GJR(1,1) model with conditionally t-distributed residuals.
Load the nasdaq data set and convert daily closing prices to daily returns:
load garchdata nasdaq = price2ret(NASDAQ);
Create a specification structure for an ARMA(1,1)/GJR(1,1) model with conditionally t-distributed residuals:
spec = garchset('VarianceModel','GJR',...
'R',1,'M',1,'P',1,'Q',1);
spec = garchset(spec,'Display','off','Distribution','T');Estimate the parameters of the mean and conditional variance models via garchfit. Make sure that the example returns the estimated residuals and conditional standard deviations inferred from the optimization process, so that they can be used as presample data:
[coeff,errors,LLF,eFit,sFit] = garchfit(spec,nasdaq);
Alternatively, you could replace this call to garchfit with the following successive calls to garchfit and garchinfer. This is because the estimated residuals and conditional standard deviations are also available from the inference function garchinfer:
[coeff,errors] = garchfit(spec,nasdaq); [eFit,sFit] = garchinfer(coeff,nasdaq);
Either approach produces the same estimation results:
garchdisp(coeff,errors)
Mean: ARMAX(1,1,0); Variance: GJR(1,1)
Conditional Probability Distribution: T
Number of Model Parameters Estimated: 8
Standard T
Parameter Value Error Statistic
----------- ----------- ------------ -----------
C 0.00099913 0.00023366 4.2759
AR(1) -0.1074 0.11568 -0.9284
MA(1) 0.26286 0.11205 2.3459
K 1.4274e-006 3.812e-007 3.7446
GARCH(1) 0.90103 0.01111 81.0988
ARCH(1) 0.048458 0.013521 3.5839
Leverage(1) 0.085677 0.016792 5.1021
DoF 7.8264 0.92862 8.4280![]() | Example Workflow | Forecasting | ![]() |
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 |