Financial Risk Forecasting Notebook. Version 2

Published

20 April 2024

Version 2

These notes accompany Financial Risk Forecasting written by Jón Daníelsson at the London School of Economics. You can find his blog and other writing on the topic of risk on his main webpage ModelsandRisk.org and his academic research on RiskResearch.org.

The book Financial Risk Forecasting is focused on practical quantitative methods for forecasting market risk with implementations in the four most common mathematical and statistical programming languages, Julia, Matlab, Python and R. Of those, R is the easiest to implement because of the richness of its statistical libraries and high-quality user interface, RStudio. While the website for Financial Risk Forecasting contains basic code in all four languages, these pages provide in-depth instructions on implementing risk forecasting in R.

Almost every financial institution in the world needs to forecast and manage risk, and the financial regulators mandate risk management for most financial institutions. For example, the Basel committee oversees the Basel Capital Accords. While they apply to member states of the G20, every country with a market-based financial system also implements the Basel regulations. While those regulations cover a wide spectrum of risk-taking activities, the aspect relevant to what we do here is the trading book. While we do not discuss financial regulations in this notebook, we refer you to the chapter on regulations to be found in Chapter 13 here.

The objective of these notes is not to show the mathematics of risk forecasting nor the basics of the R programming language since there are better sources for such information. The textbook accompanying Financial Risk Forecasting and the lecture slides on the website contain much of the necessary mathematics and statistics, and we have links to some of the best training information for R in Section below. Instead, our focus here is on bringing all of these together, including mathematics and statistics, code, and data, in order to produce market risk forecasts.

These notes are written in Quarto. Thanks to Alvaro Aguirre, Jia Rong Fan and Qinxian Wu for assisting with this notebook.

Comments on these notes can be sent here.