Learn R Programming

qgarch

qgarch is an R package for estimating and working with quadratic GARCH-in-mean models in the Campbell and Hentschel (1992) volatility-feedback framework.

We replicated and extended the original paper in: Jedrzej Bialkowski, Sanghyun Hong and Moritz Wagner (2025). "Is no news still good news? Volatility feedback revisited." Pacific-Basin Finance Journal, Volume 91. https://doi.org/10.1016/j.pacfin.2025.102708.

In the Campbell and Hentschel model, expected returns vary with conditional variance, and stock returns include a volatility-feedback term that helps capture asymmetric return dynamics. The framework is designed to accommodate features such as predictive asymmetry, negative skewness, and excess kurtosis in stock returns. See, John Y. Campbell, Ludger Hentschel (1992). "No news is good news: An asymmetric model of changing volatility in stock returns." Journal of Financial Economics, Volume 31, Issue 3, 281-318. https://doi.org/10.1016/0304-405X(92)90037-X.

What the package does

qgarch provides tools to:

  • fit generalized QGARCH-in-mean models with nonlinear maximum likelihood,
  • work with several model specifications through a common interface,
  • extract coefficients, fitted values, residuals, variance-covariance matrices, and log-likelihood values,
  • generate forecasts of the conditional mean and conditional variance,
  • compute moment diagnostics, and
  • compare nested specifications with likelihood-ratio tests.

The main estimation function is qgarch_fit(). It supports four model specifications:

  • model = "zero": sets lambda = 0,
  • model = "restricted": links lambda to the remaining parameters through the restricted mapping,
  • model = "free": estimates lambda freely, and
  • model = "threshold": allows a state-dependent lambda_t.

Installation

You can install the development version of qgarch directly from GitHub:

install.packages("remotes")
remotes::install_github("sho-125/qgarch")
library(qgarch)

Example

The example below installs the package from GitHub, loads the bundled monthly U.S. dataset, fits a QGARCH(1,1) model with freely estimated volatility-feedback parameter lambda, and then plots the fitted conditional variance and standardized residuals.

# Install from GitHub
install.packages("remotes")
remotes::install_github("sho-125/qgarch")

# Load package
library(qgarch)

# Load bundled example data
data("us_monthly", package = "qgarch")

# Extract excess returns
x <- us_monthly$ER

# Fit a QGARCH(1,1) model
fit11 <- qgarch_fit(
  x,
  model = "free",
  arch_order = 1L,
  garch_order = 1L
)

# Review estimation results
print(fit11)
summary(fit11)
coef(fit11)
logLik(fit11)

# Plot fitted conditional variance
plot(fit11, which = "sigma2")

# Plot standardized residuals
plot(fit11, which = "standardized")

Copy Link

Version

Install

install.packages('qgarch')

Version

0.1.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Sanghyun Hong

Last Published

May 7th, 2026

Functions in qgarch (0.1.0)

fitted.qgarch

Fitted values from a qgarch model
print.qgarch

Print a qgarch model
qgarch_default_starts

Default starting values for qgarch estimation
qgarch_lr_test

Likelihood ratio test for nested qgarch models
logLik.qgarch

Log-likelihood for a qgarch model
print.summary.qgarch

Print a qgarch summary
plot.qgarch

Plot a qgarch model
coef.qgarch

Extract coefficients from a qgarch model
predict.qgarch

Forecast from a generalized qgarch(m, n) model
qgarch_fit

Fit generalized qgarch(m, n) models
qgarch_moments

Compute sample moments for a series
residuals.qgarch

Residuals from a qgarch model
us_monthly

Monthly U.S. data
summary.qgarch

Summarize a qgarch model
vcov.qgarch

Variance-covariance matrix for a qgarch model