# Portfolio Optimization using Parametric Portfolio Policy Method in MATLAB

I want to contruct an optimized stock portfolio with the restriction of a zero-investment strategy. The portfolio weight in each stock needs to be modeled as a function of state variables (factors that have an effect on stock performance). This method for portfolio optimization is colled "parametric portfolio policy" and developed by Brandt et al (2009),so I need to find the weight for each stock in the optimized portfolio and maximize the investor’s expected utility, like following;

Here is the expression of the weight of the stock i w (i,t):

Tetais a vector of coefficients of state variables and x presents the state variables.

So, the optimization problem becomes;

How to program the problem using Matlab? I am not good in modeling and optimization..I would be grateful for any help

Find below a link for a dummy implementation in excel using VBA, which I did couple of years ago. http://www.speedyshare.com/xJZJ8/PPPs-Copy.xlsm

On this implementation I am allocating between Dax returns and a German bond using as state variables the dividend yield, the inflation and the ECB interest rate.

The implementation is out of sample, and simply uses the solver algorithm to maximize the utility. In matlab you can do exactly the same using the function fminsearch or something similar.

However, if you are looking to replicate the paper, you should do the analysis in sample and use GMM to maximize equation (11) using equation (12) as the optimal weighting matrix. There are several resources online on how to implement GMM on matlab. Hope this helps.

• Thank you so much @volcompt for your answer! many many thanks.. I will try to undrestand the empirical methodology. Commented Mar 9, 2016 at 8:24
• I have one request if you don't mind..Could you please send me your mail to contact you if I face any difficulty ? Commented Mar 9, 2016 at 8:37
• Sorry, but not. I don't share my email contact for the world to see. Commented Mar 9, 2016 at 8:57
• Ok .. many thanks again for your help @volcompt .. I really appreciate it.. I am checking the file.. please tell me why did you put lambda equal to 4? Commented Mar 9, 2016 at 9:01
• That's the risk aversion. On the paper Brand, Santa-Clara and Valkanov use 5 as the benchmark case. Commented Mar 9, 2016 at 9:20