CH
CharaZhu/Portfolio-Optimization
Implementation of financial optimization models and efficient frontiers
Portfolio Optimization
Implementation of financial optimization models and efficient frontiers
TABLE OF CONTENTS
Background
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
Data
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.
Requirement
pandas
numpy
matplotlib
pandas_datareader
datetime
Get Started !
Running order
1. Computational Project (Python).ipynb
- 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
2. MVO.m, robust.m & risk_parity.m
- Import
mu.csv,Q.csv,oct_asset_return.csv - Generate MVO, Robust MVO & Risk Parity Optimization portfolios
3. Computational Project (Python).ipynb
- Compute portfolio return, variance, volatilitie & sharpe ratio using portfolio weights generated in step 2
4. EF_no_short.m & EF_with_short.m
- Plot MVO and Robust MVO efficient frontiers without & with short sale
Limitations and Future Improvements
- Add more explanations
On this page
Languages
Jupyter Notebook97.3%MATLAB2.7%
Contributors
MIT License
Created June 30, 2021
Updated June 30, 2021