Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
171 views

Life Contingencies II Commutation Functions Mortality Table: GKM95

This document summarizes the calculation of commutation functions using a mortality table (GKM95). It initializes various arrays (lx, dx, Dx, etc.) and calculates the values in each array using a for loop. It then prints out the results, showing the values in each array by age.

Uploaded by

david Abotsitse
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views

Life Contingencies II Commutation Functions Mortality Table: GKM95

This document summarizes the calculation of commutation functions using a mortality table (GKM95). It initializes various arrays (lx, dx, Dx, etc.) and calculates the values in each array using a for loop. It then prints out the results, showing the values in each array by age.

Uploaded by

david Abotsitse
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Life Contingencies II

Commutation functions

Mortality table: GKM95

> restart;
> filename := "d:/lc2/qx_GKM95.txt":
> qx := array( 0..120 ):
t := 1; # anything different from []
while t <> [] do
t := fscanf( filename, "%d%f" );
#print( t );
if t <> [] then
age := t[1];
qx[age] := t[2];
# printf("%30d %12f \n", age, qx[age] );
end if;
end do:
omega := age + 1;
close( filename, "%d%f" ):

td1 (1)
w d 120
> i := 0.035;
i d 0.035 (2)
> Round01 := proc( x ) 0.01 * round( 100 * x ) end;
Round01 d proc x 0.01 * round 100 * x end proc (3)
----------- Using commutation functions

> Digits := 16;


Digits d 16 (4)
> lx := Array( 0..omega ): # intialized to zeros by default
> dx := Array( 0..omega ):
> Dx := Array( 0..omega ):
> Nx := Array( 0..omega ):
> Sx := Array( 0..omega ):
> Cx := Array( 0..omega ):
> Mx := Array( 0..omega ):
> Rx := Array( 0..omega ):
> v := 1/(1+i):
> lx[15] := 100000.0:

for x from 15 to omega-1 do


dx[x] := Round01( lx[x] * qx[x]);
lx[x+1] := lx[x] - dx[x];
Dx[x] := Round01( v^x * lx[x] );
Cx[x] := Round01( v^(x+1) * dx[x] );
#printf("%22d %12.2f %12.2f %12.f\n", x, lx[x], Dx[x], Cx[x] );
end do:

Nx[omega] := 0:
for x from omega-1 to 15 by -1 do
Nx[x] := Nx[x+1] + Dx[x];
Sx[x] := Sx[x+1] + Nx[x];
Mx[x] := Mx[x+1] + Cx[x];
Rx[x] := Rx[x+1] + Mx[x];
end do:

printf("%4s %9s %10s %12s %12s %6s %10s %12s\n", "x", "lx", "Dx",
"Nx", "Sx", "Cx", "Mx", "Rx" );
for x from 15 to omega-1 do
printf("%4d %10.2f %10.2f %12.2f %12.2f %6.2f %10.2f %12.2f\n", x,
lx[x], Dx[x], Nx[x], Sx[x], Cx[x], Mx[x], Rx[x] ); end do:

