*5.3. Numerical Results*

The goal of this section is to implement our algorithm to check the accuracy of the spectral approximation and the tightness of its accompanying bound, which is given in Theorem 1.

For Pareto claim sizes, we choose *a* = 2, *b* = 3, *c* = 1, *θ* = 0.4, *ν*1 = 1 and *ν*2 = 5, and we obtain E*W* = 0.52, E*X* = 0.33 and *φ* = 0.72897. For Weibull claim sizes, we choose *a* = 3, *c* = 1, *θ* = 0.2, *ν*1 = 1 and *ν*2 = 1/9, and we obtain E*W* = 7.4, E*X* = 6 and *φ* = 0.83184. Note that we performed extensive numerical experiments for various combinations of parameters, but we chose to present only these two cases since the qualitative conclusions are comparable among all cases. Our experiments are illustrated below.

• Impact of phases. It is intuitively true that the spectral approximation becomes more accurate as the number of phases increases. To test this hypothesis, we compare three different spectral approximations with number of phases 10, 30 and 100, respectively, with the exact value of the ruin probability (which we obtain through simulation). We display our results in Table 1 only for Pareto claim sizes. The conclusion is that, indeed, a more accurate spectral approximation is

achieved, as the number of phases increases for every fixed initial capital *u*, which is in line with expectations.


**Table 1.** The spectral approximation for different number of phases, under Pareto(2, 3) claim sizes. The numbers in the brackets correspond to the confidence intervals of the exact ruin probability.

•Quality of the bound. A compelling question regarding the bound is if it is strict or pessimistic, i.e., how far it is from the true error of the spectral approximation. To answer this question, we first need to determine the accuracy *δ* we would like to guarantee for the ruin probability. Using Lemma 3, we present, in Figure 2, the number of phases required in order to guarantee *δ* = 0.02 under Pareto(2, 3) claim sizes and *δ* = 0.05 under Weibull(0.5, 3) claim sizes as a function of *u*. For *u* = 30, the required number of phases is equal to *k* = 67 in the Pareto case. Similarly, we find that *k* = 11 for *u* = 17 in the Weibull case. We generate the spectral approximations with 67 and 11 phases, respectively, and compare in Figure 3 the true error (difference between simulation and spectral approximation) with the predicted error bound of Theorem 1 (green dotted line). The dashed cyan line in the left graph represents the worst-case scenario for the bound that was used in the proof of Lemma 3 to calculate the optimal number of phases to guarantee an error of at most *δ* = 0.02 up to *u* = 30.

**Figure 2.** Number of phases required to guarantee for each initial capital *u* an error bound (i) *δ* = 0.02 under Pareto(2, 3) claim sizes (**left graph**) and (ii) *δ* = 0.05 under Weibull(0.5, 3) claim sizes (**right graph**).

As we can observe in Figure 3, the true error is significantly smaller than the predicted error bound for small values of *u*, under Pareto(2, 3) claim sizes. This may be because, for small values of *u*, a smaller number of phases *k* is enough to guarantee *δ* = 0.02; see also Figure 2. Afterwards, the true error increases to the error bound by reaching its maximum value close to *u* = 40, and then drops to zero as *u* → <sup>∞</sup>, whereas the predicted bound remains constant. A similar behaviour is recognised under Weibull(0.5, 3) claim sizes, where now the true error is close to the predicted error bound for small values of *u*, as *k* = 11 is already a small number itself.

**Figure 3.** Comparison between the error bound and the true error, under Pareto(2, 3) (**left graph**) and Weibull(0.5, 3) (**right graph**) claim sizes. The dashed cyan line in the left graph corresponds to the worst-case scenario for the bound that was used to determine the number of phases in the spectral approximation that guarantee *δ* = 0.02 up to *u* = 30.

Finally, notice that the predicted error bound is almost 4 times smaller than *δ* = 0.02 in the Pareto case. This happens because <sup>D</sup>(*<sup>H</sup>*, *H*ˆ ) could be a lot smaller than ; see also Figure 1 where <sup>D</sup>(*<sup>H</sup>*, *H*ˆ ) < 0.1. However, most importantly, the true error is close to the predicted bound, and thus we can say that Lemma 3 provides a good proxy for the necessary number of phases *k* to achieve it.

• Comparison between spectral and heavy-tail approximations. As we pointed out in Section 4, the spectral approximation is expected to underestimate both the exact ruin probability and the asymptotic approximation *ψ*S (*u*) in Theorem 3 for large *u*, due to its exponential decay rate. It is of interest to see the magnitude of *u* for which the asymptotic approximation outperforms the spectral approximation.

We select the spectral approximations with *k* = 67 phases for Pareto(2, 3) claim sizes and *k* = 11 phases for Weibull(0.5, 3) claim sizes, as in the previous experiment, and present the distributions in a graph. The pink shadow in Figure 4 enfolding the spectral approximation represents its bound. We observe that for small values of *u*, the spectral approximation is more accurate than the heavy-tail approximation, where the second provides a rough estimate of the ruin probability. On the other hand, the heavy-tail approximation is slightly more accurate than the spectral approximation in the tail, i.e., for *u* > 25, under Pareto claim sizes. However, for the Weibull case, we observe that, even for values of *u* around 300, the spectral approximation still outperforms the heavy-tail approximation.

**Figure 4.** Comparison between the spectral approximation with *k* = 67 under Pareto(2, 3) claim sizes (**left graph**) and with *k* = 11 under Weibull(0.5, 3) claim sizes (**right graph**) and the heavy-tail approximation.
