Stats raving mad

The blog

Simulating the maximum…

by M. Parzakonis on November 9, 2009

Studying the distributional properties of the maximum is gaining more of attention nowadays given the relative failure of the conventional tools the quants used before the recession.

Let’s suppose that an insurance company faces the challenge to cover claims incurring in random time and size. The intensity of the process is $latex \lambda (t)=100t(1-t)$, $latex \lambda (0)=25$ and the process itself is (surprise!!!) Poisson. The claims are iid from a lognormal distribution with parameters $latex \mu=0.75t$ and $latex \sigma=1$, where $latex t$ is the intermediate time between occurence $latex i$ and $latex i-1$.

Some Mathematica code from my Graduate Simulation class is the following.

First we set up the intersity function and the generic vectors recoring Claims (Claimsv) and maximums (Maxv)

λ0 = 25; t0 = 1;
λ[t_] := 100 (t – t^2); Claimsv = {}; Maxv = {};

The main program is the following

Do[S = {}; t = 0; n = 0;
X = -Log[Random[]]/λ0; t = t + X;
While[t < t0, If[Random[] < λ[t]/λ0, n = n + 1; S = Append[S, t]];
X = -Log[Random[]]/λ0; t = t + X];
Claims = 0; S[[0]] = 0; Maxx = 0; Do[rr = Exp[
Random[NormalDistribution[0.75*(S[[i]] – S[[i - 1]]), 1]]];
If[rr > Maxx, Maxx = rr];
Claims = Claims + rr, {i, 1, n}] AppendTo[Claimsv, Claims];
AppendTo[Maxv, Maxx];, {10000}]

And plotting the histograms of the simulated distribution of the Claims and the maximum we nearly finished…

<< Histograms`

Histogram[Claims.v]
claimsv Histogram[Max.v]

maxv

to be continued…

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">