Autocorr

In: Business and Management

Submitted By sasa
Words 879
Pages 4
Calculating Sample Autocorrelations in Excel ˆ A sample autocorrelation is defined as ρ k ≡ ˆ γˆ k cov( Rit , Ri ,t − k ) = . ˆ γˆ 0 var( Rit )

In Excel, the tricky part in calculating sample autocorrelations is calculating the sample covariance term. Suppose you have data as follows: A R_it 0.03 0.02 0.05 -0.01 0.01 0.03 0.05 0.04 -0.02 B R_jt 0.02 0.05 -0.01 -0.01 0.02 0.5 -0.2 0.2 0.1

1 2 3 4 5 6 7 8 9 10

Calculating the variance for series R_it is straightforward: =var(A2:A10)

Calculating the k-th lag covariance for series R_it is similar. Consider the k=1 case. =covar(A3:A10,A2:A9) Now, consider the k=2 case =covar(A4:A10,A2:A8) The pattern should be clear. γˆ ij ,k γˆ i ,0γˆ j , 0 ˆ cov( Rit , R j ,t − k ) ˆ ˆ var( Rit ) ⋅ var( R jt )

ˆ A sample cross correlation is defined as ρ ij ,k ≡

=

.

Calculating the sample variances is straightforward. Calculating the sample covariances is done as follows.

For k=1, =covar(A3:A10,B2:B9) For k=2, =covar(A4:A10,B2:B8) The pattern should again be clear. ˆ ˆ Note, however, that ρ ij ,k ≠ ρ ji ,k . For γˆ ji, k , the sample covariances are calculated as follows. For k=1, =covar(B3:B10,A2:A9) For k=2, =covar(B4:B10,A2:A8) Useful Q+A: Q. I'm confused on question #1. I understand that I need to do a chow test on the excess return model but do I set up two separate regressions (one before and one after the break point) or do I use delta? Also if I use delta, how do I get excel to compute a regression with two variables? Additionally, which data do I use on excel to calculate the RSS (sum of residuals squared?)? A. You can either set up two separate regressions or use a dummy variable. The Fstatistic will be exactly the same in both cases. If you use the dummy variable approach, you will have three right hand side variables (r_mt-rf, D_t, and D_t*(r_mt-rf)). To compute a regression with multiple right…...

Similar Documents

Finance Notes

..." # i ˇi h Var.ei / 0 D (2.7) ˇi ˇj Var .Rm / C ˇj 0 Var.ej / More generally, with n assets we can define ˇ to be an n 1 vector of all the betas and ˙ to be an n n matrix with the variances of the residuals along the diagonal. We can then write the covariance matrix of the n 1 vector of the returns as Cov.R/ D ˇˇ 0 Var .Rm / C ˙: (2.8) See Figure 2.4 for an example based on the Fama-French portfolios detailed in Table 2.2. Remark 2.2 (Fama-French portfolios) The portfolios in Table 2.2 are calculated by an34 HiTec constant 0:14 . 0:90/ market return 1:28 .32:40/ R2 0:75 obs 492:00 Autocorr (t) 0:75 White 6:77 All slopes 367:19 Utils 0:22 .1:39/ 0:53 .12:59/ 0:35 492:00 0:85 19:95 172:22 Table 2.1: CAPM regressions, monthly returns, %, US data 1970:1-2010:12. Numbers in parentheses are t-stats. Autocorr is a N(0,1) test statistic (autocorrelation); White is a chi-square test statistic (heteroskedasticity), df = K(K+1)/2 - 1; All slopes is a chi-square test statistic (of all slope coeffs), df = K-1 nual rebalancing (June/July). The US stock market is divided into 5 5 portfolios as follows. First, split up the stock market into 5 groups based on the book value/market value: put the lowest 20% in the first group, the next 20% in the second group etc. Second, split up the stock market into 5 groups based on size: put the smallest 20% in the first group etc. Then, form portfolios based on the intersections of these......

Words: 69445 - Pages: 278

Tonality Estimation Using Wavelet Packet Analysis

