Description Usage Arguments Details Value Author(s) References Examples

View source: R/rugarch-tests.R

Implements the Non-Parametric Density Test of Hong and Li.

1 |

`PIT` |
This represents the actual data transformed into a U(0,1) series by applying the distribution function of the estimated model conditional on the parameters. |

`lags` |
The number of lags to use for testing the joint hypothesis. |

`kernel` |
The kernel to use for the comparison against the PIT series (only the ‘quartic’ currently implemented). |

`conf.level` |
The confidence level at which the Null Hypothesis is evaluated. |

A novel method to analyze how well a conditional density fits the underlying
data is through the probability integral transformation (PIT) discussed in
Rosenblatt (1952) and used in the `BerkowitzTest`

.
More recently, Hong and Li (2005) introduced a nonparametric portmanteau test,
building on the work of Ait-Sahalia (1996), which tests the joint hypothesis of
i.i.d and uniformity for a series of PIT transformed data. To achieve this, it
tests for misspecification in the conditional moments of the model transformed
standardized residuals, and is distributed as N(0, 1) under the Null of
a correctly specified model. These moment tests are reported as ‘M(1,1)’
to ‘M(4,4)’ in the output, with ‘M(1,2)’ related to ARCH-in-mean
effects, and ‘M(2,1)’ to leverage, while ‘W’ is the Portmanteu type
test statistic for general misspecification (using p lags) and also distributed
as N(0, 1) under the Null of a correctly specified model. Only upper tail critical
values are used in this test. The interested reader is referred to the paper
for more details.

A list with the following items:

`statistic` |
The individual moment and joint test statistics. |

`Decision` |
Whether to reject or not the Null given the conf.level. |

Alexios Ghalanos

Ait-Sahalia, Y. (1996), Testing continuous-time models of the spot interest
rate, *Review of Financial Studies*, **9(2)**, 385–426.

Berkowitz, J. (2001), Testing density forecasts, with applications to risk
management, *Journal of Business and Economic Statistics*, **19(4)**,
465–474.

Hong, Y., and Li, H. (2005), Nonparametric specification testing for
continuous-time models with applications to term structure of interest
rates, *Review of Financial Studies*, **18(1)**, 37–84.

Rosenblatt, M. (1952), Remarks on a multivariate transformation, *The
Annals of Mathematical Statistics*, **23(3)**, 470–472.

1 2 3 4 5 6 7 8 9 10 11 | ```
## Not run:
data(dji30ret)
spec = ugarchspec(mean.model = list(armaOrder = c(1,1), include.mean = TRUE),
variance.model = list(model = "gjrGARCH"), distribution.model = "sstd")
fit = ugarchfit(spec, data = dji30ret[, 1, drop = FALSE])
z = residuals(fit)/sigma(fit)
PIT = pdist("sstd",z, mu = 0, sigma = 1, skew = coef(fit)["skew"],
shape=coef(fit)["shape"])
print(HLTest(PIT, lags=4))
## End(Not run)
``` |

rugarch documentation built on Feb. 5, 2018, 1:01 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.