Skip to main content
Compare carrier premiums on the same market basket or book, then summarize the gaps by segment. This example aligns coverage and term before comparing, and retains every rating exception alongside the matched population. Install Relativities and download the example data before running this page.
The book is the synthetic six-household book in relativities-examples/ppa/book. Carrier A rates liability and collision per vehicle for a six-month term. Carrier B rates an account for a twelve-month term and returns one premium. The sections below inspect what each carrier’s prepare sends and align the coverage basis.
The basis is liability only, expressed as annualized premium. Carrier B has the lower premium for each submission that both carriers rate. NaN marks a submission that a carrier leaves unrated. Programs and schemas describes how a market sends one book to each carrier.

List the fields each carrier accepts

List each rater’s inputs:
Carrier A accepts a collision deductible. Carrier B accepts a comprehensive flag. The two premiums cover different coverages before any adjustment.

Check what each carrier receives

Explain one submission with the market, and read the input each rater received:
Each input is a value the carrier’s prepare built, in the carrier’s own terms. Compare each value with the book’s facts for that submission. explained.book holds those facts.

Find the unrated rows

Rate the full book, and list each row with a status other than succeeded. Show each of these rows in the exhibit, with its reason. Results lists each status.
  • S3 and S4 drive more than 25,000 miles a year, so carrier B refuses them with its own code.
  • S4 drives 31,000 miles a year, above carrier A’s limit of 30,000, so the status is invalid_inputs.
  • S5’s driver D6 has a blank first licensed date, so carrier B’s prepare raises for S5 alone. reason names the function and the exception, and carrier B rates the other submissions.

Check which coverages each premium includes

Expand carrier A’s vehicles outcome, and match each entry to the book’s vehicle at the same position:
Carrier A prices liability and collision on each vehicle. A collision premium of $0 marks a vehicle that the book leaves at liability only. Carrier B returns one account premium that includes comprehensive.

Compare on one basis

  1. Choose the coverages that both carriers price. Here, the basis is liability only.
  2. Keep only those rows in vehicle_coverages, and rate the new book with the market.
  3. Put each premium on one term. Double carrier A’s six-month premium, and keep carrier B’s annual premium.
  4. Pivot by submission and program, as the first example on this page shows.
With more carriers, name each carrier’s premium column and term once:
Each carrier’s filing states its term. Keep each NaN row in the exhibit with its reason. Doubling a six-month premium is an illustrative annualization. For a market study, also align limits, deductibles, policy fees, and effective dates. Use the appropriate term conversion for your analysis and state it in the exhibit.

Build a competitive exhibit by segment

Join your own analysis dimensions to the aligned results. This example uses region and counts every submission before selecting matched premiums:
The percentage compares summed premiums for the same matched submissions, with one observation per submission. The rural segment has zero matched risks and stays visible. Its competitive premium gap remains undefined. Keep program statuses and reasons from compared with this summary; three of six submissions have premiums from both programs. Use your own dimensions for further cuts, such as vehicle count, driver experience, territory, or distribution channel. Keep interactions visible where a broad average could conceal them. Prepare a book shows how to retain custom dimensions. For a weighted portfolio exhibit, apply the same weights to each program on the matched population. State whether your statistic compares total premiums, averages individual percentage gaps, or counts how often a program has the lower premium. Each statistic answers a different question. Treat rating exceptions as a separate population with explicit counts and reasons.

Define the eligibility basis

Decide whether the study measures price position, underwriting appetite, or both. status == "succeeded" establishes a calculated premium. Underwriting appetite needs its own evidence, such as the carrier’s guidelines. Join that evidence to the results in pandas, by submission_id and program.

Add one carrier’s own estimate

To give one carrier a fact that the book leaves blank, give that carrier a new prepare. Carrier B estimates a blank first licensed date as the driver’s sixteenth birthday:
The estimate changes only what carrier B receives. The book keeps D6’s date blank, and carrier A’s program is unchanged. Label a comparison that uses the estimate as “carrier B’s estimate”.

Rate with the estimate

Put the changed program in a market, and rate the book again:
With its estimate, carrier B rates S5 at $420 for a twelve-month term.

Close the raters