Skip to content

How to test policy value calculations in life and unit-linked insurance

B2Bnetwork team · · 7 min

IT in insurance

In brief

Policy value calculations in life insurance are tested by comparing the system with an independent model on a set of policies that run through the whole term: premiums, allocation, unit cancellations for charges, fund valuation, surrender and benefit. Results are checked to the cent and to the unit, with rounding rules and valuation dates written down in advance. Most errors hide in dates, rounding and mid-term changes, not in the formula itself.

What makes up a policy value

A unit-linked policy (in Poland: a policy with an insurance capital fund, UFK) is an account of units that grows with premiums and shrinks with charges every month. A traditional policy has a mathematical reserve and a surrender value from tables instead. In both cases the value the customer sees is the result of many operations over time, so an error in one of them compounds for years.

ComponentHow it arisesTypical error
Allocated premiumpremium times the allocation rate for the policy yearrate taken from the calendar year instead of the policy year
Number of unitsamount divided by the unit price on the valuation dateprice from the payment date instead of the valuation date
Management chargeunits cancelled at an annual rate, charged periodicallydays in the year counted once as 365 and once as 366
Risk chargerate from a table by age times the sum at riskage from the birth date instead of the policy anniversary
Administration chargea fixed amount every monthtaken twice in a month with two premiums
Surrender valueaccount value minus the surrender charge for the policy yearpolicy year boundary shifted by one day
Surrender value (traditional)mathematical reserve by tables and technical interest ratea different mortality table after a product change

It is worth building this table for each product from the general terms and the fund rules. It becomes the list of what needs testing.

An independent model as the oracle

The policy system's result has to be compared with something. The oracle is a model built independently of the system code: an actuary's spreadsheet, a Python program or a script in an actuarial tool, written from the policy terms rather than from the developers' specification. When the same people write the model and the system from the same specification, they repeat the same mistake.

Differences between the model and the system fall into three groups:

  • system error: the system calculates differently from what the policy terms say;
  • model error: the model was simplified, for example it ignores days without a fund valuation;
  • ambiguous terms: the terms allow two readings, for example whether the risk charge is based on the sum insured or on the sum at risk after deducting the account value.

The third group is the most valuable, because it goes to the product owner and the actuary, and the decision is recorded as a rule. The role of the test oracle is covered by the ISTQB syllabus, and general test planning principles by the article on test plans and test strategy.

Dates, order of operations and time

A life policy runs for a decade or several, so tests have to move time forward. Each operation has several dates: money received, allocation to the policy, unit valuation and posting. The product terms say which one counts, and the system often uses a different one because it was easier.

Cases worth including in the set:

  1. A premium paid on Friday and valued on Monday because there was no fund valuation on Friday.
  2. A fund switch (sell in one fund, buy in another) with two different valuation dates.
  3. A partial withdrawal on the day the monthly charge is applied: which operation comes first.
  4. The insured person dies and the claim is reported weeks later: valuation by the date the terms specify.
  5. A policy anniversary in a leap year and a policy written on February 29.
  6. A policy with a gap in premium payments, followed by resumed payments.

Time tests require an environment where you can move the system date or run overnight batch jobs on demand. The same problem for non-life products is described in Regression testing at an insurer.

Rounding and tolerance

Rounding rules must be written down before results are compared. For each quantity you need the number of decimal places, the method (rounding or truncation) and the point at which it is applied. An illustrative calculation: if the number of units is rounded to four decimal places but the monthly charge is calculated from the unrounded value, after twenty years the difference between the two approaches can exceed one cent on many policies at once.

For monetary amounts the test tolerance should be zero. A tolerance of "a few cents" hides errors that add up to real money across the portfolio and makes the conversation harder with a customer who recalculates their own surrender value. If the model and the system must differ, the difference needs a named cause.

Test data and edge cases

The set of test policies combines two sources. The first is synthetic policies designed for edge cases. The second is a sample from the portfolio with personal data masked, because only that shows combinations nobody anticipated, such as several sum insured changes and indexations on one policy. How to prepare such a sample is covered in Insurance test data.

Edge cases that often surface only in production:

  • the insured's age on the boundary of a band in the risk charge table;
  • an account value lower than the charge due, the point at which the policy lapses;
  • a fund being closed or merged, and units being transferred;
  • premium and sum insured indexation declined by the customer in one year;
  • a change of charge rates in the fund rules and policies written before the change;
  • a surrender on the last day of a policy year and on the first day of the next.

Automation and a difference report

The most effective comparison is month by month history, not just the final result. For each test policy, the system and the model produce a statement: date, operation, number of units, price, amount, balance. A tool compares both statements and points to the first month in which they diverge. The first difference almost always leads straight to the cause.

For investment products, testing also covers the key information document (KID) that the PRIIPs Regulation requires for insurance-based investment products. The cost indicators and scenarios in the KID are calculated from the same product parameters, so a charge change in the system should also trigger a test of the document.

Such a test set can run on every change to code and product parameters. We build it as part of test automation: tests at the policy system API level, comparison with the actuarial model and a difference report that the product team can read. The principles behind this approach are covered by the ISTQB exam, which you can take at our accredited exam center.

Questions and answers

Who should prepare the model used for comparison?

Ideally an actuary or product analyst together with a tester, based on the general terms and the fund rules. What matters is that the model is not derived from the same technical specification as the system. The tester makes sure the model can run automatically on many policies and that its results can be compared with the system.

How many test policies are enough?

Usually from several dozen to a few hundred per product: a handful for each edge case plus a portfolio sample covering the main combinations of age, term and funds. The number matters less than coverage. Every component in the policy value table and every mid-term operation should have at least one test.

How do you test policies written long ago under old terms?

The same way as new ones, but with parameters from the inception date: old charge tables, old allocation rates, old fund rules. The model must be able to load the version of the terms assigned to the policy. When migrating a portfolio to a new system, comparing policy histories from the old and new systems is the main acceptance test.

Can you test with real fund unit prices?

You can, and it is worth it, because real prices include days without valuation and sharp market moves. Unit prices are not personal data, so they can be copied from production. For edge cases, artificial prices help too, for example a sharp drop that checks how the policy behaves when the account value no longer covers the charges.

Changing a policy or claims system? Talk to an engineer who knows insurance products.

Let's talk

Read more: IT in insurance

All in IT in insurance →