Course Syllabus

MAFS6010R - Portfolio Optimization with R

MSc in Financial Mathematics

Fall 2019-20, HKUST


Modern portfolio theory started with Harry Markowitz’s 1952 seminal paper “Portfolio Selection,” for which he would later receive the Nobel prize in 1990. He put forth the idea that risk-adverse investors should optimize their portfolio based on a combination of two objectives: expected return and risk. Until today, that idea has remained central in portfolio optimization. However, the vanilla Markowitz portfolio formulation does not seem to behave as expected in practice and most practitioners tend to avoid it.

During the past half century, researchers and practitioners have reconsidered the Markowitz portfolio formulation and have proposed countless of improvements and variations, namely, robust optimization methods, alternative measures of risk (e.g., CVaR or ES), regularization via sparsity, improved estimators of the covariance matrix via random matrix theory, robust estimators for heavy tails, factor models, mean models, volatility clustering models, risk-parity formulations, etc.

This course will explore the Markowitz portfolio optimization in its many variations and extensions, with special emphasis on R programming. Each week will be devoted to a specific topic, during which the theory will be first presented, followed by an exposition of a practical implementation based on R programming.


  • Yiyong Feng and Daniel P. Palomar, A Signal Processing Perspective on Financial Engineering. Foundations and Trends® in Signal Processing, Now Publishers, 2016. []
  • Boyd and L. Vandenberghe, Convex Optimization, Cambridge University Press, 2004.[]
  • G. Cornuejols and R. Tutuncu, Optimization Methods in Finance. Cambridge Univ. Press, 2007.
  • F. J. Fabozzi, P. N. Kolm, D. A. Pachamanova, and S. M. Focardi, Robust Portfolio Optimization and Management. Wiley, 2007.


Good knowledge of linear algebra and some programming knowledge in R (or similar). Willingness to spend countless of hours programming in R.


Homework: 30%
Weekly portfolio game (in R):   40%
Final lightening presentation: 30% 

Course Schedule

Date Week Lect Topic
3-Sep 1 1 Theory: Introduction to Convex Optimization
2 Practice: Primer on R for Finance
10-Sep 2 3 Theory: Convex Optimization Problems
4 Practice: Solvers in R
17-Sep 3 5 Portfolio Optimization
24-Sep 4 7 Data Cleaning
5 9 Theory: Factor models for asset returns
10 Practice: Factor models with R
6 11 Theory: Prior information: Shrinkage and Black-Litterman
12 Practice: Prior information: Shrinkage and Black-Litterman with R
7 13 Theory: Regularized robust estimators under heavy tails and outliers
14 Practice: Heavy-tailed estimators with R
8 15 Theory: Time series modeling of financial data
16 Practice: Time series modeling of financial data with R
9 17 Theory: Robust portfolio optimization
18 Practice: Robust portfolio optimization with R
10 19 Theory: Portfolio optimization with alternative risk measures
20 Practice: Portfolio optimization with alternative risk measures with R
11 21 Risk Parity Portfolio
12 23 Theory: Sparse index tracking via majorization-minimization (MM)
24 Practice: Sparse index tracking with R
13 25 Project presentations by students

Lecture Information

Lecture Time: Tue 19:30 – 22:20

Lecture Venue: TBD

Teaching Team

Course Instructor: Prof. Daniel P. PALOMAR (

Email:    Office: 2398 (Lifts 17/18)

Office hour : By email appointment

TAs: Rui ZHOU ( and Sandeep KUMAR (

Course Summary:

Date Details