Massachusetts private passenger auto statistical plan
Insurance United States
Checks a Massachusetts private passenger auto insurer’s statistical records before they go to Commonwealth Automobile Reinsurers (CAR): liability, PIP and physical damage premium and loss records against the statistical plan’s codes and CAR’s statistical edits, from classes, dates and limits codes to coverage codes, VINs and losses within their limits.
From CAR’s Statistical Edit Package, revised 1 January 2026 for accounting year 2026, and its Massachusetts Private Passenger Automobile Statistical Plan, with revisions through March 2025.
- 143validation rules
- 24pipeline stages
- 115fields in three files
- 5 minto build and check
See it in Quantemplate
The pipeline

The test run’s checks

The output

What it checks
143 rules 126 Fail 17 Warning
- Liability, subline 621Every record’s codes and dates, class, VIN and amounts, then bodily injury limits codes for the premium, medical payments, limits identifier, salvage, partial or total losses, and each loss against its policy limit 43 Fail, 5 Warning 48
- PIP, subline 625The same checks of every record, then the deductible for the class, the coverage code, the type of claimant, each loss against $8,000 less its deductible, and the type of loss for each transaction 38 Fail, 6 Warning 44
- Physical damage, subline 628The same checks of every record, then other than collision and collision coverage codes and premiums, OEM coverage, the type of loss for each coverage, anti-theft, high-theft and extra-risk codes on assigned risks, motorcycles’ value codes and exposure on towing-only coverage 45 Fail, 6 Warning 51
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. 15 rules are checks of our own, where CAR’s edit needs a file it doesn’t publish: ZIP code, territory and producer code formats, the VIN’s check digit, and a loss’s territory and CAR identification code against its vehicle’s premium records. Every rule, its formula and the CAR edit it follows are listed in VALIDATIONS.md in the download.
How the pipeline works
- Stages 1–2 Prepare liability records Detect headers, tidy the codes, and work out dates as months, codes with their leading zeros, the class type, the VIN’s check digit and each loss’s policy limit
- Stages 3–6 Match losses to premiums Count each vehicle’s premium records, and those with the loss’s territory and CAR identification code, and join the counts to each record
- Stages 7–8 Check liability records Run the 48 liability rules and publish every record with its results
- Stages 9–16 PIP records The same eight stages for the PIP file, with each loss’s limit after its deductible, and its 44 rules
- Stages 17–24 Physical damage records The same eight stages for physical damage, with the coverage groups CAR’s edits apply to, and its 51 rules
The input files
Three CSV files, one for each subline, with a header row and a row for each 150-character record. Premium and loss records go in the same file: the transaction type code says which each row is. The columns are the field names in the statistical plan, and each field is as it’s coded in the record.
File |
What it holds |
|---|---|
Liability, 41 columns |
Subline 621. The common fields, such as Transaction Type Code, Classification Code and Vehicle Identification Number, then the bodily injury, property damage, medical payments, uninsured and underinsured auto limits codes, Liability Limits Code, Limits Identifier Code, the premiums, Reporting Date, Type of Loss Code and Loss Amount |
PIP, 34 columns |
Subline 625. The common fields, then PIP Coverage Code, PIP Deductible Code, Type of Claimant Code and PIP (No-Fault) Premium Amount |
Physical damage, 40 columns |
Subline 628. The common fields, then the other than collision, collision and loss coverage codes, the anti-theft, OEM, value, high-theft and extra-risk codes, the two premiums and Catastrophe Code |
Dates are coded as in the plan: a month code (1 to 9, 0 for October, - for November and & for December) and a two-digit year, such as 126 for January 2026. The accident date adds the day, as in 21526 for 15 February 2026, and the accounting date is a month code and the year’s last digit, as in 66 for June 2026. Codes keep their leading zeros, though the pipeline also accepts them when Quantemplate reads a column as numbers and drops the zeros. The README in the download lists every column.
What’s in the download
- The 143 rules as JSON, and a table of every rule with its formula, notes and the CAR edit it follows
- Good data for a fictional insurer’s accounting year 2026 records in each subline, from new business, endorsements and cancellations to antique cars, motorcycles, assigned risks, salvage and subrogation, and test files with a case built to fail each rule
- The rows each rule should flag on the test files
- 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
CAR’s documents aren’t included. Download the statistical plan and the Statistical Edit Package from CAR’s manuals 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 Massachusetts CAR private passenger statistical plan pipeline from the mass-car-pp-stat-plan folder. Test it with the test files and the good files and compare the results with the expected ones.
- Claude creates the three upload datasets, builds the 24 stages and checks the test files and the good ones. This takes around 5 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 data
- Split your statistical records into three CSV files by subline, 621, 625 and 628, with a column for each field in the plan’s record layout, named as in the test files.
- Give each field as coded in the record, such as
126for a January 2026 policy and015for a territory. Leave the loss fields blank on premium records, and the premium fields blank on loss records. - For a later accounting year, change the year in the rules that check the accounting date, the accepted policy, accident and reporting years and the six months after the accounting date.
carpp_model.pyin the download sets them all at its top. - Choose each new file in its Prepare stage, stages 1, 9 and 17, in place of the test file. Or give each file the name of the one it replaces: an upload with the same name replaces it, and the stage keeps using it.
- Correct anything a Fail rule flags before you send the records to CAR, and check the warnings: CAR corrects some of them itself.
Contact the Quantemplate support team, or use your AI agent, to build custom logic for your use case.
Limits
- It follows CAR’s Statistical Edit Package for accounting year 2026 and the private passenger statistical plan with revisions through March 2025. It covers private passenger records, not the commercial sublines 611, 615 and 618.
- It takes CSV files with a column for each field, not CAR’s 150-character fixed-width records.
- 128 rules follow CAR’s edits, in full or in part. 15 are checks of our own, taken from the plan, where CAR’s edit needs a file it keeps to itself: the ZIP code, territory and producer code formats, the VIN’s check digit, and a loss’s territory and CAR identification code against its vehicle’s premium records in the same file.
- These edits aren’t checked, because they need CAR’s own files or tables: the company file, S17’s territory codes, S20’s ZIP code file, S21’s vehicle age and symbol tables, S39’s catastrophe codes, S45 and S46’s producer file, the high-theft vehicle part of S47, and S49’s VIN lookup in S&P Global’s VINtelligence.
- S04’s exposure basis and S36’s property damage limits with split limits aren’t checked either: those tables didn’t come out of the edit package’s PDF cleanly. S38 follows the plan’s table of collision coverage codes and types of loss instead of the edit’s own grid.
- The discontinued edits S06, S30 and S31, and the commercial edits S08, S13, S14, S18, S22, S27, S33, S48 and S54, aren’t included.
- The test data is fictional, including the company code.
- 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.