Hello
I am working on a number of price series (daily returns) and need to calculate the 90 day standard deviations and correlation with another price series. I have written this code with a for loop to calculate the standard deviation
window = 90;T = size(Aseries,1);condstdAseries = zeros(T-window+1,1);for t = 1:1:T-window+1; condstdAseries(t,1) = std(Aseries(t:t+window-1,1));enddatecondste = ddatenumbers(window:end);
But have not managed to work out a similar solution, guess it should be a matter only to add another line of code to solve it but no success so far.
Any suggestion?
Best Answer