...gNodes]=ACFALG(rcfs,count,gNodes,tn); end 5) Tonality Estimation % Vaibhav Chhabra % Thesis - Tonality Estimator Fucntion % Last Modified: 04/12/2005 % % This program get the reconstructed nodes and analyzes them based on the % auto-covariance peaks function [diff,count,gNodes] = ACFALG(rcfs,count,gNodes,tn) global frame_count frames diff f check_flag=0; 111 check=isempty(rcfs); if (check==1) & (check_flag==0) container_diff_sl_rcfs10(frame_count,1) = 0; container_diff_sl_rcfs10(frame_count,2) = 0; diff(frame_count,:)=container_diff_sl_rcfs10(frame_count,:)*1000; disp('rcfs is empty') check_flag=1; end if (check==0) & (check_flag==0) % Calculate Autocorrelation Function ACFrcfs=zeros(count,21); for acf_count=1:count ACFrcfs(acf_count,:) = autocorr(rcfs(acf_count,:)); end % Calculate Autocovariance varACF=zeros(count,41); for var_count=1:count varACF(var_count,:) = xcov(ACFrcfs(var_count,:)); end % Uncomment this if you want to plot the auto-covariance of the ACF % for p=1:count % % if p==1 % plot(varACF(p,:));hold on % end % % if p==2 % plot(varACF(p,:),'g') % end % % if p==3 % plot(varACF(p,:),'r') % end % % if p==4 % plot(varACF(p,:),'y') % end % % if p==5 % plot(varACF(p,:),'c') % end % % if p==6 % plot(varACF(p,:),'*k') % end % % if p==7 % plot(varACF(p,:),'om') % end % end % hold off;title('AutoCovariance of ACF');xlabel('0-21 lags of ACF');ylabel('AC') 112 % legend=sprintf('Legend: blue-rcfs10, green-rcfs20, red-rcfs30, yellow-rcfs40, cyan-rcfs50,......

Words: 17208 - Pages: 69

Trangtrang

...*** *** *** *** *** * * ** ** STDERROR 6.5784 0.0007339 0.0006821 0.0455 0.2456 0.3272 0.1049 0.0510 0.1337 29 T STAT 7.241 6.512 - 5.943 6.045 - 4.322 - 1.740 - 1.976 2.479 2.106 Ramu Ramanathan Biên dịch: Thục Đoan Hiệu đính: Cao Hào Thi Chương trình Giảng dạy Kinh tế Fulbright Các phương pháp định lượng Bài đọc Nhập môn kinh tế lượng với các ứng dụng – 5th ed. Ch.7: Biến độc lập định tính (hoặc Biến giả) 8) URB 9) WH Mean of dep. var Error Sum of Sq (ESS) Unadjusted R – squared F – statistic (10, 89) Durbin – Watson stat. - 0.0785 - 0.1115 53.869 427.5756 0.858 53.8705 1.983 0.0206 - 3.805 0.0242 - 4.599 S. D. of dep. variable Std Err of Resid. (sqmahat) Adjusted R– squared p -value for F ( ) First-order autocorr. coeff 0.000260 *** 0.000014 *** 5.519 2.1919 0.842 0.000000 0.007 MODEL SELECTION STATISTICS SGMASQ 4.80422 AIC HQ 5.98311 SCHWARZ GCV 5.398 RICE 5.32792 7.09599 5.48174 FPE SHIBATA 5.33268 5.21642 Mối quan hệ đối với năm 1990 thu được bằng cách cho D90 bằng 1 và kết hợp các số hạng cho các biến giống nhau. Chẳng hạn như, nếu D90 = 1, số hạng cho biến YF cần được kết hợp với số hạng cho D90 x YF. Do đó, mối quan hệ được ước lượng đối với năm1990 là WLFP = 47,637 + 0,00073 YF + 0,275 EDUC – 1,630 UE – 0,081 MR + 0,282 DR – 0,078 URB – 0,111 WH Mô hình sau cùng giải thích được 84,2 phần trăm của sự biến đổi trong WLFP, điều này tương xứng với dữ liệu chéo. Các tác động của biến EDUC, DR, URB, và WH đã mang các dấu......

Words: 17949 - Pages: 72

Ekonometria Klase Praktikoak

