ValAR: Value-at-Risk estimation using the central quantile subspace

Description Usage Arguments Details Value References Examples

View source: R/ValAR.R

Description

ValAR estimates the one-step ahead τth Value-at-Risk for a vector of returns.

Usage

1
ValAR(y, p, tau, movwind = NULL, chronological = TRUE)

Arguments

y

A vector of returns (1 x n).

p

An integer for the number of past observations to be used as predictor variables. This will form the n x p design matrix.

tau

A quantile level, a number strictly between 0 and 1. Commonly used choices are 0.01, 0.025, and 0.05.

movwind

An optional integer number for the moving window. If not specified, a default value of min(250, n - p) will be used. If specified, the moving window should be an integer between p and n - p. Typical values for moving windows correspond to one or two years of return values. If the user wants to use all observations to fit the model, then the moving window should be equal to n - p. Note that, the number n - p comes from the fact that the full data set starts from the (p + 1)th observation since we use the last p observations for prediction.

chronological

A logical operator to indicate whether the returns are in standard chronological order (from oldest to newest). The default value is TRUE. If the returns are in reverse chronological order, the function will rearrange them.

Details

The function calculates the τth Value-at-Risk of the next time occurrence, i.e., that number such that the probability that the returns fall below its negative value is τ. The parameter τ is typically chosen to be a small number such as 0.01, 0.025, or 0.05. By definition, the negative value of the τth Value-at-Risk is the τth conditional quantile. Therefore, the estimation is performed using a local linear conditional quantile estimation. However, prior to this nonparametric estimation, a dimension reduction technique is performed to select linear combinations of the predictor variables.

Specifically, the user provides a vector of returns y (usually log-returns) and an integer p for the number of past observations to be used as the predictor variables. The function then forms the m x p design matrix x, where m is the number of used observations. For example, m can be n - p if the user wants to use all observations, or m can be equal to the moving window (default value is min(250, n - p)). Value-at-Risk is then defined as the negative value of the τth conditional quantile of y given x. However, to aid the nonparametric estimation of the τth conditional quantile, the cqs function is applied to estimate the fewest linear combinations of the predictor x that contain all the information available on the conditional quantile function. Finally, the llqr function is applied to estimate the local linear conditional quantile of y using the extracted directions as the predictor variables.

For more details on the method and for an application to the Bitcoin data, see Christou (2020). Also, see Christou and Grabchak (2019) for a thorough comparison between the proposed methodology and commonly used methods.

Value

ValAR returns the one-step ahead τth Value-at-Risk.

References

Christou, E. (2020) Central quantile subspace. Statistics and Computing, 30, 677–695.

Christou, E., Grabchak, M. (2019) Estimation of value-at-risk using single index quantile regression. Journal of Applied Statistics, 46(13), 2418–2433.

Examples

1
2
3
4
5
6
7
8
9
# estimate the one-step ahead Value-at-Risk with default moving window
data(edhec, package = "PerformanceAnalytics")
y <- as.vector(edhec[, 1]) # Convertible Arbitrage
p <- 5 # use the 5 most recent observations as predictor variables
tau <- 0.05
ValAR(y, p, tau) # the data is already in standard chronological order

# compare it with the historical Value-at-Risk calculation
PerformanceAnalytics::VaR(y, 0.95, method = 'historical')

quantdr documentation built on April 20, 2021, 9:06 a.m.