Dr Patrick J. Laub
Université Lyon 1
Sojourn times are the random lengths of time spent in each state
Markov process State space
Markov process State space
Matrix exponential
Density and tail
Moments
Laplace transform
Closure under addition, minimum, maximum
... and under conditioning
Your problem has "flowchart" structure.
"Coxian distribution"
"Calendar" Age
"Physical" age
X.S. Lin & X. Liu (2007) , M. Govorun, G. Latouche, & S. Loisel (2015).
S. Asmussen (2003), Applied Probability and Queues, 2nd Edition, Springer
Guaranteed Minimum Death Benefit
Equity-linked life insurance
High Water Death Benefit
The customer lives for years,
The stock price is an exponential jump diffusion,
Observations:
Derivatives?
Model (p.d.f.):
Hidden values:
\(B_i\) number of MC's starting in state \(i\)
\(Z_i\) total time spend in state \(i\)
\(N_{ij}\) number of transitions from state \(i\) to \(j\)
void rungekutta(int p, double *avector, double *gvector, double *bvector,
double **cmatrix, double dt, double h, double **T, double *t,
double **ka, double **kg, double **kb, double ***kc)
{
int i, j, k, m;
double eps, h2, sum;
i = dt/h;
h2 = dt/(i+1);
init_matrix(ka, 4, p);
init_matrix(kb, 4, p);
init_3dimmatrix(kc, 4, p, p);
if (kg != NULL)
init_matrix(kg, 4, p);
...
for (i=0; i < p; i++) {
avector[i] += (ka[0][i]+2*ka[1][i]+2*ka[2][i]+ka[3][i])/6;
bvector[i] += (kb[0][i]+2*kb[1][i]+2*kb[2][i]+kb[3][i])/6;
for (j=0; j < p; j++)
cmatrix[i][j] +=(kc[0][i][j]+2*kc[1][i][j]+2*kc[2][i][j]+kc[3][i][j])/6;
}
}
}
This function: 116 lines of C, built-in to Julia
Whole program: 1700 lines of C, 300 lines of Julia
# Run the ODE solver.
u0 = zeros(p*p)
pf = ParameterizedFunction(ode_observations!, fit)
prob = ODEProblem(pf, u0, (0.0, maximum(s.obs)))
sol = solve(prob, OwrenZen5())
https://github.com/Pat-Laub/EMpht.jl
In general, representation is not unique
Canonical form 1
Bowers et al (1997), Actuarial Mathematics, 2nd Edition
using Pkg
using EMpht
lt = EMpht.parse_settings("life_table.json")[1]
phCF200 = empht(lt, p=200, ph_structure="CanonicalForm1")
Phase-types are always light-tailed
Can 'splice' together a Franken-distribution
logClaims = log.(claims)
logClaimsCentered = logClaims .- minimum(logClaims) .+ 1e-4
~, int, intweight = bin_observations(logClaimsCentered, 500)
sInt = EMpht.Sample(int=int, intweight=intweight)
ph = empht(sInt, p=5)
logClaims = log.(claims)
logClaimsCentered = logClaims .- minimum(logClaims) .+ 1e-4
~, int, intweight = bin_observations(logClaimsCentered, 500)
sInt = EMpht.Sample(int=int, intweight=intweight)
ph = empht(sInt, p=40)
Questions?
https://slides.com/plaub/l2
Can make a phase-type look like a constant value