...urtarrilatik eta 1999 urteko ekainerarteko hilabeteroko datuak datuak eskuragarri izanik, adituak eredu bat KTAn bidez estimatu du ondorengo emaitzak lortuz: Modelo 1: estimaciones MCO utilizando las 30 observaciones 1997:01–1999:06 Variable dependiente: SALMENTAK Variable Coeficiente Desv. t´ ıpica Estad´ ıstico t const 35,4796 14,4554 2,4544 P -9,7393 3,75967 -2,5905 PO 2,94274 1,72602 1,7049 PG -0,866389 0,745161 -1,1627 EHI 0,316146 0,0295461 10,7001 valor p 0,0214 0,0158 0,1006 0,2559 0,0000 Media de la var. dependiente 10,0360 D.T. de la variable dependiente 3,21442 Suma de cuadrados de los residuos 47,8175 Desviaci´n t´ o ıpica de los residuos (ˆ ) σ 1,38300 2 R 0,840418 F (4, 25) 32,9149 Estad´ ıstico de Durbin–Watson 0,436375 Coef. de autocorr. de primer orden. 0,762991 Log-verosimilitud -49,561 Criterio de informaci´n de Akaike o 109,122 Criterio de informaci´n Bayesiano de Schwarz 116,128 o Criterio de Hannan–Quinn 111,363 22 Matriz de covarianzas de los coeficientes const 208, 958 P −51, 435 14, 1351 Ekonometriarako Sarrera PO PG EHI 6, 60644 −6, 5692 −0, 0312705 −3, 3056 1, 79806 0, 00609227 2, 97914 −0, 937614 0, 00149150 0, 555265 −0, 00169008 0, 000872971 const P PO PG EHI 12.1 Erantzun itzazu honako galderei: a) Idatz ezazu adituak proposaturiko errgresio lineal orokorreko eredua. b) Idatz ezazu lagin erregresio funtzioa. c) Interpreta itzazu PG (publizitate gastua) eta EHI aldagaiei laguntzen dizkien koefiziente estimatuak. Estimatutako......

Words: 17623 - Pages: 71

Securitization

...involvement is constant over time. For that reason, OLS, which relies on comparing levels, has standard errors that are very sensitive to the bootstrap method as soon as gamma is not close to one. In comparison, FE relies on comparing yearly deviations of PE involvement and roa from their structural firm-level mean. Therefore, FE standard errors would be sensitive to the bootstrap method only if deviations in one year predicted deviations in another year within the same firm, for example if PE involvement or performance displayed some mean reversion behavior. This turns out not to be the case in our DGP regardless of the level of gamma, which is why the s.e. results never are sensitive to the method in the FE case.Firm fixed takes away AutoCorr in time. Using results from your simulations, determine which kinds of estimation are causal among the six you ran, and then rank these causal estimates according to their statistical power when using the most conservative standard error estimate (i.e. the one giving the higher s.e.). Give the econometric intuitions underlying this two-dimensional ranking. The only causal estimates are those close to 0.04, since this is what we have assumed in the formula for roa in the DGP. In this respect, all estimates are causal here, except OLS in the case when theta is positive. The reason is that when theta is positive, this means that a structural characteristic of firms influences positively their performance and their tendency to have PE......

Words: 11881 - Pages: 48

Econometrics Book Description

...that ρ = 0 and you are done. The test statistic is NR2 from this regression which will have a χ2 if H0 : is true. The script to accomplish 1 this is: 1 2 3 ols ehat const d_u ehat(-1) scalar TR2 = $trsq pvalue X 1 TR2 Estimating the statistic in this way causes the first observation to be dropped (since e0 is not ˆ observed. The result for the phillips aus data reveal Chi-square(1): area to the right of 27.6088 = 1.48501e-007 (to the left: 1) The no autocorrelation null hypothesis is clearly rejected at any reasonable level of significance. 209 Gretl also includes a model test function that does the same thing. To use it, estimate the model of interest and then use modtest 1 --autocorr as shown here: 1 2 ols inf const d_u --quiet modtest 1 --autocorr The print out from the modtest is fairly extensive as shown here: Breusch-Godfrey test for first-order autocorrelation OLS, using observations 1987:2-2009:3 (T = 90) Dependent variable: uhat coefficient std. error t-ratio p-value --------------------------------------------------------const -0.00216310 0.0551288 -0.03924 0.9688 d_u -0.151494 0.193671 -0.7822 0.4362 uhat_1 0.558784 0.0900967 6.202 1.82e-08 *** Unadjusted R-squared = 0.306582 Test statistic: LMF = 38.465381, with p-value = P(F(1,87) > 38.4654) = 1.82e-008 Alternative statistic: TR^2 = 27.592347, with p-value = P(Chi-square(1) > 27.5923) = 1.5e-007 Ljung-Box Q’ = 28.0056, with p-value =......

Words: 73046 - Pages: 293