SAM quarterly return: short-term policies and premiums
Insurance South Africa
Works out sheets M1.1S and M2.1S of the SAM quarterly return, the number of policies and the premiums written and earned for direct business, from a short-term insurer’s policy listings. It checks each policy’s product, term, status, dates and premiums, 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.1S and M2.1S, and the formula for the end of the quarter on M1.1S
- 19validation rules
- 13pipeline stages
- 17lines of business
- 3 minto build and check
See it in Quantemplate
The pipeline

The test run’s checks

The M1.1S and M2.1S output

What it checks
19 rules 11 Fail 8 Warning
- Fields and codesA policy number given once, a product that’s in the products table and is direct business, and a valid policy term, in-force flags and movement code 7 Fail 7
- DatesThe quarter end and movement dates are dates, and movements fall in the quarter 2 Fail, 1 Warning 3
- Status and movementsEach policy is in force at the start and end of the quarter as its movement says 0 Fail, 4 Warning 4
- PremiumsPremiums are numbers, reinsurance is no more than the gross premium, and policies in force all quarter have earned premium 1 Fail, 2 Warning 3
- TotalsPolicies at the end follow from the movements, and the start matches last quarter’s end 1 Fail, 1 Warning 2
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
- Stages 1–2 Read policies Remove blank rows, detect the header, add each file’s name and stack the listings
- Stages 3–6 Products and counts Match each policy to its product and line of business, and count the rows for each policy number
- Stages 7–8 Check policies Work out each policy’s share of every M1.1S and M2.1S column, and run the 17 policy checks. Output: every policy
- Stages 9–11 Movements Total the policies by line of business and policy term, and bring in last quarter’s figures
- Stages 12–13 M1.1S and M2.1S Check that the movements explain the end of the quarter and that the start matches last quarter, and run the 2 total checks. Output: one row per line of business and policy term, with premiums in R’000
The policy listing’s columns
Each policy administration system gives a policy listing for the quarter as a CSV file, with one row per policy. A policy number appears once across all the files.
Column |
What it holds |
|---|---|
Policy Number |
The policy’s number |
Product Code |
Your product code, as in the products dataset |
Policy Term |
ANNUAL, MONTHLY or TERM, as you classify the policy |
Quarter End |
The last day of the quarter, as yyyy-mm-dd, such as 2026-09-30 |
In Force at Start |
Y if the policy was in force at the start of the quarter, otherwise N |
Movement |
What changed the policy in the quarter, as one of the codes below. Blank for no movement, including a renewal |
Movement Date |
The date of the movement, as yyyy-mm-dd. For CANCELLED NEW, the date it was cancelled |
In Force at End |
Y if the policy is in force at the end of the quarter, otherwise N |
Gross Written Premium |
Premium written on the policy in the quarter, in rand. A refund is negative |
Gross Earned Premium |
Premium earned on the policy in the quarter, in rand |
Reinsurance Written Premium |
The part of the written premium ceded to reinsurers, in rand. Blank if none |
Reinsurance Earned Premium |
The part of the earned premium ceded to reinsurers, in rand. Blank if none |
Each movement code counts towards a column of M1.1S. 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.1S |
|---|---|
NEW |
New |
TRANSFER IN |
Portfolio Transfers In |
CANCELLED |
Cancelled - Existing Policies: a policy in force at the start that ended in the quarter for any reason, including expiry and non-renewal |
CANCELLED NEW |
New, and Cancelled - New Policies: a policy taken out and cancelled in the quarter |
TRANSFER OUT |
Portfolio Transfers Out |
What’s in the download
- The 19 rules as JSON, and a table of every rule with its formula, notes and source
- A table of 16 products, each mapped to its SAM line of business and its row on M1.1S and M2.1S and marked direct business or inwards reinsurance, and last quarter’s figures
- Two fictional policy listings for the quarter ending 30 September 2026, from a made-up insurer’s personal and commercial lines systems, which pass every rule, and the M1.1S and M2.1S figures they give
- The same listings with a case for each rule, and the rows each rule should flag on them
- A template file the Quantemplate build skill reads to build the pipeline and check the results
- A snapshot of the finished pipeline, and the Python scripts that generate everything in the download
The PA’s quarterly template isn’t included. Download the current version from the PA’s insurer returns page.
Build it
- Install the Quantemplate skills, version 1.0.0 or later, if you haven’t already. Then unzip the download.
- With Claude in Chrome signed in to Quantemplate, ask Claude Code:
Build the SAM short-term policies and premiums pipeline from the sam-short-term-policies folder. Test it with the test policy listings and the clean ones and compare the results with the expected ones.
- 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 policy data
- Upload each system’s policy listing to stage 1 under a test file’s name, such as
kogelberg-personal-policies-test.csv, which replaces it. Or upload it under its own name, tick it in stage 1’s inputs and untick the test files. - Replace the data of the SAM Short-term Products dataset with your own products, each with its SAM line of business, template row and whether it’s direct business or inwards reinsurance. Drag your file onto the dataset to replace its data.
- Each quarter, replace the data of SAM Previous Quarter Short-term with last quarter’s figures as filed: the policies in force at the end from M1.1S, and the current quarter premiums from M2.1S, in R’000.
- Check the validation report’s Fail rules first: they mark policies that can’t be placed and movements that don’t add up. Warnings are worth checking before you file.
- The M1.1S and M2.1S output has one row per line of business and policy term, with its template row. Copy each row to that row of the template, in the Annual, Monthly or Term column of each group.
- On M1.1S, the counts go in columns E to V, from Policies at Start to Portfolio Transfers Out. The template works out columns W to Y, the end of the quarter, which should match the output’s Policies at End.
- On M2.1S, gross written and earned premiums go in columns E to J, the previous quarter’s in K to P and W to AB, and net written and earned premiums in Q to V.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- It’s for short-term insurers. The life policy movements template works out M1.1 and M2.1 for life insurers.
- It covers direct business only. Inwards reinsurance is reported on M1.2S and M2.2S, as contracts split into lead and follow, and fails rule F04. The number of claims and claims paid template works out M1.3S and M2.3S.
- The template doesn’t define annual, monthly and term policies, so it uses each policy’s own classification and only checks it’s one of the three.
- M1.1S has no column for policies that expire or aren’t renewed, so they count as cancelled, as the template’s formula for the end of the quarter needs.
- Each policy has one movement a quarter, apart from
CANCELLED NEW, which counts as new and as cancelled. - It doesn’t produce the Balancing Item row of M1.1S.
- Last quarter’s figures are taken as filed, from the dataset. The pipeline doesn’t work them out again.
- The PA publishes no completion guide or rule list for these sheets. The movement codes and checks follow the template’s columns and formula, and Quantemplate’s own checks go further.
- It produces the figures, ready to copy into the PA’s template. It doesn’t fill in or submit the template, or check the filing deadline.
- The insurer in the test data, Kogelberg General, is made up. No insurer of that name turned up when we searched in December 2026.
- The build doesn’t set up Auto Run, Auto Export or feeds.
- The agent works through the app in your browser, so changes someone makes in the app whilst it’s working can trip it up.