# Panjer recursion

The Panjer recursion is an algorithm to compute the probability distribution approximation of a compound random variable ${\displaystyle S=\sum _{i=1}^{N}X_{i}\,}$. where both ${\displaystyle N\,}$ and ${\displaystyle X_{i}\,}$ are random variables and of special types. In more general cases the distribution of S is a compound distribution. The recursion for the special cases considered was introduced in a paper [1] by Harry Panjer (Emeritus professor, University of Waterloo[2]). It is heavily used in actuarial science (see also systemic risk).

## Preliminaries

We are interested in the compound random variable ${\displaystyle S=\sum _{i=1}^{N}X_{i}\,}$ where ${\displaystyle N\,}$ and ${\displaystyle X_{i}\,}$ fulfill the following preconditions.

### Claim size distribution

We assume the ${\displaystyle X_{i}\,}$ to be i.i.d. and independent of ${\displaystyle N\,}$. Furthermore the ${\displaystyle X_{i}\,}$ have to be distributed on a lattice ${\displaystyle h\mathbb {N} _{0}\,}$ with latticewidth ${\displaystyle h>0\,}$.

${\displaystyle f_{k}=P[X_{i}=hk].\,}$

In actuarial practice, ${\displaystyle X_{i}\,}$ is obtained by discretisation of the claim density function (upper, lower...).

### Claim number distribution

The number of claims N is a random variable, which is said to have a "claim number distribution", and which can take values 0, 1, 2, .... etc.. For the "Panjer recursion", the probability distribution of N has to be a member of the Panjer class, otherwise known as the (a,b,0) class of distributions. This class consists of all counting random variables which fulfill the following relation:

${\displaystyle P[N=k]=p_{k}=\left(a+{\frac {b}{k}}\right)\cdot p_{k-1},~~k\geq 1.\,}$

for some ${\displaystyle a}$ and ${\displaystyle b}$ which fulfill ${\displaystyle a+b\geq 0\,}$. The initial value ${\displaystyle p_{0}\,}$ is determined such that ${\displaystyle \sum _{k=0}^{\infty }p_{k}=1.\,}$

The Panjer recursion makes use of this iterative relationship to specify a recursive way of constructing the probability distribution of S. In the following ${\displaystyle W_{N}(x)\,}$ denotes the probability generating function of N: for this see the table in (a,b,0) class of distributions.

In the case of claim number is known, please note the De Pril algorithm. This algorithm is suitable to compute the sum distribution of ${\displaystyle n}$ discrete random variables.[3]

## Recursion

The algorithm now gives a recursion to compute the ${\displaystyle g_{k}=P[S=hk]\,}$.

The starting value is ${\displaystyle g_{0}=W_{N}(f_{0})\,}$ with the special cases

${\displaystyle g_{0}=p_{0}\cdot \exp(f_{0}b)\quad {\text{ if }}\quad a=0,\,}$

and

${\displaystyle g_{0}={\frac {p_{0}}{(1-f_{0}a)^{1+b/a}}}\quad {\text{ for }}\quad a\neq 0,\,}$

and proceed with

${\displaystyle g_{k}={\frac {1}{1-f_{0}a}}\sum _{j=1}^{k}\left(a+{\frac {b\cdot j}{k}}\right)\cdot f_{j}\cdot g_{k-j}.\,}$

## Example

The following example shows the approximated density of ${\displaystyle \scriptstyle S\,=\,\sum _{i=1}^{N}X_{i}}$ where ${\displaystyle \scriptstyle N\,\sim \,{\text{NegBin}}(3.5,0.3)\,}$ and ${\displaystyle \scriptstyle X\,\sim \,{\text{Frechet}}(1.7,1)}$ with lattice width h = 0.04. (See Fréchet distribution.)

As observed, an issue may arise at the initialization of the recursion. Guégan and Hassani (2009) have proposed a solution to deal with that issue .[4]

## References

1. ^ Panjer, Harry H. (1981). "Recursive evaluation of a family of compound distributions." (PDF). ASTIN Bulletin. International Actuarial Association. 12 (1): 22–26.
2. ^ CV, actuaries.org; Staff page, math.uwaterloo.ca
3. ^ De Pril, N. (1988). "Improved approximations for the aggregate claims distribution of a life insurance portfolio". Scandinavian Actuarial Journal. 1988: 61. doi:10.1080/03461238.1988.10413837.
4. ^ Guégan, D.; Hassani, B.K. (2009). "A modified Panjer algorithm for operational risk capital calculations". Journal of Operational Risk. 4 (4): 53–72.