STFruin07 (MatLab R2007b)
STFruin07 produces the ruin probability in infinite time for mixture of 2 exponentials distribution claims given by Lundberg approximation. Need "moments.m" function.
Click the button to demonstrate a graph view. 
Notice: This content requires Java Runtime Environment.
Java Applet and JavaScript should be allowed on your browser.
Fri, May 04 2012 by Dedy Dwi Prastyo
moments.m
- Ruin probability in infinite time for mixture of 2 exponentials distribution claims given by Lundberg approximation.
clear all; close all, clc; format long; u=[0;10^9;5*10^9;10^10;2*10^10;5*10^10]; % initial capital of insurance company (in USD) theta=0.3; % relative safety loading dparameters1=[0.0584 , 3.5900e-10 ; 0.9416 , 7.5088e-09]; % weights (first column) and exponential parameters (second column) m=moments(1,dparameters1); % 1st raw moment m2=moments(2,dparameters1); % 2nd raw moment m3=moments(3,dparameters1); % 3nd raw moment psi=(1+(theta*u-m2/m/2).*(4*theta*m^2*m3/(3*m2^3))).*exp(-(2*m*theta*u)/m2)