The goal of this project is to solve an asset allocation problem for a portfolio composed of bond ETFs. The script minimizes the risk, expressed in terms of the Mean Absolute Deviation of change in daily prices, given a minimum level of dividends and portfolio duration.
The optimal solution is to invest 31.14% in VAB, 18.63% in XHY, and 50.22% in CSD, if a minimum yield of 4% and a minimum duration of 4.5 years are required by the investor.
The program minimizes the following objective function :
Where
- T : Array of days
- I : Array of ETFs
- Rti : Daily price variation at t
- pi : Proportion of index i in portfolio
- Mi : Mean of portfolio price variation (wrt pi)
- N : Number of days
Where
- LR : Minimum duration and yield requirements
ILOG CPLEX Optimization Studio was used to model and solve the problem.
You can use the files in this repo as a template for your own portfolio. All that is needed is to adjust the information in the data file to your own. You may also need to adjust the variable names in the model file, depending on the assets you wish to include in your portfolio.
Special thanks to Sylvain Perron, PhD. from HEC Montréal.