Combining a technological and practical approach to deliver actuarial and risk modelling solutions
We help you streamline your modelling and reporting workflows
Unlock the future of insurance with our complimentary educational workshop diving deeply into AI and Machine Learning.
Bence is a senior actuary with 20+ years of experience in life actuarial science and reporting in Solvency II, IFRS, BMA EBS and ICS regulations. His focus has been on actuarial and risk modelling - including capital projections, market risk management and internal model validation – and ERM framework design. Bence delivers business transformation, reinsurance, new authorisation and M&A projects and is keen on applying machine learning and data analytics for actuarial use cases.
This article presents a case study on how insurance reporting can be revolutionised with Python and AI via automation.
Financial reporting in insurance is the process of documenting and communicating the financial position and profitability of the company over specific periods, typically on a quarterly or yearly basis. Insurance companies must prepare a range of reports across multiple accounting standards and regulatory regimes causing significant overhead.
Despite the high volume and complexity of reporting, most companies adopted a manual workflow consisting of spreadsheets and text editors such as MS Excel and Word. This approach is error prone, inefficient and requires excessive effort.
Process automation offers an opportunity to reduce the time spent on preparing financial reports and free up time for more value-adding analysis.
The interactive application we built for this case study performs the end-to-end solvency reporting process instantly and generates a validation report to verify the internal consistency of the results. Also, it enables the user to use AI to write commentary on the results, further reducing the effort.
A spreadsheet-based reporting process creates a significant operational burden, requiring manual tasks such as transferring data, updating tables and charts, inserting them into reports, and adding commentary. While these tools are flexible and intuitive, enabling collaboration within and across departments, using them as part of a reporting process is time-consuming and risky.
Performing calculations in spreadsheets and manually copying over result summaries (tables and charts) to text editors can become inefficient, diverting time away from strategic and value-adding analysis. Multiple iterations of checks and review cycles further exacerbate inefficiencies, while the inability to perform real-time updates can delay decision-making.
The growing complexity of the reporting landscape compounds these challenges. Recent examples include the introduction of IFRS 17 for insurance accounting or the review of the Solvency II prudential regime. Simultaneous regulatory and internal reporting under tight deadlines adds pressure, increasing the risk of inconsistent results, missing deadlines, or strained relationships with the regulator.
Automating reporting processes is essential to reduce costs, improve efficiency and accuracy.
Several toolkits are available for process automation. We selected Python, an open-source general purpose programming language that enables the automation of end-to-end workflows from data imports and transformations to performing complex calculations and generating reports.
We used the following libraries for data analysis:
Other libraries were applied to generate HTML, PDF and MS Word reports:
Finally, we used the following libraries to create the interactive app and to connect to AI powered chatbots for text generation and reasoning:
We used a free version of Gemini (v1.5-pro) and a chargeable version of ChatGPT (v3.5-turbo) via an API which means that they run in the cloud on the provider’s systems. The app enables the user to choose between the two models or turn off AI commentary.
Figure 2 shows the end-to-end report automation process powered by Python and AI.
For our case study we used a brief, two pages report that summarises the solvency position of a hypothetical company under Solvency II, the prudential regime applicable for insurers in the European Union.
The original report was created in Word and included a table, two charts and was divided into two sections and the first section to three subsections. The underlying result tables and charts were created in Excel and copied over to Word mimicking a manual spreadsheet based process.
As part of the automation, we created layout files in HTML for the solvency report and the validation report. This took a bit of time, but it is a once-off effort that enables repeating the process in future reporting periods instantly. The new automated Python based process uses the Excel table as the single input and performs the following ten steps in one second:
The initial effort invested in designing the layout and program code pays off quickly as a repeatable, automated process is created that generates the reports for each period in an instant. The validation report uses colour codes, flags any inconsistencies clearly with red colour above a prespecified threshold (all specified in the Python code).
Please click on the links below to take a look at the reports generated:
To make the code accessible for users without programming knowledge, we created an interactive Streamlit application in Python to run the process. The app runs in browser and all you need to do is to specify your choices in the sidebar on the left hand side and press the “Generate Report” button on the top. The inputs in the sidebar are:
The screenshot of the application is shown on Figure 3 below.
Obviously, the comfort of using AI commentary poses risks as well. Overreliance on AI generated wording can be problematic. Also, the response depends on the prompt given and may be inaccurate. For example, it took a few iterations for us to refine our prompt for the movement analysis via the Python code. Originally the AI generated text referred to diversification or BSCR as individual risks or Deferred Tax Adjustment as a BSCR component, both are incorrect. But once the prompt included an explanation of the SCR components, the AI generated movement analysis was accurate and of high quality.
Still, the automated process was designed to enable the user to handle AI related risks as follows:
In case the AI commentary is turned off, the report will still be accurate as in this case the result commentary is generated by the Python code in a prescribed format stating the movement in key items in monetary amounts and as a percentage and the BSCR component with the largest contribution. The user can then add further commentary based on their own analysis and judgement.
In a real-world setting, data privacy has to be addressed to avoid sharing sensitive information externally. The safest way to achieve this is to use install a freely available AI model (e.g. Llama) locally instead of using APIs. With this approach, the model operations on premise and data does not leave the company’s systems.
The functionality of the app can be enhanced further to improve user experience, examples include:
Once the automated workflows is set up for a specific report, the next step natural idea is to extend the automation to other reports. To achieve this, the layout and Python code have to amended but otherwise the process is the same.
This can be accelerated with the following Python libraries:
Furthermore, the AI chatbots already used can be used to help with amending the layout and the Python code although this is likely to require a few iterations and human in the loop.
A summary of the steps mentioned above is shown on Figure 4. Once the process is set up for the new report, it can be executed in the same way as for the previous example (see Figure 2).
As shown in our case study, Python has powerful capabilities for the automation of financial reporting. However, not all organisations are prepared to adopt such an open-source toolkit and prefer to stick with spreadsheets and text editors due to their wide availability, transparency and flexibility.
The pros and cons of adopting a Python based automation toolkit for financial reporting are summarised below.
Pros | Cons |
Automation: Python excels at automating repetitive tasks resulting in reduced runtime. | Steep Learning Curve: Python requires programming knowledge, which can be a barrier for those without a coding background. |
Integration: Python can easily integrate with databases, web services, and other programming languages, providing flexibility in accessing and manipulating data. | Setup and Maintenance: Setting up the Python environment and managing dependencies can be complex. |
Reproducibility: Python scripts can be version-controlled using tools like Git, ensuring that workflows are reproducible and changes are trackable. | Error Handling: Python scripts can be less forgiving with errors, requiring debugging and thorough testing to ensure accuracy. |
Advanced Analytics and AI: Python facilitates complex data analysis, insightful data visualisations and is the go to language for AI and Machine Learning models that can be leveraged seamlessly. | User Interface: Python scripts may be perceived as less user-friendly and intuitive for non-technical users. |
Scalability: Python handles large datasets efficiently. Cloud solutions and parallel computing can add further scale and computing power. |
|
Cost: As an open-source tool it is free to use, making it a cost-effective option. |
|
The benefits of using a Python-based process automation toolkit are significant and include:
Still, the adoption of such toolkits has been slow in insurance and the wider financial services industry. This is largely due to obstacles such as the steep learning curve associated with coding and the perceived lack of user-friendliness, flexibility and transparency. These obstacles can be addressed by:
Embracing technological change calls for a shift in mindset and buy-in from reporting teams is essential for the success of any transformation project. As the insurance industry continues to evolve, automation will no longer be optional but essential. With advancements in automation and AI technology, financial reporting can be faster, smarter, and more accurate. Now is the time to lead this transformation.
If you found this post insightful, you may also be interested in the previous issue of this series Finalyse: Process Automation in Insurance Series #1 : Workflow optimisation with automated process mapping
We would be happy to walk you through our interactive Streamlit application to showcase how it can revolutionise financial reporting.
Furthermore, we can help you with the following on your process automation journey:
Please sign up for a complimentary process automation workshop (virtual or in person) so that we can help identify and prioritise your uses cases. To find out more about our process automation offering please visit our service page at process automation for (re)insurers.
For further support or to request a demo please reach out to Bence Zaupper or your regular Finalyse contact.