mmc_lev: MMC Test for Leverage in SV(p) Models

View source: R/svp_test.R

mmc_levR Documentation

MMC Test for Leverage in SV(p) Models

Description

Performs a Maximized Monte Carlo (MMC) test of the null hypothesis H_0: \rho = \rho_0 by maximizing the MC p-value over nuisance parameters (phi, sigma_y, sigma_v).

Usage

mmc_lev(
  y,
  p = 1,
  J = 10,
  N = 99,
  rho_null = 0,
  burnin = 500,
  eps = NULL,
  threshold = 1,
  method = "pso",
  maxit = NULL,
  rho_type = "pearson",
  del = 1e-10,
  trunc_lev = TRUE,
  wDecay = FALSE,
  Bartlett = FALSE,
  Amat = NULL,
  errorType = "Gaussian",
  logNu = FALSE,
  sigvMethod = "factored",
  winsorize_eps = 0
)

Arguments

y

Numeric vector. Observed returns.

p

Integer. Order of the volatility process. Default 1.

J

Integer. Winsorizing parameter. Default 10.

N

Integer. Number of Monte Carlo replications. Default 99.

rho_null

Numeric. Value of \rho under the null. Default 0.

burnin

Integer. Burn-in for simulation. Default 500.

eps

Numeric vector. Half-width of the search region around the estimated nuisance parameters. For Gaussian: length p+2 (phi, sigma_y, sigma_v). For Student-t/GED: length p+2 (phi, sigma_y, sigma_v; nu bounds set proportionally at +/-30 length p+3 (phi, sigma_y, sigma_v, nu). Default NULL which uses rep(0.3, p+2) with proportional nu bounds.

threshold

Numeric. Target p-value (optimization stops if reached). Default 1.

method

Character. Optimization method: "pso" (particle swarm), "GenSA" (generalized simulated annealing). Default "pso".

maxit

Integer or list. Maximum iterations/evaluations for the optimizer. Default depends on method.

rho_type

Character. Correlation type. Default "pearson".

del

Numeric. Small constant for log transformation. Default 1e-10.

trunc_lev

Logical. Truncate leverage correlation estimate to [-0.999, 0.999]. Default TRUE.

wDecay

Logical. Use decaying weights. Default FALSE.

Bartlett

Logical. If TRUE, use Bartlett kernel HAC weighting matrix. If FALSE, use identity matrix. Default FALSE.

Amat

Weighting matrix specification. NULL (default) for identity weighting, "Weighted" for data-driven HAC, or a numeric matrix of dimension (p+3)x(p+3) (Gaussian) or (p+4)x(p+4) (heavy-tail). Takes precedence over Bartlett.

errorType

Character. Error distribution: "Gaussian" (default), "Student-t", or "GED".

logNu

Logical. Use log-space for nu estimation (Student-t only). Default FALSE.

sigvMethod

Method for sigma_v estimation: "factored" (default), "direct", or "hybrid".

winsorize_eps

Number of extreme autocovariance lags to winsorize (0 = none). Default 0.

Value

A list with the optimization output including:

value

Maximized p-value.

par

Nuisance parameter values at the maximum.

Additional fields depend on the optimization method used.

Examples


y <- sim_svp(1000, phi = 0.95, sigy = 1, sigv = 0.2, leverage = TRUE, rho = -0.3)$y
mmc <- mmc_lev(y, p = 1, J = 10, N = 19, method = "pso", maxit = 10)
mmc$value



wARMASVp documentation built on May 15, 2026, 5:07 p.m.