-
Notifications
You must be signed in to change notification settings - Fork 3
R: EWMA_RiskMetrics()
Solbiati Alessandro edited this page Jul 31, 2016
·
3 revisions
EWMA_RiskMetrics <- function(Serie,conf,usage,s_startdate,s_enddate,VaR)
##Description
EWMA_RiskMetrics main function: computes and tests all the processes of the EWMA Volatility and VaR estimations.
NOTE: The function return a matrix 'EWMA_result'. To obtain the p-value of the binomial test on the effectiviness of the computed Value at Risk use "as.numeric(EWMA_RiskMetrics(...)%p.value[1])"
##Functions required
- calc_Volatility() [calc_Volatility.R]
- calc_VaRnp() [calc_VaRnp.R ]
- calc_VaRnorm() [calc_VaRnorm.R ]
- calc_VaRt() [calc_VaRt.R ]
- exe_backtesting() [exe_backtesting.R]
##ARGUMENTS:
- Serie –> the time-serie object with financial data
- cons -> confidence level
- usage -> methods for the VaR calculation
- start_date -> start date for the statistical sample
- end_date -> end date for the statistical sample
- VaR -> TRUE/FALSE to compute VAR/ES