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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

182 ACTA WASAENSIAA4Matlab code for Dickey-Fuller test including a constant1 function [rho,taustat,pctile_c,tests] = df1976c(y)2 % DF1976C Dickey Fuller test including a constant3 %---------------------------------------------------------------4 % USAGE: [RHO,TAUSTAT,PCTILE_C,TESTS] = DF1976C(Y)5 % performs TESTS=LENGTH(Y)/500 Dickey Fuller tests including6 % a constant upon 500 observations of the time series Y7 % using the critical values from Fuller (1976).8 % The length of Y must be an integer multiple of 500.9 % NOTE: It’s also possible to use noninteger multiples of 50010 % by corresponding modification of the first line of11 % executable code: nobs = (new # observations in each test),12 % but the critical values for 500 observations will still13 % be used, which differ only in the last digit from inf. obs.14 %---------------------------------------------------------------15 % OUTPUT:16 % RHO is a ((LENGTH(Y)/500)*1) vector of estimated values17 % for rho in the regression y_t = c + rho*y_{t-1} + e_t.18 % TAUSTAT is a ((LENGTH(Y)/500)*1) vector of DF-statistics.19 % PCTILE_C is a structure containing the number of tests20 % resulting in the following percentile of the asymptotic21 % distribution of RHO under the null hypothesis rho = 122 % using the second panel of table 8.5.2 in Fuller (1976)23 % PCTILE_C.LT025: P(RHO) < 0.02524 % PCTILE_C.LT05: 0.025

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

Saved successfully!

Ooh no, something went wrong!