Skip to content

Commit a5b22cb

Browse files
Merge pull request #67 from actuarialopensource/paper
Paper
2 parents 43a2a31 + e4c4b61 commit a5b22cb

4 files changed

Lines changed: 230 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
/.vscode
55
.CondaPkg
66
*.code-workspace
7-
Manifest.toml
7+
Manifest.toml
8+
joss/jats*
9+
joss/paper.pdf

joss/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
all: pdf
2+
3+
pdf:
4+
docker run --rm --volume $(PWD):/data --user $(id -u):$(id -g) --env JOURNAL=joss openjournals/inara

joss/paper.bib

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
@techreport{Larochelle:2023,
2+
title={Predictive Analytics and Machine Learning – Practical Applications for Actuarial Modeling (Nested Stochastic)},
3+
author={Larochelle, Jean-Philippe and Carlson, Peter and Carrier Cote, Vincent and Lu, Ying and Shapiro, Noah and Tam, Alex and Thusu, Viresh and Zhang, Ally},
4+
institution={SOA Research Institute},
5+
year={2023},
6+
month={May},
7+
url={https://www.soa.org/49ae74/globalassets/assets/files/resources/research-report/2023/predictive-analytics-and-machine-learning.pdf},
8+
type={Technical report}
9+
}
10+
11+
@article{Strommen:2013,
12+
title={Tables Database Goes XtbML},
13+
author={Strommen, Stephen J.},
14+
journal={Society of Actuaries CompAct Newsletter},
15+
year={2013},
16+
month={April},
17+
url={https://www.soa.org/news-and-publications/newsletters/compact/2013/april/com-2013-iss47/tables-database-goes-xtbml/}
18+
}
19+
20+
@techreport{Milliman:2024,
21+
title={An actuary’s guide to Julia: Use cases and performance benchmarking in insurance},
22+
author={Lee, Yun-Tien and Morales, Victor and Brackett, Jim and Long, Joe and Peplow, Thomas},
23+
institution={Milliman},
24+
type={White paper},
25+
year={2024},
26+
month={January},
27+
day={29},
28+
url={https://www.milliman.com/en/insight/an-actuary-guide-to-julia-use-cases-performance-benchmarking-insurance}
29+
}
30+
31+
@techreport{Atkinson:2016,
32+
title={Experience Study Calculations},
33+
author={Atkinson, David B. and McGarry, John K.},
34+
institution={Society of Actuaries},
35+
year={2016},
36+
month={October},
37+
type={Technical report},
38+
url={https://www.soa.org/globalassets/assets/Files/Research/2016-10-experience-study-calculations.pdf}
39+
}
40+
41+
@misc{Kinrade:2024,
42+
title={The Future of Actuarial Modeling},
43+
author={Kinrade, Nick and Abdullah, Yusuf},
44+
year={2024},
45+
month={January},
46+
day={5},
47+
url={https://www.pwc.com/us/en/industries/financial-services/library/future-of-actuarial-modeling.html}
48+
}
49+
50+
@misc{Kim:2018,
51+
author={Kim, Joseph},
52+
title={Application of GPU in Actuarial Modeling},
53+
year={2018},
54+
month={May},
55+
day={25},
56+
howpublished={Presentation at The 8th SOA Asia Pacific Annual Symposium},
57+
organization={Milliman},
58+
url={https://www.soa.org/globalassets/assets/files/e-business/pd/events/2018/asia-pacific-symposium/asia-pacific-symposium-session-5b.pdf}
59+
}
60+
61+
@misc{Hamamura:2018,
62+
author = {Hamamura, Fumito},
63+
title = {lifelib: life actuarial models},
64+
year = {2018},
65+
publisher = {GitHub},
66+
journal = {GitHub repository},
67+
url = {https://github.com/lifelib-dev/lifelib}
68+
}
69+
70+
@misc{Hamamura:2022a,
71+
title={Testing lifelib on GPU},
72+
author={Hamamura, Fumito},
73+
year={2022},
74+
month={January},
75+
day={15},
76+
howpublished={\url{https://modelx.io/blog/2022/01/15/testing-lifelib-on-gpu}},
77+
organization={PwC}
78+
}
79+
80+
@misc{Hamamura:2022b,
81+
title={Running a heavy model while saving memory},
82+
author={Hamamura, Fumito},
83+
year={2022},
84+
month={March},
85+
day={26},
86+
howpublished={\url{https://modelx.io/blog/2022/03/26/running-model-while-saving-memory}},
87+
organization={PwC}
88+
}
89+
90+
@misc{Belmant:2022,
91+
author = {Belmant, Cédric},
92+
title = {LifeSimulator.jl: Simulation of insurance products forward in time},
93+
year = {2022},
94+
publisher = {GitHub},
95+
journal = {GitHub repository},
96+
url = {https://github.com/JuliaActuary/LifeSimulator.jl}
97+
}
98+
99+
100+
@article{Robidoux:2016,
101+
title={Introduction to Using Graphical Processing Units for Variable Annuity Guarantee Modeling},
102+
author={Robidoux, Bryon},
103+
journal={Society of Actuaries Predictive Analytics and Futurism Newsletter},
104+
year={2016},
105+
month={December},
106+
url={https://www.soa.org/globalassets/assets/Library/Newsletters/Predictive-Analytics-and-Futurism/2016/december/paf-iss14-robidoux.pdf}
107+
}
108+
109+
110+
@misc{Halloran:2021,
111+
title={2021 US Life Insurance Pricing Survey Highlights},
112+
author={Halloran, Christopher},
113+
year={2021},
114+
month={November},
115+
howpublished={Presentation at the Southeastern Actuaries Conference Annual Meeting},
116+
institution={Oliver Wyman},
117+
url={https://www.seactuary.com/files/meetings/2021Fall/2021SEACAnnualHalloran(AM).pdf}
118+
}
119+
120+
121+
122+
@Manual{Heaphy:2024,
123+
title = {actxps: Create Actuarial Experience Studies: Prepare Data, Summarize Results, and Create Reports},
124+
author = {Matt Heaphy},
125+
year = {2024},
126+
note = {R package version 1.4.0.9000},
127+
url = {https://github.com/mattheaphy/actxps/}
128+
}
129+
130+
@misc{Loudenback:2018,
131+
author = {Loudenback, Alec},
132+
title = {MortalityTables.jl: SOA mortality tables in Julia},
133+
year = {2018},
134+
publisher = {GitHub},
135+
journal = {GitHub repository},
136+
url = {https://github.com/JuliaActuary/MortalityTables.jl}
137+
}
138+
139+
@misc{Loudenback:2020,
140+
author = {Loudenback, Alec and Caseres, Matthew},
141+
title = {ExperienceAnalysis.jl: Calculate exposures},
142+
year = {2020},
143+
publisher = {GitHub},
144+
journal = {GitHub repository},
145+
url = {https://github.com/JuliaActuary/ExperienceAnalysis.jl}
146+
}
147+
148+
@misc{Caseres:2021,
149+
author = {Caseres, Matthew},
150+
title = {Pymort: SOA mortality tables in Python},
151+
year = {2021},
152+
publisher = {GitHub},
153+
journal = {GitHub repository},
154+
url = {https://github.com/actuarialopensource/pymort}
155+
}

joss/paper.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: 'Actuarial Open Source Benchmarks: Performance testing actuarial models on CPU and GPU'
3+
tags:
4+
- Python
5+
- Julia
6+
- actuarial science
7+
- GPU
8+
- performance testing
9+
authors:
10+
- name: Matthew Caseres
11+
orcid: 0000-0001-5819-001X
12+
affiliation: 1
13+
affiliations:
14+
- name: Georgia Institute of Technology, USA
15+
index: 1
16+
date: 27 May 2024
17+
bibliography: paper.bib
18+
---
19+
20+
# Summary
21+
22+
Actuaries are employed by insurance companies to manage risk related to uncertain future cashflows and play a large role in regulatory compliance for insurance companies.
23+
Actuarial models are used to forecast future economic scenarios and cash flows related to insurance contracts. The benchmarks provided in the Actuarial Open Source GitHub organization test the consistency and performance of existing open source actuarial models and provides novel approaches to achieve greater performance and scale on certain tasks.
24+
25+
# Statement of need
26+
27+
The actuarial modeling software market is dominated by large vendors [@Halloran:2021; @Kinrade:2024]. Vendor software can restrict the sharing of actuarial software [@Larochelle:2023], demonstrating the value of open source solutions in enabling reproducible research.
28+
29+
A 2024 PwC publication [@Kinrade:2024] speculates that graphics processing units (GPUs) may become the norm for actuarial calculation engines. Despite discussion of actuarial models running on GPUs in several publications [@Kim:2018; @Hamamura:2022a; @Robidoux:2016], there are no reproducible benchmarks for GPU-based actuarial applications.
30+
31+
On the CPU the ecosystem is more mature and multiple open source packages might implement a particular calculation. In this case we can compare the execution time of the packages on a specific task, as well as validate that the packages can produce the same results.
32+
33+
# Benchmarking infrastructure
34+
35+
Calculations performed on CPU are run with GitHub actions on GitHub-hosted runners. We found that the execution times reported from Github hosted runners are generally consistent between runs and this has been independently verified by Milliman [@Milliman:2024].
36+
37+
Calculations performed on GPU are published to DockerHub using GitHub actions and tested on GPUs in the cloud.
38+
39+
# Benchmark categories
40+
41+
## LifeLib life insurance cash flow models
42+
43+
LifeLib [@Hamamura:2018] is an open source library that contains reference implementations for various life insurance product cash flow models. We provide implementations in Python and Julia to assess the performance and coding style of the following strategies:
44+
45+
* Recursion with memoization
46+
* Recursion with memoization and cache eviction to reduce memory consumption [@Hamamura:2022b]
47+
* Array based models using broadcasting and avoiding iteration
48+
* Array based models using iteration that are optimized to reduce memory consumption [@Belmant:2022]
49+
50+
## Experience studies
51+
52+
Some actuarial techniques for calculating mortality rates involve partitioning date ranges [@Atkinson:2016]. These date partitioning algorithms are implemented by the actxps R package [@Heaphy:2024] and the ExperienceAnalysis.jl [@Loudenback:2020] Julia package . The benchmarking process identified a number of inconsistencies which were raised as issues on GitHub and quickly resolved by the maintainers of the packages.
53+
54+
## Mortality tables software
55+
56+
The Society of Actuaries provides a number of mortality tables in an XML format [@Strommen:2013]. These tables have been wrapped into packages for convenient access with the pymort [@Caseres:2021] Python package and the MortalityTables.jl [@Loudenback:2018] Julia package. There are many XML files and each XML file contains many numbers. It is not practical to verify that each package correctly parses every value from every XML file. A hash was computed using each value from 10 files verifying that the values are consistent between the two packages for these files.
57+
58+
# Conclusion
59+
60+
The benchmarks provided by the Actuarial Open Source organization on GitHub intend to assist in testing the performance and accuracy of open source actuarial software. This is accomplished by selecting a specific actuarial calculation and comparing the results and execution times of various approaches.
61+
62+
Our current benchmarks are chosen for simplicity so that the barrier to entry remains low. We have not implemented complex calculations like nested stochastic variable annuity models which could benefit from concrete benchmarks. More complex benchmarks that represent the computational challenges facing the insurance industry will require broader community engagement.
63+
64+
# Acknowledgements
65+
66+
I thank Alec Loudenback for contributing Julia benchmarks, providing feedback through GitHub issues, and creating many Julia packages through the JuliaActuary GitHub organization. I thank Fumito Hamamura for creating LifeLib, the Actuarial Open Source LinkedIn community page, modelx, and the insights found on the modelx blog. Many thanks Cédric Belmant for providing a Julia implementation to the universal life benchmark which is incredibly hard to beat and to Matt Heaphy for his implementations of experience studies software in R and Python.
67+
68+
# References

0 commit comments

Comments
 (0)