View source: R/value_at_risk.R
value_at_risk | R Documentation |
Value-at-Risk function
value_at_risk( returns, method = c("historical", "normal"), significance = 0.05, plot = TRUE )
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. |
List with value-at-risk and expected shortfall.
value_at_risk(portfolio_returns, method = 'historical') value_at_risk(portfolio_returns, method = 'normal')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.