Application Center - Maplesoft

App Preview:

Portfolio Simulation and Quadratic Programming

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




 

 

Portfolio Simulation and Quadratic Programming

The following was implemented in Maple by Marcus Davidsson (2010)

 davidsson_marcus@hotmail.com and is based upon Solving Optimization Problems in Maple 9.5

http://www.maplesoft.com/applications/view.aspx?SID=4593

 

 

We start by reviewing some matrix algebra in order to understand the notation later on.  

(1)

We can now simulate some cross correlated stocks with stochastic changes in
expected return as follows:

 

We can now use quadratic optimization to find the optimal long/short weights that
maximize our risk adjusted expected portfolio returns. The objective function and
the corresponding constraints are given by:



   

where W is a column vector containing the portfolio weights, T is the transpose notation
ie convert a column vector to a row vector, ER is a column vector with expected
returns, Q is the covariance matrix and S is a column vector of 1's.

Note that  is the expected portfolio return and  is the portfolio variance.

The benchmark will be an simple equal weighted portfolio.