**Algorithm 1. Spectral Approximation Steps:**

	- (a) Choose the accuracy of the ruin probability *δ* for a fixed *u* > 0.
	- (b) Calculate *k* required to achieve this accuracy using Lemma 3 and set = 1
	- 2(*k* 1).(c) Define *k* quantiles such that *SH*(*<sup>λ</sup>*1) = , *SH*(*<sup>λ</sup>i*) = 2(*i* − <sup>1</sup>), *i* = 2, ... , *k* − 1, and *SH*(*<sup>λ</sup>k*) = 1 − .

−

(d) Approximate the spectral cdf *SH*(*y*) with the step function

$$\hat{S}\_H(y) = \begin{cases} 0, & y \in [0, \lambda\_1), \\ \epsilon, & y \in [\lambda\_1, \lambda\_2), \\ (2i - 1)\epsilon, & y \in [\lambda\_i, \lambda\_{i+1}), \ i = 2, \dots, k - 1, \\ 1, & y \ge \lambda\_k. \end{cases}$$


$$\overline{\underset{11\ldots n}{\phi s \mathcal{L}} \left\{ \overleftarrow{\overleftarrow{H}(u)} \right\} (s) + 1 - \phi}^{}$$

6. Use simple fraction decomposition to determine positive real numbers *Ri*, *ηi*, *i* = 1, ... , *k*, with ∑*ki*=<sup>1</sup> *Ri* = 1, such that L +*ψ*<sup>ˆ</sup>(*u*), (*s*) = *φ k* ∑ *i*=1 *Ri* 1 *s* + *ηi* .

7. Invert the previous Laplace transform to find *ψ*<sup>ˆ</sup>(*u*) = *φ k* ∑ *i*=1 *Rie*−*ηiu*, *u* ≥ 0. *H*ˆ

8. The accuracy for *ψ*<sup>ˆ</sup>(*u*) is then <sup>D</sup>(*<sup>H</sup>*, )(1 − *φ*)*φ* 1 − *φ<sup>H</sup>*(*u*)<sup>1</sup> − *φH*<sup>ˆ</sup> (*u*) , ∀*u* > 0.

**Remark 3.** *The decomposition of* L +*ψ*<sup>ˆ</sup>(*u*), (*s*) *at Step 6 is guaranteed by Asmussen and Rolski (1992), who showed that the ruin probability in the Sparre Andersen model has a phase-type representation when the claim sizes are phase-type. Moreover, the particular hyperexponential representation of ψ*<sup>ˆ</sup>(*u*) *at Step 7 occurs because the poles of* L +*ψ*<sup>ˆ</sup>(*u*), (*s*) *are exactly the roots of the polynomial function <sup>P</sup>φ*(*s*) = ∏*ki*=<sup>1</sup>(*<sup>s</sup>* + *<sup>λ</sup>i*) − *φ* ∏*ki*=<sup>1</sup>(*<sup>s</sup>* + *<sup>λ</sup>i*) − *s* ∏*ki*=<sup>1</sup>(<sup>2</sup> − *δi*1 − *<sup>δ</sup>ik*)(*<sup>s</sup>* + *<sup>λ</sup>i*)/2(*<sup>k</sup>* − 1) *, where δij is the Kronecker delta. It is immediate from perturbation theory that <sup>P</sup>φ*(*s*) *has exactly k simple roots analytic in φ; see Baumgärtel (1985) for details.*

**Remark 4.** *The above algorithm is an extension of the one developed for the Cramér–Lundberg model in Vatamidou et al. (2014), to which we refer for further details on technical implementation.*
