I have daily returns of 10 stocks. I need to construct an equally weighted portfolio that goes long in the 3 highest returns and short in the 3 lowest returns. The portfolio needs to be re-balanced every month. How to tell Matlab about this constraint? I started like following:
1) data=load('mydata'); #loading my data that contains 10 stock market returns
2) port=Portfolio(); # create the portfolio
3) port=port.estimateAssetMoments(R);# calculate the average return for each index
4) I ignore the command that tell Matlab to be short in the 3 lowest returns and long in the 3 long returns. I just find the default command : port=port.setDefaultConstraints();
I can't use it because it doesn't allow short positions... Could you please help me?
Thanks in advance!