@McLeodLi( options) x start end
Parameters
| x | series to analyze |
| start end | range to analyze [defaults to full range of x] |
Options
NUMBER=number of autocorrelations on the squares [10]
DFC=degrees of freedom correction [0]. For residuals from a GARCH model, this should be the number of estimated "GARCH" parameters (those on lagged variance and lagged squared residuals).
TITLE=title of report ["McLeod-Li Test for Series x"]
[PRINT]/NOPRINT
Example
- Code: Select all
*
* Tsay, Analysis of Financial Time Series, 3rd edition
* Example 4.3 from pp 182-184
*
open data d-ibmvwewsp6203.txt
data(format=prn,nolabels,org=columns) 1 10446 date ibm vw ew sp500
*
set r = 100.0*ibm
garch(reg,p=1,q=1,resids=u,hseries=h) / r
# constant r{2}
*
* Diagnostics
*
set ustd = u/sqrt(h)
@regcorrs(nograph,number=20,report) ustd
@mcleodli(number=10,dfc=2) ustd
@mcleodli(number=20,dfc=2) ustd
