value_at_risk: Value-at-Risk function

View source: R/value_at_risk.R

value_at_riskR Documentation

Value-at-Risk function

Description

Value-at-Risk function

Usage

value_at_risk(
  returns,
  method = c("historical", "normal"),
  significance = 0.05,
  plot = TRUE
)

Arguments

returns

Numeric vector of portfolio or asset returns

method

Default historical method. Other possible normal distribution method

significance

Significance level for value-at-risk calculation. Deafult set to 0.05

plot

If TRUE plot VaR and ES.

Value

List with value-at-risk and expected shortfall.

Examples

value_at_risk(portfolio_returns, method = 'historical')
value_at_risk(portfolio_returns, method = 'normal')

pawel-wieczynski/PolishStock documentation built on March 23, 2022, 3:32 p.m.