03-20-2014 07:19 AM
The data set is as below:
Basically I have expected returns, stdev and correlation of two stocks A & B for 100 years. From these two stocks, I have to construct a portfolio with min variance for each year=> 100 optimal portfolios. =>Then I have to print out the optimization results for all 100 optimizations in one table.
Could you please give my some suggestions/ comments?
Here is my attempt:
%do i=1 %to &100 by 1;
R%i=(1 Corr%i, Corr%i 1);
S%i = D%i*R%i*D%i; /** covariance matrix **/
W%i=( Bweight%i, 1-Aweight%i);
var Aweight%i>=0, 1-Aweight%i>=0;
min f= Transw%i*S%i*W%i /**find min of portfolio variance**/
solve with qp;
Thanks a bunch!!!!
09-08-2015 12:02 PM
Questions about PROC OPTMODEL in SAS/OR are better suited for the Mathematical Optimization and Operations Research Community. If you still need help, please post there.