arq: Autoregressive quantile model

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/arq.R

Description

Fits an autoregressive quantile model with realized measures.

Usage

1
arq(r, p, x, model = "s", sv = NULL)

Arguments

r

Vector returns on an asset.

p

Probability level of the quantile (scalar).

x

Vector of observations for a realized measure.

model

Type of model. "s" is default. See the details.

sv

Vector of starting values. This is an optional argument.

Details

Parameters are estimated minimizing the quantile loss function. Optimization is performed with the optim() function alternating "BFGS" and "Nelder-Mead" algorithms until convergence as in Engle and Manganelli (2003).

model currently allows to select one quantile models: "s". For a quantile q^{p} at level p the model is

q^{p}_t = b_0 + b_1 q^{p}_{t-1} + b_2 x_{t-1}

where x_{t-1} is the lagged value of the realized measure.

Value

A list containing:

estimates

Vector of estimated parameters.

value

Minimized value of the loss function.

q

Vector of fitted quantiles.

Author(s)

Luca Trapin

References

Engle, R. F., and Manganelli, S. (2004). CAViaR: Conditional autoregressive value at risk by regression quantiles. Journal of Business & Economic Statistics, 22(4), 367-381.

See Also

arq.forecast

Examples

1
2
3
# Fit the ARQ model
p   <- 0.95
fit <- arq(sp500$r, p, sp500$rv)

lucatrapin/FinEx documentation built on Dec. 21, 2021, 11:52 a.m.