13.07.2015 Views

BERND PAPE Asset Allocation, Multivariate Position Based Trading ...

BERND PAPE Asset Allocation, Multivariate Position Based Trading ...

BERND PAPE Asset Allocation, Multivariate Position Based Trading ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

186 ACTA WASAENSIA4344 nobs = 500; %Fuller has only 25,50,100,250,500,inf observations4546 % Check whether length of Y is integer multiple of NOBS4748 if mod(length(y),nobs)49 error(’The length of Y must be an integer multiple of 500.’)50 end515253 % Initialize output variables5455 tests = length(y)/nobs; %number of tests to be performed56 rho = zeros(tests,1); %(tests*1) estimated AR(1) coefficients57 taustat = zeros(tests,1); %(tests*1) t-statistics of rho585960 % Start loop over number of DF tests to be performed6162 for test = 1:tests6364 % Generate input for regression65 if test == 1 % NOBS-1 observations in first test66 x = y(1:nobs-1); %((nobs-1)*1) lagged time series67 dy = y(2:nobs)-x; %((nobs-1)*1) change in time series68 else % NOBS observations otherwise69 x = y((test-1)*nobs : test*nobs-1); %lagged ts70 dy = y((test-1)*nobs+1 : test*nobs)-x; %change in ts71 end7273 % Perform regression of change in ts upon lagged ts74 regression = ols(dy,x); %perform regression75 rho(test) = regression.beta + 1; %estimated AR(1) coeff.76 taustat(test) = regression.tstat; %t-statistics of y_{t-1}777879 end %end of loop over number of DF tests to be performed808182 % (TESTS*1) indicator vectors for percentile distribution83 % without constant from first panel in Table 8.5.2 (p.373)8485 ltnc025 = (taustat < -2.23); %logical(1) if pval < 0.02586 ltnc05 = (taustat < -1.95); %logical(1) if pval < 0.0587 ltnc95 = (taustat

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!