XS = np.arange(25_000, 875_000, 25_000)
CHAR = [.0508, .1291, .2009, .2676, .3289, .3843, .4341, .4788, .5189, .5548,
.6034, .6556, .7008, .7405, .7749, .8047, .8303, .8524, .8714, .8878,
.9045, .9201, .9332, .9442, .9534, .9611, .9675, .9728, .9773, .9810,
.9844, .9873, .9897, .9916]
RECU = [.0516, .1298, .2015, .2683, .3295, .3848, .4346, .4793, .5193, .5552,
.6040, .6561, .7013, .7408, .7752, .8049, .8305, .8526, .8716, .8879,
.9047, .9203, .9333, .9443, .9535, .9611, .9675, .9729, .9773, .9810,
.9844, .9873, .9897, .9916]
XR = [.9016, .8107, .7273, .6507, .5806, .5163, .4573, .4030, .3529, .3066,
.2642, .2273, .1951, .1672, .1431, .1221, .1039, .0880, .0742, .0622,
.0518, .0430, .0357, .0296, .0245, .0202, .0167, .0137, .0112, .0091,
.0074, .0060, .0048, .0039]
TG = [.0621, .1260, .1895, .2520, .3129, .3717, .4280, .4817, .5324, .5801,
.6245, .6658, .7039, .7388, .7707, .7995, .8255, .8488, .8696, .8881,
.9043, .9186, .9310, .9418, .9511, .9592, .9660, .9718, .9768, .9809,
.9844, .9873, .9897, .9917]
out = pd.DataFrame({'aggregate loss': XS, 'Venter char fn': CHAR,
'Venter recursive': RECU})
for bs, log2 in [(500, 16), (100, 18), (20, 20), (5, 22)]:
o = venter(bs, log2)
out[f'agg bs={bs}'] = [o.density_df.loc[x, 'F'] for x in XS]
if bs == 500:
out['agg excess ratio'] = [1 - o.density_df.loc[x, 'lev'] / o.est_m
for x in XS]
out['Venter excess ratio'] = XR
out['Venter transf gamma'] = TG
out['gengamma cdf'] = [tg.cdf(x) for x in XS]
GT(out.set_index('aggregate loss').head(12), float_format=4)
4 Comments
4.1 The bucket size selects which of Venter’s exact columns you get
Table 5 is the whole argument of this chapter. At Venter’s $500 discretization,
aggregateagrees with his recursive column to \(5\times10^{-5}\) over all 34 rows, which is exact at the four decimal places printed, and differs from his characteristic function column by up to \(8.2\times10^{-4}\). Refine the bucket and the two allegiances swap: bybs = 5the agreement with the characteristic function column is \(7\times10^{-5}\) and the disagreement with the recursive column has grown to \(8.4\times10^{-4}\).Venter presents two methods but we can reproduce both using FFTs at two resolutions.
aggregate’s FFT with a $500 bucket agrees with the Adelson and Panjer recursion, and FFT with a $5 bucket agrees with the characteristic function inversion. The 0.0008 that Venter reports as the gap between his two exact methods is not a difference between characteristic functions and recursion at all. It is the discretization error of a $500 bucket, and it is the same erroraggregateincurs when asked for the same bucket.4.2 The excess ratio and the transformed gamma
Table 6 puts both at \(5\times10^{-5}\), so both columns reproduce exactly at the printed precision. The excess ratio comes straight off
density_df['lev'], since \(R(a) = 1 - \mathsf E[L \wedge a] / \mathsf E[L]\).The transformed gamma check is worth doing for its own sake. Venter’s Appendix A solves two nonlinear equations in \(\Gamma\) functions by Newton iteration in APL, then Exhibit 1 evaluates the incomplete gamma by a 30 to 200 term series expansion.
scipy.stats.gengamma(0.5613125, 1.8300318, scale=417896.414)returns the same 34 values. The identification is exact rather than approximate: the transformed gamma with parameters \((r, \alpha, \lambda)\) isgengammawith shape \(a = r\), shape \(c = \alpha\) and scale \(1/\lambda\).4.3 On the approximation Venter was testing
Venter’s own verdict, that the transformed gamma is “reasonably close over a wide range of loss sizes”, reads generously with the exact answer beside it.
By Table 7 the three-moment fit crosses the exact distribution four times over the range, running 1.1 points of probability high at $25,000, 1.6 points low at $125,000, and 2.5 points high at $250,000, its worst single row. It does not settle inside a tenth of a point until $725,000. The excess ratio column holds up better where it matters commercially, within 2% of the ratio through $650,000, before degrading to 10% at $850,000 where the ratio itself is down to 0.0039.
That is a fair result for a three-parameter fit and a poor substitute for the exact calculation, which is precisely the trade Venter names in his summary: the exact methods “require more input information … and they also require substantially more computation”, and he predicts they will become “increasingly viable” as computing gets cheaper. The four builds in this document take a few seconds each.
4.4 What did not transcribe
Figure 1 also prints Venter’s $500 discrete PDF, and I could not decode its first five rows. The rule stated for the body of that column, that the probability at \(N\) is the piecewise linear probability from \(N - 250\) to \(N + 250\), reproduces the tabulated 0.04866875 for the $1,500 to $4,000 block exactly, but does not give the printed values at $500, $1,000, $4,500 or $5,000, and the printed $500 entry is more than twice what any nearest-bucket rule allows. Nothing here depends on it:
aggregatedoes its own discretization from the piecewise linear CDF, and the CDF is verified independently by the three severity moments.