Description Usage Arguments Details Examples
Functions for fitting uni- and multivariate NIG and HYP distribution.
1 2 3 4 5 6 7 8 9 | fit.NH(data, case = c("NIG", "HYP"), symmetric = FALSE,
se = FALSE, ...)
fit.mNH(data, symmetric = FALSE, case = c("NIG", "HYP"),
kvalue = NA, nit = 2000, tol = 1e-10, ...)
MCECMupdate(data, mix.pars, mu, Sigma, gamma, optpars, optfunc,
xieval=FALSE, ...)
MCECM.Qfunc(lambda, chi, psi, delta, eta, xi)
EMupdate(data, mix.pars, mu, Sigma, gamma, symmetric,
scaling = TRUE, kvalue = 1)
|
case |
|
chi |
|
data |
|
delta |
|
eta |
|
kvalue |
|
lambda |
|
mix.pars |
|
mu |
|
nit |
|
optpars |
|
optfunc |
|
psi |
|
scaling |
|
se |
|
Sigma |
|
symmetric |
|
tol |
|
gamma |
|
xi |
|
xieval |
|
... |
ellipsis, arguments are passed down to |
fit.NH()
: See pages 78–80 of QRM. Case ‘NIG’ sets
lambda = -1/2; case ‘HYP’ sets
lambda = 1.
fit.mNH()
: Fitting is accomplished by using a variant of the EM
algorithm (see pages 81–83 in QRM).
MCECMupdate()
: updates estimates of mixing parameters in EM
estimation of generalized hyperbolic (see Algorithm 3.14, steps (5)
and (6) on page 83 in QRM).
MCECM.Qfunc()
: a functional form that must be optimized when
fitting members of generalized hyperbolic family with an MCECM
algorithm (see function Q2 on page 82 of QRM).
EMupdate()
: updates estimates of location (mu),
dispersion (Sigma) and skewness (gamma)
parameters in EM estimation of multivariate generalized hyperbolic
distributions (see pages 81–83 in QRM; in that case k is the
determinant of the sample covariance matrix. “EM” is an acronym
for for “Expectation-Maximization” type of algorithm
used to fit proposed multivariate hyperbolic models to actual data).
1 2 3 4 5 6 7 8 9 10 11 12 | library(QRM)
data(DJ)
r <- returns(DJ)
s <- window(r[, "MSFT"], "1993-01-01", "2000-12-31")
mod.NIG <- fit.NH(100 * s, method = "BFGS")
## multivariate
stocks <- c("AXP","EK","BA","C","KO","MSFT",
"HWP","INTC","JPM","DIS")
ss <- window(r[, stocks], "1993-01-01", "2000-12-31")
fridays <- time(ss)[isWeekday(time(ss), wday = 5)]
ssw <- aggregate(ss, by = fridays, FUN = sum)
mod.mNIG <- fit.mNH(ssw, symmetric = FALSE, case = "NIG")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.