ClearRate: Personal Lines Rating Engine
Project Type: Insurance Pricing | Actuarial Modeling | GLM | Dashboard
Tools Used: Python, Pandas, Streamlit, Matplotlib, NumPy
Dataset: Simulated Personal Lines Rating Factors (Driver Age, Vehicle, Territory)
Objective
Build a modular, transparent personal lines rating engine capable of calculating insurance premiums through a multiplicative model. The system integrates actuarial credibility adjustments using a Poisson log-link GLM and provides a sensitivity analysis suite to visualize how specific risk variables impact the final rate.
Key Features
- Modular Rating Core:
- Developed a
RateTablemodule that utilizes Pandas for efficient CSV-based factor lookups across multiple dimensions (Age, Territory, Vehicle Value). - Implemented a purely multiplicative premium calculation logic within a dedicated
rating_engine.pylibrary.
- Developed a
- GLM Rate Adjuster:
- Engineered a credibility-weighted rate adjustment module using a Poisson log-link model.
- Allows for the refinement of base rates based on historical loss experience and frequency/severity distributions.
- Sensitivity & Impact Analysis:
- Built a
SensitivityAnalyserto programmatically test variable shifts and quantify their effect on total written premium. - Visualizes “one-way” and “multi-way” impact charts to ensure rating factor logic remains actuarially sound.
- Built a
- Interactive Underwriting UI:
- Streamlit-powered dashboard (
app.py) that enables users to input driver profiles and instantly see a transparent premium breakdown. - Includes real-time visualization of loss-cost curves and factor relativities.
- Streamlit-powered dashboard (
Deployment Highlights
- High-Performance Architecture: Avoided heavy SQL dependencies by leveraging optimized Pandas vectorized operations for sub-millisecond premium generation.
- Streamlit Cloud Deployment: Hosted the interactive engine for accessible stakeholder testing and actuarial review.
- Clean Code Principles: Structured as a package with distinct modules for data ingestion, mathematical modeling, and UI rendering.
🔗 View Blog Post: Link
🔗 View Code on GitHub: GitHub Link