Skip to content

Implementation of financial optimization models and efficient frontiers

License

Notifications You must be signed in to change notification settings

CharaZhu/Portfolio-Optimization

Repository files navigation

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.

  1. Mean-Variance Optimization (MVO)
  2. Robust Mean-Variance Optimization (ellipsoidal uncertainty set)
  3. Risk Parity Optimization (no short selling)
  4. 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 as mu.csv), covariance (save as Q.csv) & realized return at Oct 2008 (save as oct_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

About

Implementation of financial optimization models and efficient frontiers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published