Regression testing insurance pricing: why every rate change needs a test suite

How does your team know a rate change is right? For many, the honest answer is a handful of quotes run by hand before release. That catches the big mistakes. It misses the quiet ones: two factors applied in the wrong order, a band edge that's out by one, a refer rule that stopped firing three releases ago.

Software teams settled this long ago with regression tests. Pricing can borrow the same habit, and with AI speeding up how quickly models change, it can't really afford not to.

A test is a quote with a known answer

A pricing test fixes a full set of inputs to the result you expect. Here are three from our pet insurance model:

  • A neutered Persian cat, aged 3, in Greater London, with a 4,000 vet-fee limit and a 100 excess, prices at 255.34 and is valid.
  • A cat aged 15 is declined.
  • A French Bulldog on 7,000 cover still prices, but is referred to an underwriter.

Run all of them after every change. If any result moves, you know at once, and you know which case.

Building the suite

Good suites draw on a few sources:

  1. Worked examples from the rating guide. These are the reference. If the model disagrees with the actuary, the model is wrong.
  2. Band edges. Ages, limits and sums insured either side of each boundary, because that is where off-by-one errors live.
  3. Every rule, both ways. For each decline and refer, one case that triggers it and one just inside that doesn't.
  4. Real quotes. A sample of saved production quotes guards against side effects when a model is restructured.
  5. Old bugs. Every pricing bug you fix becomes a test, so it can't come back.

Treat a failing test as a broken model, and expect results to match to the penny.

In Swallow, tests live on each version of the model. You can add them one by one, upload them as a CSV, or generate a starting set and trim it down. The dashboard shows each test's expected result next to the actual one, with the difference, plus an overall view of how the suite moved. For very large sets you can run a bulk CSV and download the results. See Swallow Test for more.

Testing a change you meant to make

When you change rates on purpose, some tests should move. The question is whether only those tests moved, and by the right amount. The routine:

  • Record the suite's results on the current version.
  • Make the change in a new draft.
  • Run the suite again and look at every difference.
  • Update expected results only where the change was meant to land, with a reason for each.
  • Approve and publish only when nothing moves that you can't explain.

A worked example: raise the Greater London region factor in the pet model from 1.30 to 1.35. The Persian cat goes from 255.34 to 265.16. The risk premium is 142 × 1.0 (age) × 1.3 (breed) × 1.35 (region) × 1.0 (excess) × 0.95 (neutered), rounded to 236.75, and 12% Insurance Premium Tax of 28.41 takes it to 265.16. The Labrador in the North, the two declines and the French Bulldog refer don't move at all. That's the whole review: one expected change, nothing else.

AI makes tests more important, not less

An AI agent can change a model in seconds, so the check has to be just as quick. Any agent editing a model should run the suite after each edit and report what passed and what failed. The person reviewing reads that report first, then the edit. The tests become the contract between the agent doing the work and the person signing it off.

Swallow's MCP server gives agents the tools for this: test_swallow_project prices every test through the engine, generate_swallow_tests suggests cases by varying each input in turn, and validate_swallow_tests reports the price spread and which refers, declines and endorsements the suite covers, so gaps stand out. More on that in using Claude and ChatGPT to build pricing models.

One rule matters above the rest: an agent should never change a test's expected result to make it pass. Expected values change when a person decides they should, for a stated reason.

Tests as evidence

A versioned model with a suite saved on every version shows what the model was meant to do, that it did it, and who approved each change. That record is useful to compliance teams and to anyone who has to explain a price later. Pair it with a quote debug trace and you can show exactly how any single premium was built.

Build the suite when you build the model

The cheapest moment to write tests is at the start, from the same worked examples used to design the model. Every model on our model building page ships with its suite, and you can watch it pass before anything goes live.

Continue reading

From filing to rater: building pricing models from US rate filings

What sits inside a US rate filing, how to rebuild it as a working, tested rating model, where AI speeds things up and which gaps to expect.

Swallow compared: enterprise pricing platforms, core system raters and AI newcomers

Where Swallow sits against established insurance pricing and rating platforms and newer AI-led options, on model format, testing, approvals, AI and distribution.

Building pricing models with Claude and ChatGPT: what works, what doesn't

A practical look at building insurance pricing models with Claude and ChatGPT over MCP: where AI clients help, where they trip up and how to keep people in charge.

AI in insurance pricing: closing the gap between rating guide and live model

Pricing design is rarely the bottleneck. Implementation is. How AI shortens the path from signed-off rating guide to a tested, live pricing model.

Fair value under Consumer Duty: the evidence your pricing should leave behind

What the FCA's Consumer Duty and pricing rules ask of insurance pricing teams, and the records that make fair value something you can show, not just claim.

When the customer is an AI agent: getting your pricing ready

AI assistants are starting to shop for insurance on people's behalf. Here's what your rating engine has to give them to quote your products properly.

How to connect the Swallow MCP server to Claude

Connect Claude to your Swallow pricing infrastructure using MCP to analyse models, inspect rating logic and interact with your tools using natural language

A safer rate change: eight steps from analysis to monitoring

A repeatable process for insurance rate changes, from the change statement and draft version to tests, approval, release and monitoring, and where AI helps.

Readable by design: pricing models people can check, even when AI writes them

When AI drafts pricing logic, review becomes the slow step. Why a declarative, readable model format is faster to check and audit than generated code.

Moving off a spreadsheet rater without changing a single price

