Bocconi Home


Teaching > Teaching materials

MAFINRISK 2018: Asset Allocation and Risk Measurement with Factor Models in R

Topics in Financial Econometrics with R Part 2



Carlo Favero ( 

  1. Objective of the Course
  2. Detailed Syllabus

exam1104, exam.rnwfactormodels.R

 1. Objective of the Course

This part of the course is aimed at discussing Asset Allocation and Risk Measurement with Factor Models. 

The course, for a total of  8 hours, is structured on 2 parts, there is no explicit separation between theoretical and experiential learning and all models be discussed via hands-on applications in R 

2. Textbooks and other support materials

Software requirements:
R v. 3.3.2 or higher installed (
RStudio v. 1.0.136 or higher installed (
MiKTeX, FULL version: Through the link below, download and extract ProTeXt, run Setup.exe and install MiKTeX full version: (
MiKteX, BASIC version (only if full version cannot be installed): Install basic version, open MiKTeX Package Manager, Repository, Synchronize.
R packages: - ( brew, data.table, dplyr, forecast, ggplot2, gtable, knitr, lazyeval, plyr, quadprog, readr, reshape, reshape2, RODBC, scales, sos, timeDate, tseries, XLConnect, xlsx, xtable, zoo, TTR.

Basic readings:
CHRISTOFFERSEN P.F. (2012) "Elements of Financial Risk Management", 2nd edition,Academic Press
SINGH AK and  ALLEN(2017) R in Finance and Economics. A Beginners Guide, World Scientific Publishing
ZIVOT and WANG(2006) Modelling Financial Time-Series with S-Plus, Springer 

The Econometrics of Financial Returns and Risk Measurement , available at )

Detailed Syllabus

1. Asset Allocation with Factor Models (Lectures 1-2)
The Econometrics of Financial Returns
The Econometric Modelling Process
The Traditional Approach:CER 
A Static Asset Allocation Problem with CER 
Factor Models and Asset Allocation with Factor Models
Applications: The single Factor Model, Industry Factors Models

An R Code on Factor Modelling by E.Zivot 
SLIDES to Illustrate the R Code 

2. Risk Measurement with Heteroscedasticity and Factor Models  (Lectures 3-4)

VaR with Factors,
The Evidence from High-Frequency Data
GARCH models:analysis, estimation and simulation
From GARCH to VaR
VaR with Factors and GARCH

An R Code on Risk MeasurementDATA for the R CODE




Last update 13/05/2019

In this section