Matlab Package Financial Risk Management

On this page, we provide Matlab functions for the implementation of the risk measurement methods presented in our financial risk management book. These functions can particularly be used to reproduce the results of the included case studies.


The package is structured as follows:

  1. Value-at-risk (VaR)
    Empirical VaR, normal VaR, t VaR, Cornish-Fisher VaR, POT VaR, normal mixture VaR
  2. Expected Shortfall (ES)
    Empirical ES, normal ES, t ES, Cornish-Fisher ES, POT ES, normal mixture ES
  3. VaR Backtesting
    Tests on unconditional/conditional coverage and independence
  4. Conditional/dynamic risk modelling
    EWMA- and GARCH-based conditional VaR and ES estimation
  5. Portfolio risk
    Historical simulation, variance-covariance approach, copula based meta distributions, capital allocation/risk decomposition
  6. Derivates
    Black-Scholes prices and greeks, exact VaR, delta approximation of VaR, delta-gamma approximation of VaR, maturity effects, Monte Carlo simulation
  7. Credit risk
    VaR with independent defaults (exact distribution, Poisson and normal approximation), VaR with correlated defaults (numeric integration, LHP approximation, granularity adjustment, Monte-Carlo simulation)
  8. Misc.
    Miscellaneous functions for estimation and simulation
  9. Examples
    Small examples illustrating selected functions. 

A more detailed overview of the function package can be found in [Overview]. Instructions concerning their use are included within these functions and can be accessed through the standard Matlab commands “help” and “doc”. The function code is kept relatively simple, therefore, it might be useful for the illustration of selected methods within the frame of exercises or case studies.

The function package is provided under the BSD-license. It can thus be freely used and changed. Nevertheless, we do not take any responsibility for bugs or resulting damage. If you find mistakes or have helpful suggestions, we would be pleased about an email to

Download latest version (21.03.2018)

We thank Jan Bauer for his valuable support in documenting the codes and preparing the examples.