In the manual, it reads "In portfolio strategies, parameters are optimized for all assets separately. This means when a loop is used, all optimize calls must be inside that loop. If this is not desired, but different assets must still be used, enumerate them in a simple for loop, f.i. for(i=0; Name=Assets[i]; i++) { .... "

I am using MVO script with an assetList of 30 stocks and there is loop() in the script. The problem is, loop() is called in the script to calculate the Return, then, outside the loop, the covariance is calculated and requires the LookBack for all the assets to be the same. So how can I use optimize() to find out the optimal LookBack in this case?

Thank you

Jeff

Last edited by Jeff1228; 06/29/17 04:05.