LifeFlow.
Project life-insurance cash flows and compute the reserves. Write your own flows as plain Python; LifeFlow vectorizes them across the whole portfolio as N × T grids and compiles the hot paths with numba.
lifeflowimport lifeflow as lf
port = lf.Portfolio(df, "id")
prob = lf.Probabilities(port, [qx])
@lf.grid(port, tl)
def death_benefit(t, capital):
return capital
# reserve = amount × probability × discount
reserve = (death_benefit()
* prob.exit_by(qx)
* discount).sum(axis=1)
LifeFlow computes reserves for life-insurance portfolios
Easy to write, flexible to your product, and fast at scale.
Easy to code
Yours to shape
Computationally efficient
LifeFlow works with numpy, not instead of it
LifeFlow doesn't box you into closed-form formulas. It gives the actuary a small set of tools — an object-oriented engine for in-force and exit probabilities, and decorators to project cash flows — so you keep total control of the numbers while the boilerplate and the performance are taken care of.
The arrays and the maths.
The actuarial structure and the speed.
Ideal for moving Excel calculations to Python and standardizing them into a calculation flow that is easy to design, reproducible and fast.