Functional Weave
Code in Rust

insurance.premium-proration@1.0.1

README.md

3,358 bytes · view raw

# insurance.premium-proration

The return premium when a policy is cancelled before it expires: how much of
the premium the insurer keeps and how much goes back.

## Two bases

- **pro-rata**: the insurer keeps the premium for the days cover ran. The split
  is done by `finance.proration`, so kept + returned is always exactly the
  premium, with no penny invented by rounding each side on its own.
- **short-period**: the insurer keeps a share of the premium from its own
  short-period (short-rate) scale, for example:

  | cover in force, not exceeding | kept |
  |---|---|
  | 1 week | 10% |
  | 1 month | 20% |
  | 2 months | 30% |
  | 3 months | 40% |
  | 4 months | 50% |
  | 6 months | 70% |
  | 8 months | 80% |
  | longer | 100% |

  Scales differ between insurers and products, so the caller supplies it
  (the one above is only an illustration, used in the vectors). The bands are
  read in order and the first one the period does not exceed applies; a
  period longer than every band keeps the whole premium. The kept share
  rounds half-up to the minor unit.

## Dates

`expiryDate` is exclusive (a year's cover from 2026-01-01 has expiry
2027-01-01), and days in force are `cancellationDate - inceptionDate`, so
cancelling on the inception date means no days on cover. A band in months is
measured in calendar months from inception with `dates.add-months`: one
month from 31 January is 28 February, so 2 March is in the second month even
though it is only 30 days on. A band in days is compared with days in force.

## Minimum retained premium

`minimumRetained` is the least the insurer keeps on any cancellation (often
a flat amount, sometimes the premium's administration element). It never
raises what is kept above the premium itself. `minimumApplied` says whether
it changed the answer.

## Not covered here

- The statutory 14-day cancellation right for consumers (ICOBS 7): the
  insurer may only keep a proportionate charge for cover given, which is
  pro-rata; the caller chooses the basis.
- IPT: the return premium carries its IPT back, at the rate the premium was
  taxed at (`insurance.ipt` with a negative amount).
- Policy fees and instalment credit charges, which are refundable or not by
  the terms of business rather than by the premium arithmetic.

## Before you rely on this

**Not professional advice.** This capability calculates insurance figures from published rules. It is a software component for developers, not financial advice. Rules change and every rate here has an effective date. Check that the dates cover your case. Verify results against the official sources listed above, and have an actuary review how you use it, before anyone relies on the output. Provided "as is" under its licence, without warranty.

**Unreviewed.** This capability's implementations agree in every language and pass its published test vectors, which were worked out from the official sources cited. But no qualified actuary has yet checked those vectors, or confirmed that the capability covers the cases it claims. Treat it as a draft. Do not use it for real people, money or decisions without your own expert review. Once a qualified reviewer signs off, this notice is replaced with their name, qualification and the date. Each new version needs fresh sign-off.

1.0.1 marks it unreviewed. The code and the tests are unchanged.