Skip to main content
Prepare one book for every program in a comparison. Keep reported facts, carrier mappings, and analysis assumptions identifiable. Install Relativities and download the synthetic examples before running this page.

Choose the population and unit of analysis

Use a market basket to study selected risk profiles, or a portfolio extract to study your observed business mix. State the selection date, population, exclusions, and any weights in the exhibit. Interpret a market basket’s findings for the profiles and weights you selected. Each submission_id identifies one request to price. A household can have several submissions, such as quotes at different effective dates. Choose the appropriate unit before aggregating premiums: submission, vehicle, coverage, or another outcome the rater exposes.

Put reported facts in the shared tables

The required tables are households, submissions, drivers, and vehicles. Add coverage selections and incidents when the programs require them. The PPA book schema gives their keys and columns. Keep unknown facts blank. Add deliberate assumptions as scenarios or draws, or in a documented program prepare function. Treat unsupported coverage selections as exceptions to resolve or disclose in the comparison.

Keep your own dimensions

Add columns for the cuts your study needs. This example adds a vehicle-count segment to each submission:
Extra columns survive book operations. Add your own tables with with_tables, keyed by submission_id and any entity keys they need. Keep broker, distribution channel, geography, or study weights at the level where they are defined. Join those dimensions to rating results by their keys for analysis in pandas.

Check completeness before rating

Count submissions and missing inputs before choosing assumptions:
The book validates its schema and links when constructed. Each program’s required inputs still need review against its rater.inputs table, its schema and its prepare function. S5’s missing date causes a mapping failure for the example carrier B; carrier A derives age from the reported birth date. Book.read_csv preserves IDs and coverage codes as text. When importing other code columns with pandas, specify their text dtype to preserve leading zeros. Verify vehicle symbols, territory codes, dates, units, and entity assignments before using them in a rater.

Save the analysis inputs

Retain this book with your program bundle IDs, assumptions, analysis code, and comparison basis. book.source records the source location, and book.hash identifies the table contents. A changed book has source=None; retain your original source and transformation steps with the study. Next, validate the programs and compare carriers with rating exceptions visible.