chainladder.maximum

Contents

chainladder.maximum#

chainladder.maximum(x1, x2)[source]#

Element-wise maximum of two triangles or a triangle and a scalar (delegates to Triangle.maximum).

Parameters:
x1Triangle

The first triangle operand.

x2Triangle or scalar

The second operand. If a scalar, each element of x1 is compared against that constant value.

Examples

maximum picks the higher ultimate at each origin, producing the high-side scenario. This is useful for stress testing or setting a conservative reserve when two methods produce different estimates.

tri = cl.load_sample("raa")
ult_vol = cl.Chainladder().fit(
    cl.Development(average="volume").fit_transform(tri)
).ultimate_
ult_sim = cl.Chainladder().fit(
    cl.Development(average="simple").fit_transform(tri)
).ultimate_
high_side = cl.maximum(ult_vol, ult_sim)
print(high_side.values[0, 0, -5:, 0].round(0))
[19807. 18201. 25475. 17776. 55781.]