# Supervised learning for factor investing

This page contains teaching material (**R** code) for **introductory** courses on supervised learning applied to factor investing.

## Sessions

The links below lead to **html** notebooks and **pdf** slides. The original **Rmd** files can be downloaded hereafter.

**Economic foundations**: asset pricing anomalies, characteristics-based investing;

**html notebook** - **slides**

**Portfolio strategies**: portfolio back-testing framework;

**html notebook** - **slides**

**Penalized regressions & sparse portfolios**: penalised regressions for minimumn variance portfolios and for robust forecasts;

**html notebook** - **slides**

**Data preparation**: Feature engineering and labelling with a focus on categorical data;

**html notebook** - **slides**

**Decision trees**: Simple trees, random forests and boosted trees;

**html notebook** - **slides**

**Neural networks**: Multilayer perceptron and recurrent networks (**G**ated **R**ecurrent **U**nits);

**html notebook** - **slides**

**Validating & tuning**: Performance metrics and hyper-parameter adjustment;

**html notebook** - **slides**

**Extensions**: SVMs, ensemble learning, interpretability and deflated Sharpe ratios;

**html notebook** - **slides**

## Material

Datasets (in R format - they end in February 2021):

**Base** (small): 30 firms, 7 features, year 2000 onwards;

**Large**: 900+ firms, 5 features, year 1995 onwards;

**ESG**: 380+ firms, 6 features, year 2014 onwards.

**DISCLAIMER**: the **data** and **code** are meant for pedagogical use only.