Code covered by the BSD License
by Ben Petschel
17 Mar 2009 (Updated 17 Mar 2009)
Approximate the distribution of a compound random variable by Panjer recursion.
| Watch this File
Example: plot distribution of compound Poisson/Lognormal
n = 1e4; xmax = 100; lam = 10; mu = 0; sig = 1; [gl,gu,xp,GL,GU]=panjer(@(x)logncdf(x,mu,sig),0,lam,xmax/n,n); plot(xp,GL,'b-',xp,GU,'r-');
See help for more details.
updated comments
Contact us at files@mathworks.com