Skip to contents

Accessor methods for the risk estimates of (cond_)portvine_roll objects

Usage

risk_estimates(
  roll,
  risk_measures = NULL,
  alpha = NULL,
  df = TRUE,
  exceeded = FALSE,
  ...
)

# S4 method for portvine_roll
risk_estimates(
  roll,
  risk_measures = NULL,
  alpha = NULL,
  df = TRUE,
  exceeded = FALSE
)

# S4 method for cond_portvine_roll
risk_estimates(
  roll,
  risk_measures = NULL,
  alpha = NULL,
  df = TRUE,
  exceeded = FALSE,
  cond = TRUE,
  cond_u = NULL
)

Arguments

roll

Object of class portvine_roll or a child class

risk_measures

Character vector of risk measures to filter for. Note that they must be fitted in the roll argument. The default will return all fitted risk measures

alpha

Numeric \(\alpha\) levels of the estimated risk measures to filter for. Note that they must be fitted in the roll argument. The default will return all fitted \(\alpha\) levels

df

Logical value if TRUE a data.frame is returned otherwise a data.table is returned.

exceeded

Logical value. If set to TRUE a column named exceeded will be appended that contains logical values telling whether the realized portfolio value exceeded the estimated risk.

...

Additional parameters for child class methods

cond

If set to TRUE returns the conditional risk estimates and otherwise returns the overall risk estimates.

cond_u

Numeric or character vector specifying the corresponding quantiles in (0,1) of the conditional variable(s) conditioned on which the conditional risk measures were calculated to filter for and/or the class "prior_resid"/"resid". Note that they must be fitted in the roll argument. The default will return all fitted risk measures.

Value

(Un-)filtered data.frame or data.table (see df argument) with at least the columns risk_measure, risk_est, alpha, row_num, vine_window and realized. exceeded column if the corresponding argument is set to TRUE. In the conditional case further columns are available (see: portvine_roll).

See also