This project implements a stochastic Monte Carlo simulation model to assess the risk of retirement account ruin over an individual’s lifetime. The model integrates investment risk, longevity risk, contribution dynamics, withdrawals, and fees within a unified actuarial framework.
The primary objective is to estimate the probability and timing of financial ruin prior to death and to evaluate the distribution of terminal account balances under both base-case and stressed economic scenarios.
The model simulates the evolution of an individual retirement account from a specified starting age until death or a maximum modelling age, whichever occurs first.
Each simulation path incorporates:
- Stochastic real investment returns
- Real salary growth and contribution flows
- Deterministic real retirement withdrawals
- Investment management fees (percentage-based and flat)
- Mortality risk based on a standard actuarial life table
The simulation is repeated across a large number of paths to obtain empirical distributions of outcomes.
- Annual real investment returns follow a lognormal distribution.
- Returns are generated as:
- Under this parameterisation:
This formulation ensures that the parameter
- Salary growth and contributions are modelled in real terms.
- Contributions are a fixed proportion of salary during the accumulation phase.
- Withdrawals during retirement are fixed real amounts and occur annually.
- Investment fees consist of:
- A proportional fee applied to account balances
- A flat annual fee
- Fees are deducted annually before return realisation.
- Mortality is modelled using the SOA 2008 Annuity Life Table, implemented via the
lifecontingenciesR package. - The use of a gender-neutral annuity life table implicitly assumes identical mortality experience across genders. This may understate or overstate longevity risk for specific subpopulations.
- Death age is simulated probabilistically using the life table survival distribution.
- Mortality is assumed independent of investment performance.
- Ruin occurs when the account balance becomes non-positive at any time prior to death, after scheduled withdrawals and fees.
- Once ruin occurs, the account balance is set to zero and remains there for the remainder of the simulation path.
A single simulation path tracks:
- Age progression
- Salary growth and contributions
- Investment returns and fees
- Retirement withdrawals
- Mortality and ruin checks
This produces a full life-cycle trajectory of account balances for one individual.
- The single-path model is repeated over
n_simindependent simulation paths. - Outcomes are aggregated to estimate probabilities and risk measures.
- Probability of ruin before death
- Distribution of ruin ages (conditional on ruin occurring)
- Cumulative probability of ruin by age
- Distribution of terminal account balances at death
- Value at Risk (VaR)
- Tail Value at Risk (TVaR)
These metrics quantify downside financial risk in retirement outcomes.
Sensitivity analysis is conducted to assess the robustness of results to adverse conditions. Each scenario modifies one parameter at a time relative to the base case.
Scenarios include:
- Increased investment volatility
- Lower expected real returns
- Higher real retirement withdrawals
- Increased investment fees
Results are compared to the base case to identify key drivers of ruin risk.
The project includes graphical outputs to support interpretation, including:
- Probability of ruin by age
- Comparative bar charts for sensitivity scenarios
- R >= 4.2
- Packages:
lifecontingenciesggplot2
Install missing packages with:
install.packages(c("lifecontingencies", "ggplot2")) evaluategit clone https://github.com/aram-analytics/monte_carlo_retirement.gitsource("monte_carlo_retirement.R")This model is intentionally simplified and subject to several limitations:
- Asset allocation is fixed and does not adjust dynamically over time
- Inflation is assumed deterministic via real-term modelling
- Withdrawals follow a fixed rule and do not respond to account performance
- No bequest motive or behavioural response is modelled
- Mortality improvements are not incorporated
- These limitations provide clear avenues for future extension.
This project is designed for:
- Educational and demonstration purposes
- Actuarial risk analysis and retirement modelling practice
- Portfolio presentation for actuarial or quantitative finance roles
- It is not intended for real-world financial advice or regulatory decision-making.