Financial
Risk
Forecasting
Market risk forecasting with R, Julia, Python and MATLAB. Code, lecture slides, implementation notes, seminar assignments and questions.

Explore resources
Topics covered
This is an outstanding book on empirical finance. I wholeheartedly recommend it.
Professor Oliver B. Linton
University of Cambridge
A real accomplishment and a must read for both risk professionals and students in the quantitative finance track.
Professor Xavier Freixas
Universitat Pompeu Fabra
A highly recommended book for any student of modern risk management techniques and their uses.
Professor Casper de Vries
Erasmus University Rotterdam
Financial Risk Forecasting is a tour de force. It will join that select group of works on my bookshelf that have become dog-eared from repeated use over the years.
Con Keating
European Federation of Financial Analysts' Societies
About the book
Financial Risk Forecasting provides a thorough introduction to practical quantitative risk management, with an emphasis on market risk. It brings together the three key disciplines of finance, statistics, and modelling to provide a solid grounding in risk management techniques, and is based on the author’s teaching notes and years of training practitioners in risk management techniques.
These pages supplement the R and Matlab book code with Julia and Python implementations. A detailed notebook on how to implement risk forecasting in R is also provided.
In addition, we provide questions and solutions for weekly seminar sessions, emphasising how to put each chapter of the book into practise.
The book begins with an introduction to financial markets and market prices, volatility clusters, fat tails and nonlinear dependence.
It then goes on to present volatility forecasting with both univariate and multivariate methods, discussing the various methods used by industry, with a special focus on the GARCH family of models. The evaluation of the quality of forecasts is discussed in detail.
Next, the main concepts in risk and models to forecast risk are discussed, especially volatility, value-at-risk and expected shortfall. The focus is both on risk in basic assets such as stocks and foreign exchange, but also calculations of risk in bonds and options, with analytical methods such as delta-normal VaR and duration-normal VaR and Monte Carlo simulation.
The book then moves on to the evaluation of risk models with methods like backtesting, followed by a discussion on stress testing.
The book concludes by focussing on the forecasting of risk in very large and uncommon events with extreme value theory and considering the underlying assumptions behind almost every risk model in practical use — that risk is exogenous — and what happens when those assumptions are violated.
Every method presented brings together theoretical discussion and derivation of key equations and a discussion of issues in practical implementation. Each method is implemented in Python, Julia, Matlab and R, the four most commonly used mathematical programming languages for risk forecasting with which the reader can implement the models illustrated in the book. The code can be downloaded from the code webpage.
The book includes four appendices. The first introduces basic concepts in statistics and financial time series referred to throughout the book. The second and third introduce R and Matlab, providing a discussion of the basic implementation of the software packages. And the final looks at the concept of maximum likelihood, especially issues in implementation and testing.
The book website further provides eleven weekly seminar sessions used by Jon Danielsson in his lectures, with over 100 questions and complete solutions for self-study.
Finally, the website provides a detailed notebook outlining the various issues that arise in implementing market risk forecasts in practice. The notebook currently is based on R, with other languages being planned.