I created the loop but it returns a mistake for which I can't find a solution.
MSCI = BB(1:363,4);BOND = BB(1:363,5);c = 12;path = (1:c:(length(MSCI)));for i = path MSCI1(31) = mean(MSCI(i:i+(c-1))); Bond1(31) = mean(BOND(i:i+(c-1)));end
What is wrong in this code? Thank you very much in advance
Best Answer