Loss severity distributions
Kernel density estimation in R
Catalina Bolancé & Montserrat Guillén
 Bolancé, C., Guillén, M. and Nielsen, J.P. (2003) Kernel density estimation of actuarial loss functions, Insurance: Mathematics and Economics, 32, 1936.
 Bolancé C., Guillén, M. and Pitt, D. (2014) Nonparametric models for univatiate claim severity distributions  an approach using R. UBriskcenter Working Paper Series 201401.
DATA DESCRIPTION
Name  Content of operational risk loss data 
Internal data set  75 observed loss amounts 
External data set  700 observed loss amounts 
Public data risk no. 1  1000 observed loss amounts for category no. 1 
Public data risk no. 2  400 observed loss amounts for category no. 2 
DESCRIPTIVE STATISTICS
Internal data  External data  Public data risk no. 1  Public data risk no. 2  
N  75  700  1000  400  
Mean 
0.1756  0.6788  42.0594  20.8933  
Std Deviation 
0.2777  4.0937  291.9634  95.9138  
Min 
0.0030  0.0010  0.0020  0.0030  
Max 
1.7730  52.1300  5122.1360  1027.5270 

KERNEL DENSITY ESTIMATION
 Classical kernel density estimation
For a random sample of n independent and identically
distributed observations x_{1},
x_{2},..., x_{n}
of a random variable X with pdf f_{X},
the kernel density estimator is
\begin{equation} \hat{f}_X\left( x\right)
=\frac{1}{n}\sum_{i=1}^{n}K_{b}\left(xx_{i}\right),
\label{Kerdens1} \end{equation}
where
\begin{equation}K_b(\cdot )=\frac{1}{b}K(\cdot
/b)\end{equation}
K is the kernel function and b is the
bandwidth.
 Transformations and kernel density estimation
 Selecting the transformation parameters and the bandwidth
As in Bolancé et al. (2003), we restrict the set of transformation parameters, λ=(λ_{1},λ_{2}), to those values that give approximately zero skewness for the transformed data (y_{1},..,y_{n}) (which have also been scaled to have the same variance as the original sample, see Wand et al. (1991)).
We define our sample measure of skewness as: \begin{equation} \widehat{\gamma }_{y}=\frac{n^{1}\sum\limits_{i=1}^{n}(y_{i}\overline{y})^{3}}{\left\{ n^{1}\sum\limits_{i=1}^{n}(y_{i}\overline{y} )^{2}\right\} ^{\frac{3}{2}}} \end{equation}
where y̅ is the sample mean of the transformed observations.
MEASURING THE GOODNESS OF FIT
REFERENCES
[1] Bolancé, C. (2010) Optimal Inverse Beta(3,3)
Transformation in kernel density estimation, SORT
Statistics and Operations Research Transaction, 34,
223238.
[2] Bolancé, C., Guillén, M., Gustafsson J. and
Nielsen, J.P. (2012) Quantitative
Operational Risk Models Chapman &
Hall/CRC.
[3] Bolancé, C., Guillén, M. and Nielsen, J.P. (2009)
Transformation kernel estimation of insurance claim
cost distribution, in Corazza, M. and Pizzi, C. (Eds),
Mathematical and Statistical Methods for Actuarial
Sciences and Finance, Springer, Roma, 223231.
[4] Bolancé, C., Guillén, M. and Nielsen, J.P. (2008)
Inverse Beta transformation in kernel density
estimation. Statistics & Probability Letters, 78,
17571764.
[5] Bolancé, C., Guillén, M. and Nielsen, J.P. (2003)
Kernel density estimation of actuarial loss functions,
Insurance: Mathematics and Economics, 32, 1936.
[6] Bolancé, C., Guillén, M. and Pitt, D. (2014)
Nonparametric models for univariate claim severity
distributions  an approach using R, UB
Riskcenter Working Papers Series 201401.
[7] BuchLarsen, T., Guillen, M., Nielsen, J.P. and
Bolancé, C. (2005) Kernel density estimation for
heavytailed distributions using the Champernowne
transformation. Statistics, 39, 503518.
[8] Clements, A.E., Hurn, A.S. and Lindsay, K.A.
(2003) Möebiuslike mappings and their use in kernel
density estimation, Journal of the American
Statistical Association, 98, 9931000.