Sample codes

The sample codes are presented in a pedagogical rather than efficient/elegant way. You are free to modify them according to your needs and distributed according to the licence.

Sample codes are given in R  (homepage, reference card, download). 

- LINK Sample code for computing the figures in Table 4 in: 

          Embrechts, P., Puccetti, G. and L. Rüschendorf (2013). Model uncertainty and VaR aggregation. J. Bank. Financ., 37(8), 2750-2764. paper - post-print (updated) version

- LINK Sample codes for the DNB example described in:

          Aas, K. and G. Puccetti (2014). Bounds for total economic capital: the DNB case study. Extremes, 17(4), 693-715 paper  SSRN

- LINK Sample code for computing the figures in Table 4 in: 

          Puccetti, G. (2013). Sharp bounds on the expected shortfall for a sum of dependent random variables. Stat. Probabil. Lett., 83(4), 1227-1232 paper - preprint

          

          This last code has been improved according to the discretization technique described in Section 2.2.1 in

          Jakobsons, E., Vanduffel, S. (2015). Dependence Uncertainty Bounds for the Expectile of a Portfolio. Risks 3, 599-623. paper