<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf" -->

---
title: When Chain-Ladder Factors Misbehave: Smoothing Reserves...
description: A full Chain-Ladder insurance reserving calculation is run for 233 US insurers using a handful of polars expressions, cross-validated against R's ChainLadder...
canonical: https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When Chain-Ladder Factors Misbehave: Smoothing Reserves with Polars and Whittaker-Henderson | daily.dev
og:description: A full Chain-Ladder insurance reserving calculation is run for 233 US insurers using a handful of polars expressions, cross-validated against R's ChainLadder...
og:url: https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf
og:image: https://api.daily.dev/og/posts/TizWZhedf.png
og:image:alt: When Chain-Ladder Factors Misbehave: Smoothing Reserves with Polars and Whittaker-Henderson
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When Chain-Ladder Factors Misbehave: Smoothing Reserves with Polars and Whittaker-Henderson

**[R-bloggers](https://daily.dev/sources/rbloggers)** · 9 min read · 0 upvotes · 0 comments

## Summary

A full Chain-Ladder insurance reserving calculation is run for 233 US insurers using a handful of polars expressions, cross-validated against R's ChainLadder package. One insurer's incurred development pattern turns out non-monotonic, which trips up standard parametric curve fits. Whittaker-Henderson smoothing, newly available as scipy.signal.whittaker_henderson (scipy 1.18), handles the saddle-shaped pattern gracefully and shifts the estimated total reserve for that company by about 3% (+31.1). Comparing against actual ultimate losses after 10 years shows both the raw Chain-Ladder and the smoothed version overestimate, with the smoothed version not clearly more accurate given Mack's method standard error of 4,582 — a reminder to validate against holdout data.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.r-bloggers.com/2026/09/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson>

## Questions this post answers

### Is there a built-in Whittaker-Henderson smoothing function in scipy now?

Yes, scipy 1.18 ships scipy.signal.whittaker_henderson as a built-in implementation of Whittaker-Henderson smoothing. It is called with a signal array, optional weights, a penalty order (commonly order=2 for curvature), and a penalty strength lamb, returning a result object whose .x attribute holds the smoothed values.

_Anyone smoothing noisy time series data can track scipy releases like this one on daily.dev._

### How do you compute Chain-Ladder development factors for insurance loss reserving using polars instead of R's ChainLadder package?

Group claims data by accident year and development lag, filter to keep only the observed upper-left triangle, then use polars group_by with .over() window expressions to compute volume-weighted factors as the sum of current losses divided by the sum of previous-lag losses per development lag. This approach was validated against R's ChainLadder package for a real insurer (Grinnell Mut Grp) and the incurred factors matched exactly, while running across 233 companies at once.

_Actuaries weighing Python versus R tooling for reserving workflows can compare approaches on daily.dev._

### Does smoothing Chain-Ladder development factors with Whittaker-Henderson actually improve reserve accuracy?

Not necessarily. For one insurer with a non-monotonic incurred pattern, Whittaker-Henderson smoothing shifted the total estimated reserve by about 3% (+31.1), but compared against actual ultimate losses after 10 years of development, both the raw Chain-Ladder estimate (194,067) and the smoothed estimate (194,098) overestimated the true value (189,901), with the roughly 31 difference between them small relative to Mack's method standard error of 4,582 for that triangle.

_Teams deciding between smoothing methods for reserving models can weigh trade-offs discussed on daily.dev._

## Similar posts on daily.dev

- [Bellman Equation: A Comprehensive Guide](https://daily.dev/posts/bellman-equation-a-comprehensive-guide-nfsuexrh9) · Medium · 0 upvotes · 0 comments
- [Markov Chains: nuclear algorithm used by Quants to crush 87% of Polymarket traders](https://daily.dev/posts/markov-chains-nuclear-algorithm-used-by-quants-to-crush-87-of-polymarket-traders-czdce9mxh) · Coins Bench · 2 upvotes · 1 comments
- [Constance Crozier: Forecasting s-curves is hard](https://daily.dev/posts/constance-crozier-forecasting-s-curves-is-hard-46qpq5gvu) · swyx · 0 upvotes · 0 comments
- [DeepSeek's mHC: When Residual Connections Explode](https://daily.dev/posts/deepseek-s-mhc-when-residual-connections-explode-46wypc9bp) · Hacker News · 4 upvotes · 0 comments
- [Survival Analysis and the Cox Proportional Hazards Model: A Beginner-Friendly Guide](https://daily.dev/posts/survival-analysis-and-the-cox-proportional-hazards-model-a-beginner-friendly-guide-ix1j5wqqw) · Towards Data Science · 0 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#data-analysis](https://daily.dev/tags/data-analysis), [#polars](https://daily.dev/tags/polars)

[View this post on daily.dev](https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When Chain-Ladder Factors Misbehave: Smoothing Reserves with Polars and Whittaker-Henderson","url":"https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf"},"datePublished":"2026-09-21T10:06:54.774Z","dateModified":"2026-09-21T10:07:21.787Z","description":"A full Chain-Ladder insurance reserving calculation is run for 233 US insurers using a handful of polars expressions, cross-validated against R's ChainLadder...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8a3a71901f91ac2677425812934fcc3c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/8a3a71901f91ac2677425812934fcc3c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"R-bloggers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"R-bloggers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/98bcbbdf72774292a55ceda8f2277f1e","url":"https://daily.dev/sources/rbloggers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,data-analysis,polars","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"R-bloggers","item":"https://daily.dev/sources/rbloggers"},{"@type":"ListItem","position":3,"name":"When Chain-Ladder Factors Misbehave: Smoothing Reserves with Polars and Whittaker-Henderson"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/when-chain-ladder-factors-misbehave-smoothing-reserves-with-polars-and-whittaker-henderson-tizwzhedf#faq","mainEntity":[{"@type":"Question","name":"Is there a built-in Whittaker-Henderson smoothing function in scipy now?","acceptedAnswer":{"@type":"Answer","text":"Yes, scipy 1.18 ships scipy.signal.whittaker_henderson as a built-in implementation of Whittaker-Henderson smoothing. It is called with a signal array, optional weights, a penalty order (commonly order=2 for curvature), and a penalty strength lamb, returning a result object whose .x attribute holds the smoothed values. Anyone smoothing noisy time series data can track scipy releases like this one on daily.dev."}},{"@type":"Question","name":"How do you compute Chain-Ladder development factors for insurance loss reserving using polars instead of R's ChainLadder package?","acceptedAnswer":{"@type":"Answer","text":"Group claims data by accident year and development lag, filter to keep only the observed upper-left triangle, then use polars group_by with .over() window expressions to compute volume-weighted factors as the sum of current losses divided by the sum of previous-lag losses per development lag. This approach was validated against R's ChainLadder package for a real insurer (Grinnell Mut Grp) and the incurred factors matched exactly, while running across 233 companies at once. Actuaries weighing Python versus R tooling for reserving workflows can compare approaches on daily.dev."}},{"@type":"Question","name":"Does smoothing Chain-Ladder development factors with Whittaker-Henderson actually improve reserve accuracy?","acceptedAnswer":{"@type":"Answer","text":"Not necessarily. For one insurer with a non-monotonic incurred pattern, Whittaker-Henderson smoothing shifted the total estimated reserve by about 3% (+31.1), but compared against actual ultimate losses after 10 years of development, both the raw Chain-Ladder estimate (194,067) and the smoothed estimate (194,098) overestimated the true value (189,901), with the roughly 31 difference between them small relative to Mack's method standard error of 4,582 for that triangle. Teams deciding between smoothing methods for reserving models can weigh trade-offs discussed on daily.dev."}}]}
```

