December 17th, 2009, 9:52 am
Is this for computational finance PhD classes with William Shaw? Because I wrote this just last week...For empirical data, without giving the exact answer, use the quantile() function for both. The 2nd (cVaR) take the mean of all values less than the quantile. E.g. quantile(sort(returns),0.05) for VaR