Portfolio credit risk models as well as models for operational risk can often be treated analogously to the collective risk model coming from insurance. Applying the classical Panjer recursion in the collective risk model can lead to numerical instabilities, for instance if the claim number distribution is extended negative binomial or extended logarithmic. We present a generalization of Panjer’s recursion that leads to numerically stable algorithms. The algorithm can be applied to the collective risk model, where the claim number follows, for example, a Poisson distribution mixed over a generalized tempered stable distribution with exponent in (0, 1). De Pril’s recursion can be generalized in the same vein. We also present an analogue of our method for the collective model with a severity distribution having mixed support. Contents