JuliaActuary / Open source
Actuarial modeling, built for Julia.
Practical, extensible tools for mortality, financial valuation, and experience analysis.
Mortality and survival
Work with standard tables, mortality models, and life contingencies.
Financial valuation
Build yield curves, value cashflows, and measure interest-rate risk.
Experience analysis
Calculate exposures and explore insurance experience with Julia’s data ecosystem.
JuliaActuary is an ecosystem of packages that makes Julia the easiest language to get started for actuarial workflows.
Julia is an ideal language for Actuaries and other financial professionals.
It is free, open-source software and you can join the development on Github.
Code Examples
julia> using MortalityTables
julia> MortalityTables.table("2015 VBT Smoker Distinct Male Non-Smoker ALB")
MortalityTable (Insured Lives Mortality):
Name:
2015 VBT Smoker Distinct Male Non-Smoker ALB
Fields:
(:select, :ultimate, :metadata)
Provider:
American Academy of Actuaries along with the Society of Actuaries
mort.SOA.org ID:
3269
mort.SOA.org link:
https://mort.soa.org/ViewTable.aspx?&TableIdentity=3269
Description:
2015 Valuation Basic Table (VBT) Smoker Distinct Table...using FinanceModels
maturities = [0.5, 1.0, 1.5, 2.0]
rates = [5.0, 5.8, 6.4, 6.8] ./ 100
quotes = ZCBYield.(rates, maturities)
curve = fit(Spline.Linear(), quotes, Fit.Bootstrap())
discount(curve, 2.0) # discount factor to year 2
zero(curve, 1.5) # continuously compounded zero rate
forward(curve, 1.0, 2.0) # rate between years 1 and 2julia> using ActuaryUtilities
julia> cashflows = [5, 5, 105]
julia> discount_rate = 0.03
julia> round(present_value(discount_rate, cashflows); digits=2)
105.66
julia> round(duration(Macaulay(), discount_rate, cashflows); digits=2)
2.86
julia> round(duration(discount_rate, cashflows); digits=2)
2.78
julia> round(convexity(discount_rate, cashflows); digits=2)
10.63using LifeContingencies
using MortalityTables
using FinanceCore
# load mortality rates from MortalityTables.jl
vbt2015 = MortalityTables.table("2015 VBT Smoker Distinct Male Non-Smoker ALB")
issue_age = 30
life = SingleLife( # The life underlying the risk
mortality = vbt2015.select[issue_age], # -- Mortality rates
)
yield = Periodic(0.05, 1) # Using a flat 5% interest rate
lc = LifeContingency(life, yield) # combine the life with the yield
ins = Insurance(lc) # alternate way to construct: Insurance(life, yield)
# Summary Scalars
present_value(ins) # The actuarial present value
premium_net(lc) # Net whole life premium
LifeContingencies.V(lc,5) # Net premium reserve for whole life insurance at time 5The life-contingency example uses the compatible LifeContingencies 2.5 / FinanceCore 2 / MortalityTables 2 environment. See package compatibility before combining it with the newer finance and mortality releases.
Packages
See the current releases and migration guides, including the Julia 1.10 minimum for the latest finance and mortality packages.
MortalityTables.jl - Easily work with standard mort.SOA.org tables and parametric models with common survival calculations.
LifeContingencies.jl - Insurance, annuity, premium, and reserve maths.
ActuaryUtilities.jl - Robust and fast calculations for internal_rate_of_return, duration, convexity, present_value, breakeven, and AD-based key rate sensitivities.
FinanceModels.jl - Composable contracts, models, and functions for financial instruments — including stochastic short-rate models and Monte Carlo simulation.
ExperienceAnalysis.jl - Meeting your exposure calculation needs.
EconomicScenarioGenerators.jl - Scenario generation for existing ESG workflows. For current short-rate models, see FinanceModels 7 and the compatibility notes.