x lx Dx Nx Sx Cx Mx Rx
15 100000.00 59689.06 1506562.36 31712794.13 91.03 8742.46 434145.26
16 99842.15 57579.56 1446873.30 30206231.77 88.74 8651.43 425402.80
17 99682.89 55543.68 1389293.74 28759358.47 85.90 8562.69 416751.37
18 99523.34 53579.50 1333750.06 27370064.73 82.57 8476.79 408188.68
19 99364.60 51685.06 1280170.56 26036314.67 78.83 8394.22 399711.89
20 99207.75 49858.43 1228485.50 24756144.11 74.68 8315.39 391317.67
21 99053.95 48097.72 1178627.07 23527658.61 70.14 8240.71 383002.28
22 98904.44 46401.08 1130529.35 22349031.54 65.65 8170.57 374761.57
23 98759.61 44766.31 1084128.27 21218502.19 61.58 8104.92 366591.00
24 98619.00 43190.89 1039361.96 20134373.92 57.92 8043.34 358486.08
25 98482.12 41672.41 996171.07 19095011.96 54.65 7985.42 350442.74
26 98348.44 40208.55 954498.66 18098840.89 51.77 7930.77 342457.32
27 98217.39 38797.07 914290.11 17144342.23 49.24 7879.00 334526.55
28 98088.36 37435.85 875493.04 16230052.12 47.09 7829.76 326647.55
29 97960.67 36122.82 838057.19 15354559.08 45.26 7782.67 318817.79
30 97833.63 34856.01 801934.37 14516501.89 43.76 7737.41 311035.12
31 97706.50 33633.54 767078.36 13714567.52 42.58 7693.65 303297.71
32 97578.47 32453.59 733444.82 12947489.16 41.70 7651.07 295604.06
33 97448.70 31314.43 700991.23 12214044.34 41.10 7609.37 287952.99
34 97316.31 30214.38 669676.80 11513053.11 40.78 7568.27 280343.62
35 97180.36 29151.86 639462.42 10843376.31 40.71 7527.49 272775.35
36 97039.90 28125.34 610310.56 10203913.89 40.88 7486.78 265247.86
37 96893.90 27133.35 582185.22 9593603.33 41.30 7445.90 257761.08
38 96741.25 26174.50 555051.87 9011418.11 41.96 7404.60 250315.18
39 96580.75 25247.42 528877.37 8456366.24 42.85 7362.64 242910.58
40 96411.10 24350.79 503629.95 7927488.87 43.98 7319.79 235547.94
41 96230.87 23483.35 479279.16 7423858.92 45.34 7275.81 228228.15
42 96038.57 22643.89 455795.81 6944579.76 46.92 7230.47 220952.34
43 95832.62 21831.24 433151.92 6488783.95 48.72 7183.55 213721.87
44 95611.28 21044.26 411320.68 6055632.03 50.77 7134.83 206538.32
45 95372.54 20281.85 390276.42 5644311.35 53.12 7084.06 199403.49
46 95114.01 19542.87 369994.57 5254034.93 55.79 7030.94 192319.43
47 94833.00 18826.22 350451.70 4884040.36 58.80 6975.15 185288.49
48 94526.45 18130.78 331625.48 4533588.66 62.16 6916.35 178313.34
49 94191.05 17455.51 313494.70 4201963.18 65.87 6854.19 171396.99
50 93823.17 16799.36 296039.19 3888468.48 69.94 6788.32 164542.80
51 93418.91 16161.32 279239.83 3592429.29 74.34 6718.38 157754.48
52 92974.18 15540.47 263078.51 3313189.46 79.06 6644.04 151036.10
53 92484.62 14935.89 247538.04 3050110.95 84.09 6564.98 144392.06
54 91945.72 14346.72 232602.15 2802572.91 89.37 6480.89 137827.08
55 91352.91 13772.19 218255.43 2569970.76 94.87 6391.52 131346.19
56 90701.62 13211.60 204483.24 2351715.33 100.53 6296.65 124954.67
57 89987.29 12664.30 191271.64 2147232.09 106.31 6196.12 118658.02
58 89205.44 12129.73 178607.34 1955960.45 112.16 6089.81 112461.90
59 88351.71 11607.38 166477.61 1777353.11 118.03 5977.65 106372.09
60 87421.89 11096.84 154870.23 1610875.50 123.86 5859.62 100394.44
61 86411.98 10597.72 143773.39 1456005.27 129.60 5735.76 94534.82
62 85318.25 10109.75 133175.67 1312231.88 135.20 5606.16 88799.06
63 84137.30 9632.67 123065.92 1179056.21 140.61 5470.96 83192.90
64 82866.13 9166.31 113433.25 1055990.29 145.77 5330.35 77721.94
65 81502.17 8710.57 104266.94 942557.04 152.08 5184.58 72391.59
66 80029.38 8263.92 95556.37 838290.10 159.94 5032.50 67207.01
67 78426.29 7824.53 87292.45 742733.73 168.90 4872.56 62174.51
68 76674.12 7391.03 79467.92 655441.28 178.54 4703.66 57301.95
69 74757.13 6962.55 72076.89 575973.36 188.44 4525.12 52598.29
70 72663.06 6538.67 65114.34 503896.47 198.19 4336.68 48073.17
71 70383.52 6119.36 58575.67 438782.13 207.41 4138.49 43736.49
72 67914.41 5705.01 52456.31 380206.46 215.74 3931.08 39598.00
73 65256.24 5296.35 46751.30 327750.15 222.85 3715.34 35666.92
74 62414.40 4894.39 41454.95 280998.85 228.44 3492.49 31951.58
75 59399.30 4500.44 36560.56 239543.90 232.27 3264.05 28459.09
76 56226.41 4115.98 32060.12 202983.34 234.13 3031.78 25195.04
77 52916.11 3742.67 27944.14 170923.22 233.90 2797.65 22163.26
78 49493.36 3382.20 24201.47 142979.08 231.49 2563.75 19365.61
79 45987.23 3036.33 20819.27 118777.61 226.91 2332.26 16801.86
80 42430.21 2706.74 17782.94 97958.34 220.21 2105.35 14469.60
81 38857.36 2395.00 15076.20 80175.40 211.53 1885.14 12364.25
82 35305.32 2102.48 12681.20 65099.20 201.04 1673.61 10479.11
83 31811.18 1830.34 10578.72 52418.00 189.00 1472.57 8805.50
84 28411.33 1579.44 8748.38 41839.28 175.69 1283.57 7332.93
85 25140.27 1350.33 7168.94 33090.90 161.44 1107.88 6049.36
86 22029.45 1143.23 5818.61 25921.96 146.57 946.44 4941.48
87 19106.26 958.00 4675.38 20103.35 131.44 799.87 3995.04
88 16393.17 794.17 3717.38 15427.97 116.37 668.43 3195.17
89 13907.05 650.94 2923.21 11710.59 101.67 552.06 2526.74
90 11658.82 527.26 2272.27 8787.38 87.63 450.39 1974.68
91 9653.32 421.80 1745.01 6515.11 74.46 362.76 1524.29
92 7889.46 333.07 1323.21 4770.10 62.36 288.30 1161.53
93 6360.68 259.45 990.14 3446.89 51.43 225.94 873.23
94 5055.60 199.24 730.69 2456.75 41.76 174.51 647.29
95 3958.87 150.74 531.45 1726.06 33.36 132.75 472.78
96 3052.14 112.29 380.71 1194.61 26.20 99.39 340.03
97 2315.08 82.29 268.42 813.90 20.22 73.19 240.64
98 1726.37 59.29 186.13 545.48 15.32 52.97 167.45
99 1264.66 41.96 126.84 359.35 11.39 37.65 114.48
100 909.35 29.15 84.88 232.51 8.30 26.26 76.83
101 641.27 19.86 55.73 147.63 5.93 17.96 50.57
102 443.11 13.26 35.87 91.90 4.15 12.03 32.61
103 299.74 8.67 22.61 56.03 2.83 7.88 20.58
104 198.29 5.54 13.94 33.42 1.89 5.05 12.70
105 128.15 3.46 8.40 19.48 1.23 3.16 7.65
106 80.82 2.11 4.94 11.08 0.78 1.93 4.49
107 49.68 1.25 2.83 6.14 0.49 1.15 2.56
108 29.73 0.72 1.58 3.31 0.29 0.66 1.41
109 17.30 0.41 0.86 1.73 0.17 0.37 0.75
110 9.77 0.22 0.45 0.87 0.10 0.20 0.38
111 5.35 0.12 0.23 0.42 0.05 0.10 0.18
112 2.83 0.06 0.11 0.19 0.03 0.05 0.08
113 1.45 0.03 0.05 0.08 0.01 0.02 0.03
114 0.72 0.01 0.02 0.03 0.01 0.01 0.01
115 0.34 0.01 0.01 0.01 0.00 0.00 0.00
116 0.15 0.00 0.00 0.00 0.00 0.00 0.00
117 0.07 0.00 0.00 0.00 0.00 0.00 0.00
118 0.03 0.00 0.00 0.00 0.00 0.00 0.00
119 0.01 0.00 0.00 0.00 0.00 0.00 0.00

You might also like