Forthcoming in “Numerical Methods and Optimization in Finance (2nd ed),” by M. Gilli, D. Maringer and E. Schumann
89 Pages Posted: 17 May 2019 Last revised: 25 Jul 2019
Date Written: December 31, 2018
We discuss the backtesting of investment and trading strategies. We start with the challenges and pitfalls: overfitting, data preparation, and the effects of randomness. Then, we introduce and describe R software for backtesting. We demonstrate how to use the software for univariate and multivariate strategies (i.e. portfolio strategies) for two equity data sets. Specifically, we discuss the implementation and testing of momentum and portfolio optimization models. Throughout, we stress the analysis of sensitivity and robustness checks. Since such analyses require to run many backtests, we also discuss how backtests can be run in parallel.
Keywords: backtesting, portfolio optimization, trading, R, momentum, NMOF
Suggested Citation: Suggested Citation