The purpose of this repo is to implement and compare several different financial optimization models. Portfolios will be generated using these models and these portfolios will be tested out-of-sample.
- Mean-Variance Optimization (MVO)
- Robust Mean-Variance Optimization (ellipsoidal uncertainty set)
- Risk Parity Optimization (no short selling)
- Market Portfolio
Investment universe consists of 20 stocks (n=20) all of which are constituents of the S&P 500. The stock symbols are
F (Ford Motor Co.);CAT (Catepillar Inc.);DIS;MCD;KO; PEP;WMT;C; WFC; JPM ,AAPL; IBM; PFE; JNJ;XOM;MRO;ED; T; V Z; and NEM.
pandas
numpy
matplotlib
pandas_datareader
datetime
- Automatically collect stock price and risk free rate from
Yahoo Finance
- Compute risk aversion
lambda
, estimated stock expected return (save asmu.csv
), covariance (save asQ.csv
) & realized return at Oct 2008 (save asoct_asset_return.csv
) - Generate Market Portfolio
- Import
mu.csv
,Q.csv
,oct_asset_return.csv
- Generate MVO, Robust MVO & Risk Parity Optimization portfolios
- Compute portfolio return, variance, volatilitie & sharpe ratio using portfolio weights generated in step 2
- Plot MVO and Robust MVO efficient frontiers without & with short sale
- Add more explanations