expected_shortfall: Expected Shortfall

Description Usage Examples

Description

Estimate various parametric and non-parametric expected shortfall measures

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Compute 5% ES for the corporate portfolio
portfolio_returns %>%
  filter(portfolio == "corporate") %>%
  expected_shortfall(
    returns,
    alpha = 0.05,
    method = "historical simulation",
    weighting = weight_exp(lambda = 0.9)
  )

# Compute 1% ES for each portfolio
portfolio_returns %>%
  group_by(portfolio) %>%
  expected_shortfall(
    returns,
    alpha = 0.05,
    method = "Cornish Fisher"
  )

dandermotj/mmr documentation built on June 4, 2019, 9:26 p.m.