Residuals from regression in style analysis

6 Ansichten (letzte 30 Tage)
Davide Martintoni
Davide Martintoni am 11 Nov. 2020
Bearbeitet: Davide Martintoni am 31 Jan. 2021
Hi,
I have the following the code. To check I have confronted the "res" that appread in the command window with the ones stored in "matrice residui" in the workspace. The last columns from "matrice_residui" seems to be identical to the last column of res, but not the first one. Any clue why this could be?
Thank you in advance.
%creo variabili per mettere i risultati della rolling
matrice_rolling=[1:4];
matrice_residui = [1:36];
matrice_residui = transpose(matrice_residui);
%stile analysis rolling di 36 mesi
for i=1:426
%andando da 1 a 35+1, va da 1 a 36, che sono 36 periodi
y = American_Fund_return_lungo(i:35+i,:);
X = regressori (i:35+i,:);
[rolling,a,res]=lsqlin(X,y,G,g,j,1);
res
rolling=rolling';
matrice_rolling=[matrice_rolling;rolling];
matrice_residui=[matrice_residui,res];
end

Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by