How to tell when an Excel rater has outgrown its job, what keeping it really costs, and a migration plan that uses the spreadsheet's own answers as the tests.

Starting an MGA: from rating guide to first live quote

A practical route for a new MGA's first product: agreeing terms with capacity, building and testing the model, picking channels and watching rates after launch.

AI and insurance distribution: one price, every channel

Aggregators, embedded journeys, chat, voice and AI agents all need the same thing from pricing. Why one explainable rating engine should sit behind them all.

AI in regulated industries: why explainability has to come first

Insurers can get real gains from AI and still meet what the FCA, the EU and US regulators expect, provided every decision can be explained, reproduced and signed off.

Swallow vs Earnix

Swallow and Earnix Price-It compared for insurance pricing and rating: who each is for, how models are built, tested and released, how AI is used, and distribution.

Swallow vs Guidewire PricingCenter

Swallow and Guidewire PricingCenter compared: who each suits, how each relates to PolicyCenter, how models are built, tested and released, AI and distribution.

Swallow vs Duck Creek Rating

Swallow and Duck Creek Rating compared: who each suits, suite and standalone use, how rates are built, tested and released, deployment, AI and distribution.

Swallow vs Oracle Insbridge

Swallow and Oracle Insurance Insbridge Enterprise Rating compared: architecture, how rates are built and changed, testing, integration, AI, and how to migrate.

Swallow vs Akur8 Deploy

Swallow and Akur8 Deploy compared: where each rating engine fits, how rates reach production, testing and sign-off, how AI is used and when to pick which.

Swallow vs hyperexponential (hx Renew)

Swallow and hyperexponential's hx Renew compared: who each suits, Python models versus readable JSON, testing and approvals, AI and the Guidewire deal.

Swallow vs WTW Radar

Swallow and WTW Radar compared for pricing and real-time rating: who each suits, how models are built and changed, testing and approvals, and AI features.

Swallow vs building a rating engine in house

Build or buy? A fair look at writing your own insurance rating engine versus using Swallow: testing, versioning, audit, serving at volume and rate changes.

How to connect the Swallow MCP server to ChatGPT

Connect ChatGPT to your Swallow pricing infrastructure using MCP to analyse models, inspect rating logic and interact with your tools using natural language

Swallow Data: Live insight into your pricing performance

See how Swallow’s Data area gives you real-time visibility over quotes, performance, and customer behaviour across your entire pricing model

Swallow Tests: Validate your pricing with real-world scenarios

See how Swallow’s Tests area lets you simulate quotes, inspect calculations, and perfect your pricing model before publishing

Swallow Build: Bring your pricing model to life

A quick look at how Swallow’s Build area lets you edit, test, and publish pricing models with complete control and instant feedback

Swallow Overview: Core features at a glance

See how the AI actuary inside Swallow turns a simple prompt into a fully tested and deployable insurance pricing model for electric vehicles in just a few clicks

Why Modern Insurers Are Moving to AI-Powered Enterprise Pricing Engines

A look at how AI is transforming insurance pricing, from spreadsheet-based models to enterprise-grade rating engines built for speed, consistency, and control

Swallow / MGT

How MGT use Swallow to power AI-driven pricing, accelerate model updates and support fast, reliable commercial insurance quoting.

AI Agent for Insurance Products

Sam talks through our new AI Agent for Insurance products. Get a new Insurance product built and live within a couple of minutes.

Swallow / Ouch!

How Ouch! used Swallow to launch digital takaful products faster, with transparent pricing, audit readiness and seamless model updates.

Pricing Pain Point #4 - Slow deployment

Whilst the modelling process is where pricing strategy begins, getting changes in front of customers is where the rubber hits the road and new pricing is tested with real customers. Moving quickly to make changes to live pricing offers pricing teams an opportunity to respond to the market, test and iterate, and roll out new products.

Pricing Pain Point #3 - Testing concerns

With pricing critical to growth and profitability, businesses must understand the impact of any price changes, as well as ensure what goes live to customers is identical to that modelled. With pricing driven by complex financial models, this is particularly true - a percentage point error in the code deployed could easily lead to a significant financial impact.

Swallow / Open

How Open used Swallow to launch embedded insurance in the UK faster, with flexible pricing, rapid updates and lower operational cost.

Pricing Pain Point #2 - Lengthy process

In any fast moving business, having a clear record of decisions, changes and their impacts is key to operating efficiently and successfully. For regulated industries, a clear governance process is a requirement and critical to ensuring compliance with local regulations.

Pricing Pain Point #1 - Data issues

Underlying all pricing strategy is data, whether it be on the market and competition or a company’s own quote, sales and cost data. Collecting this data and using it to inform future pricing decisions is one of a pricing team’s key objectives.

Swallow / Rivr

How Rivr uses Swallow to deliver pricing models faster, with better governance, smoother client handovers and one-click deployment.

What we've learned about pricing

Over the past few months, we've talked to over 100 pricing and technology professionals from a range of industries. From our conversations, many pricing pain points have emerged, helping us to better understand the challenges businesses face and inform the direction of our platform.

Why I created Swallow

Financial pricing models (think insurance, credit, mortgages, financing, leasing, memberships) have, and continue to be, designed in spreadsheets and published through in-house custom code or legacy enterprise software. Pricing changes can take weeks instead of hours.

We feel you, pricing is hard...

Dynamic pricing is hard to create and serve to your customers. Because it is hard, it can become a technical concern rather than a business concern. Here be where the dragons lie.