The R materials are available from our public GitHub repository. To see what is available, follow the chapter links below. For each chapter a README is displayed which summarizes the available R scripts. You can download individual files by following the links to the raw versions. You can also download the complete GitHub repository as a zip file.
R scripts by chapter
- Chapter 1: An Introduction to R Programming
- Chapter 2: Basic Concepts in Risk Management
- Chapter 3: Empirical Properties of Financial Data
- Chapter 4: Financial Time Series
- Chapter 5: Extreme Value Theory
- Chapter 6: Multivariate Models
- Chapter 7: Copulas and Dependence
- Chapter 8: Aggregate Risk
- Chapter 9: Market Risk
- Chapter 10: Credit Risk
- Chapter 11: Portfolio Credit Risk Management
- Chapter 12: Portfolio Credit Derivatives
- Chapter 13: Operational Risk and Insurance Analytics
- Chapter 14: Multivariate Time Series
How to use the R scripts
- You will need to have R installed on your computer (see below).
- Some scripts require additional R packages. This will typically be indicated in the first few lines of the script by a
library(qrmtools). Most of the packages we use are available on CRAN (including qrmtools and qrmdata).
- To install a package from CRAN a command like
install.packages("qrmtools")from inside R will generally work.
- The packages (and R scripts presented here) are under constant development. It might thus be (and, in failure, it most likely is) required to install the latest version of qrmtools from R-Forge (development server). To this end, a command like
install.packages("qrmtools", repos = "http://R-Forge.R-project.org")from inside R will generally work. Should there be any problem during the installation, download the source code from this directory and compile. Type
?install.packagesat the R command line for more information.
- Links to some of the R packages we use may be found on this page.
Getting started with R
To download R and find documentation and FAQs, please visit The R Project for Statistical Computing.
RStudio provides a free open-source IDE, which also serves as a convenient GUI for users,
R is available as Free Software under the terms of the Free Software Foundation's GNU General Public License in source code form. It compiles and runs on Windows, MacOS and a wide variety of UNIX platforms.