Skip to content

R: calc_VaRt()

Solbiati Alessandro edited this page Jul 31, 2016 · 3 revisions

calc_VaRt <- function(Serie,conf,VaR,s_startdate,s_enddate,init=c(0,1,1))


##Description

Compute Value at Risk under Student's t distribution Hypothesis for the returns, if VaR==FALSE compute Expected Shortfall. The degree of freedom of the Student distribution are estimated with a max-likelihood function that sometimes does not converge, this could cause issues to the software.


##Usage

  • Serie –> the time-serie object with financial data
  • conf -> confidence level
  • start_date -> start date for the statistical sample
  • end_date -> end date for the statistical sample
  • VaR -> TRUE/FALSE to compute VAR/ES
Clone this wiki locally