How Swiss Re Brings R and Python to Actuaries in Excel
Summary
Claudio Rebelo, a model validation actuary at Swiss Re, stopped trying to move his colleagues off Excel and instead brought R and Python to them, publishing his logic from Posit Workbench to Posit Connect and calling it from an Excel add-in. A colleague who does not write code was running an R-based convergence test in under ten minutes, and the approach went on to win the 2026 Swiss Re Group Reserving & AI Hackathon and the Posit Impact Award.
Image: © Leonardo Finotti, 2017
About:
The Swiss Re Group is one of the world's leading providers of reinsurance, insurance and other forms of insurance-based risk transfer, working to make the world more resilient. The aim of the Swiss Re Group is to enable society to thrive and progress, creating new opportunities and solutions for its clients.
Industry:
Insurance
Technology used:
Posit Workbench, Posit Connect, Posit Package Manager
The challenge
Access, Not Analytics
Swiss Re has invested in analytical capability for years, and a significant amount of actuarial work there is already carried out in R and Python. The challenge Claudio Rebelo, Model Validation Actuary at Swiss Re set out to solve was not a shortage of advanced analytics. It was access: making capability that already existed easy to reach, for colleagues who code and colleagues who do not.
Rebelo wrote in his winning 2026 Posit Impact Award submission: "Great ideas often remain 'orphans', not because they are not useful, but because of the friction of adoption: 'Install this package, learn these commands, update those dependencies… oh, it works on my machine but not on yours.'"
Knowing the language is not sufficient either. A colleague sends you a script and you are left working out which function to run first, what input it expects, what the parameters mean. "Using someone else's code can feel like learning a new mini-language," he wrote. "The author then becomes the person everyone depends on to run it."
The cost of that friction is duplication. When a capability is hard to reach, teams rebuild it instead of reusing it, and the same solution ends up maintained separately in R, in Python, in SAS and in Matlab, with development, testing and maintenance paid for every time.
The instinct at that point is to build a new front end and invite everyone to it. Rebelo's view is that this is where most such efforts fail.
"Stop fighting Excel. As data professionals, we often think our new dashboard is so brilliant that business users will gladly abandon their spreadsheets. They will not. If you want your models adopted, you have to put your engine inside their cockpit."
The solution
Posit Connect as a bridge for Excel and data science
Using Posit Team infrastructure, Rebelo built a way to reach R, Python and AI capabilities from Excel without writing code or installing anything. The logic is developed in Posit Workbench and deployed to Posit Connect as an API endpoint. The end user never interacts with Posit.
From their side it is an Excel add-in, and Rebelo is emphatic about why that mattered more than the architecture. "The backend code can be complex, but the interface must be dead simple. Abstract the complexity away into a single, predictable parameter table. If a user needs a manual to figure out how to pass arguments, you have already lost them."
In practice: users open a catalog of available routines and read a description of each. Choosing one builds a table of its parameters, with dropdowns where only certain values are allowed and a column explaining each input and its default. They type the table name into any cell and press Ctrl+Shift+R. What comes back can be data, a simulation, a visualization, a Quarto report, an Office document, or the output of an AI workflow. If it fits in Excel cells it drops straight in. If not, a clickable download link appears.
None of it is tied to Excel. The same endpoint can be called from SAS, Power BI or a Shiny app, and endpoints written in R are published as a package in Posit Package Manager so R users get the same maintained functions directly. Rebelo adds, "Developers can use the best language for each task. Machine learning in Python and data wrangling in R in the same workflow? No problemo."
Real-World Example
Internal Capital Adequacy Model Toolbox for model validation
The Internal Capital Adequacy Model (ICAM) Toolbox gives the Swiss Re model validation team a simpler and more consistent way to run quantitative tests on the model, without each person having to maintain separate code.
The first of those tests in regular use is a convergence test. Models of this kind work by simulation, generating a large number of possible outcomes and reading their answer from the spread of results. Because those scenarios are randomly generated, the answer shifts slightly from one run to the next, and running too few of them leaves a figure that could move the next time somebody runs it.
Reviewers run all of it from Excel.
"A non-coding colleague learned within ten minutes to run an R-based convergence test and generate ggplot2 visualizations from Excel. Seeing this convinced others across the team to adopt the framework."
Because the test runs in the workbook, the inputs, the parameters, the results and the plots stay together as a readable record of what was run. Colleagues and managers can check the analysis without inspecting scripts, project folders and execution order.
The point, as Rebelo puts it, is that the toolbox "makes specialist validation tests easier to access, more consistent and reusable across the team."
The results
A Single Source of Truth, Shared Widely
The clearest change is that more people can use R and Python capabilities without knowing how to code. Colleagues who do code face a much lower learning curve when picking up someone else's work, because the interface shows them the required inputs, the accepted values and the defaults rather than leaving them to reverse-engineer a script.
Developers are also more willing to build and share, because their work is no longer limited to colleagues using the same language or the same application. One routine reaches R users directly, Excel users through the add-in, and any other application that can call it.
The architecture is what keeps that from decaying. "Do not compromise on the architecture. A centralized API means a single source of truth: fix a bug on the server, and every Excel workbook in the company or any other client is updated instantly with zero local maintenance," Rebelo says.
The approach won the 2026 Swiss Re Group Reserving & AI Hackathon. It is now implemented in Rebelo's team, with other teams planning to adopt it.
Looking ahead
Testing new ideas before paying to build them
The approach is beginning to extend its reach beyond model validation. The P&C reserving team will use a curve-fitting endpoint to fit development factors for portfolios reserved outside its main reserving tool, SPIRE. The endpoint makes the same R-based curve-fitting capability already used within SPIRE accessible from Excel, allowing actuaries to benefit from analytical logic previously confined to the main application.
Another potential use case is to test new methods in spreadsheets before committing to build them into SPIRE or any other application which lowers the cost of evaluating new workflows.
Rebelo's advice to anyone attempting something similar is to start small. Pick one painful, high value process, and show people how fast it runs when they press Ctrl+Shift+R. "Once they experience the power of the engine without having to learn the code, they will be the ones asking for more endpoints."
"It is still early, but capabilities previously confined to code can now reach non-coders within minutes," he says. "The transformation is not complete, but it has begun."
Helpful resources
Data Science & AI for Insurance
Fraud Detection & Claims Analytics with Posit