SAM quarterly return: group scheme movements

Insurance South Africa

Works out sheets M1.2 and M2.2 of the SAM quarterly return, the number of schemes and premiums for group business, from a life insurer’s scheme listings. It checks each scheme’s status, dates and premiums against its movement, that the movements explain the change from the start of the quarter to the end, and that the start matches last quarter’s end.

From the Prudential Authority’s Quarterly Solo Quantitative Reporting Template v3, sheets M1.2 and M2.2, and their formulas for the end of the quarter

SAM quarterly return: group scheme movements
Checks, a products table, last quarter’s figures, two fictional scheme listings, test listings and a pipeline snapshot. Zip, 60 KB.
Download the template

See it in Quantemplate

The pipeline

The SAM group scheme movements pipeline in Quantemplate: all 13 stages listed, from Read schemes to M1.2 and M2.2, with link lines between them. The test run’s Outputs tab lists its two outputs: Schemes checked with 193 rows and M1.2 and M2.2 with 6.

The test run’s checks

Part of the validation report for the two test scheme listings, in the Check schemes stage. The checks that a scheme number is given, that the product is in the products dataset and is group business on a line that M1.2 and M2.2 report, and that the in-force flags, movement code, quarter end and movement date are valid each fail 1 row. The check that each scheme number appears once fails 2, the duplicate’s two rows. The checks that a movement falls in the quarter, that a new scheme or transfer in wasn’t in force at the start but is at the end, and that a scheme that left was in force at the start but isn’t at the end each warn on 1.

The M1.2 and M2.2 output

The M1.2 and M2.2 output from the test run, with a profile of each column above it: 6 rows, one for each line of business, with its name, template row, the quarter end 30 September 2026, and its schemes at the start, new schemes, terminations, transfers, section 14 transfers, other movements and schemes at the end. Rows 5 and 6 come from test cases: an individual product, and a product that isn’t in the products dataset.

What it checks

19 rules 11 Fail 8 Warning

A rule set to Fail marks its rows as failed, and any failure blocks Auto Export if you set it up. Warnings are only reported. Validation never removes a row. Every rule and its formula is listed in VALIDATIONS.md in the download.

How the pipeline works

  1. Stages 1–2 Read schemes Remove blank rows, detect the header, add each file’s name and stack the listings
  2. Stages 3–6 Products and counts Match each scheme to its product and line of business, and count the rows for each scheme number
  3. Stages 7–8 Check schemes Work out each scheme’s share of every M1.2 and M2.2 column, and run the 15 scheme checks. Output: every scheme
  4. Stages 9–11 Movements Total the schemes by line of business, and bring in last quarter’s figures
  5. Stages 12–13 M1.2 and M2.2 Check that the movements explain the end of the quarter and that the start matches last quarter, and run the 4 total checks. Output: one row per line of business, with premiums in R’000

The scheme listing’s columns

Each group business system gives a scheme listing for the quarter as a CSV file, with one row per scheme. A scheme number appears once across all the files.

Column
What it holds
Scheme Number
The scheme’s number
Scheme Name
The scheme’s name, usually the employer or fund. It isn’t checked
Product Code
Your product code, as in the products dataset
Quarter End
The last day of the quarter, as yyyy-mm-dd, such as 2026-09-30
In Force at Start
Y if the scheme was in force at the start of the quarter, otherwise N
Start Premium
The scheme’s annual premium in rand at the start of the quarter. Blank for a scheme not in force
Movement
What changed the scheme in the quarter, as one of the codes below. Blank for no movement
Movement Date
The date of the movement, as yyyy-mm-dd
In Force at End
Y if the scheme is in force at the end of the quarter, otherwise N
End Premium
The scheme’s annual premium in rand at the end of the quarter

Each movement code counts towards a column of M1.2 and M2.2. Codes and the Y and N flags can be in any case: the pipeline trims them and puts them in capitals.

Movement
Column on M1.2 and M2.2
NEW
New schemes
TERMINATION
Terminations
TRANSFER IN, TRANSFER OUT
Transfers in terms of the Act: a transfer in is added and a transfer out is taken off
SECTION 14 IN, SECTION 14 OUT
Section 14 transfers, under section 14 of the Pension Funds Act: a transfer in is added and a transfer out is taken off
PREMIUM CHANGE
Premium increases or decreases, on M2.2 only
OTHER
Other movements: the change from the start of the quarter to the end

What’s in the download

The PA’s quarterly template isn’t included. Download the current version from the PA’s insurer returns page.

Build it

  1. Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
  2. With Claude in Chrome signed in to Quantemplate, ask Claude Code:
    Build the SAM group scheme movements pipeline from the sam-group-movements folder. Test it with the test scheme listings and the clean ones and compare the results with the expected ones.
  3. Claude creates the products and previous quarter datasets, uploads the two test listings, builds the 13 stages and checks the test listings and the clean ones. This takes around 3 minutes.

The agent builds through the Quantemplate app’s own API in your browser. That API isn’t published, so if a release changes it, the build stops and tells you what went wrong. Review what the agent builds before you rely on it.

Using your own scheme data

Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.

Limits