req: Realized Extreme Quantile

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

View source: R/req.R

Description

Computes Value at Risk (VaR) using a dynamic threshold estimated with the arq() function and extreme value refinements as in Bee et al. (2018).

Usage

1
req(r, p, x, alpha, pa, model = "s", sv = NULL)

Arguments

r

Vector of returns on an asset.

p

Probability level of the dynamic threshold.

x

Vector of observations for a realized measure.

alpha

Probability level of the VaR.

pa

Probability level used to set the threshold in the Hill estimator.

model

Type of model: "s" is default. See details in the arq() function.

sv

Vector of starting values for the arq() model. This is an optional argument.

Details

Let q^{p} be the estimated dynamic threshold with the arq() model, the tail index (ξ) is computed on the quantile residuals, z^{p}=\frac{r}{q^{p}}, using the the Hill estimator,

\widehat{ξ}=\frac{1}{k} ∑^k_{j=1}\log≤ft(\frac{z^{p}_{(j)}}{z^{p}_{(k)}}\right),

where z^{p}_{(k)} is the order statistics associated to the probability level pa. The VaR is computed as

VaR^{α}_t=q^{p}_t z^{p}_k ≤ft(\frac{p}{α}\right)^{ξ}

Value

A list containing:

estimates

Parameters of the arq() model and the tail index.

value

Minimized value of the loss function from the arq() model.

p

Probability level of the dynamic threshold.

zk

Threshold value of the quantile residuals used to estimate the tail index.

q

Vector containing the dynamic threshold computed with the arq() model.

var

Vector containing the VaR estimates.

Author(s)

Luca Trapin

References

Bee, M., Dupuis, D. J., and Trapin, L. (2018). Realized extreme quantile: A joint model for conditional quantiles and measures of volatility with EVT refinements. Journal of Applied Econometrics, 33(3), 398-415.

See Also

arq, req.forecast

Examples

1
2
3
4
5
# Fit the REQ model
p <- 0.95
pa <- 0.975
alpha <- 0.99
fit <- req(sp500$r, p, sp500$rv, alpha, pa)

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