RiskSim – Risk Simulation Framework
Quantitative risk management was among the subjects that interested me most during my master's studies. As a student assistant, I reimplemented three risk simulation methods (Monte Carlo, variance–covariance, and historical simulation) in Python, porting the Excel examples from the lectures.
A year later, I presented that implementation to students in my first lecture.
I have now revisited the project: RiskSim is a Python package with an object-oriented design and a Streamlit interface in place of the original Jupyter notebooks, distributed as a Docker image.
What RiskSim does
RiskSim models dependencies within a portfolio and computes risk measures such as:
- Value-at-risk (VaR) – the loss that is not exceeded with a given probability over a stated horizon
- Conditional VaR (CVaR) – the expected loss beyond the VaR
- Power spectral risk measure – a coherent spectral measure that weights the quantiles of the loss distribution by a decreasing risk-aversion function
Key features
- Three integrated risk modeling approaches: Monte Carlo (Gaussian copula), historical simulation, and variance–covariance
- An interactive Streamlit dashboard for exploring dependencies, distributions, and risk measures
- Quantification of the run-to-run variability of the Monte Carlo estimates
- Flexible configuration of portfolio parameters, correlations, and simulation settings
Watch the demo
Availability
RiskSim is open source and is distributed as a Docker container.