fundValue(t+1) = if t > 0 fundValue(t) - charges(t) + intCred(t) else initialPrem
charges(t) = netAmtAtRisk(t) * costOfInsurance(t) + riderCosts(t) + policyFee(t)
netAmtAtRisk = (FaceAmt - fundValue(t))
Now think layering on decrements
surrenderMargin(t) = lapseDecrement(t) * (surrenderCharge(t) * fundValue(t))
mortalityMargin(t) = mortalityDecrement(t) * netAmtAtRisk(t)
investmentMargin(t) = (earnedRate(t) - intCred(t)) * assetBase(t)
Now think layering on calcs necessary to calculate the assetBase (e.g. reserves + required capital)...
ps Thanks so much for taking the time to set this out.
pps I've been working on something that implements a highly optimised version of this style of calculation - with a DSL to describe the calcs - can do 30 year cashflow projection for 1m contracts in about 1 min on quad core laptop. UK focus initially but might have wider application?
I mean, in an ideal world you'd use Julia or a Cython extension, but if you already have something in Python/numpy, numba only requires you add a decorator to your function and it gets jitted.