Premium Essay

Autocorr

In:

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

Premium Essay

Securitization

...ASS4Part1contd 'Storing the firm fixed-effects estimator in the simulated sample HoldbetasimFE(sim) = Application.WorksheetFunction.Index(Application.WorksheetFunction.LinEst(wfroa, wfPE), 1, 1) 'Block bootstrap loop for the FE estimator For j = 1 To b For g = 1 To s r = Int(Rnd * s) + 1 'This picks a random firm identifier For m = 1 To Y 'This loop runs over each year present in a given block i = (g - 1) * Y + m 'This creates an identifier i for observation of block g and period m in the bootstrapped sample Holdroa(i) = wfroa((r - 1) * Y + m) HoldPE(i) = wfPE((r - 1) * Y + m) Next m Next g HoldEst(j) = Application.WorksheetFunction.Index(Application.WorksheetFunction.LinEst(Holdroa, HoldPE), 1, 1) Next j 'Generating the acceptance decision for the FE estimator using block bootstrap in the simulated sample HoldacceptblockFE(sim) = 0 If HoldbetasimFE(sim) > 1.96 * Application.WorksheetFunction.StDev(HoldEst) Then HoldacceptblockFE(sim) = 1 'Classic bootstrap loop for the FE estimator For j = 1 To b For i = 1 To obs r = Int(Rnd() * obs) + 1 Holdroa(i) = roa(r) HoldPE(i) = PE(r) Holdfirm(i) = firm(r) Next i 'Computing Deviations of both Holdroa and HoldPE from their within-firm mean For k = 1 To s 'This step creates temporary variables including...

Words: 11881 - Pages: 48

Free Essay

Finance Notes

...Lecture Notes in Finance 1 (MiQE/F, MSc course at UNISG) Paul Söderlind1 14 December 2011 1 University of St. Gallen. Address: s/bf-HSG, Rosenbergstrasse 52, CH-9000 St. Gallen, Switzerland. E-mail: Paul.Soderlind@unisg.ch. Document name: Fin1MiQEFAll.TeX Contents 1 Mean-Variance Frontier 1.1 Portfolio Return: Mean, Variance, and the Effect of Diversification 1.2 Mean-Variance Frontier of Risky Assets . . . . . . . . . . . . . . 1.3 Mean-Variance Frontier of Riskfree and Risky Assets . . . . . . . 1.4 Examples of Portfolio Weights from MV Calculations . . . . . . . . . . . . . . . 4 4 9 19 22 A A Primer in Matrix Algebra 24 B A Primer in Optimization 27 2 . . . . . . . . 31 31 32 37 39 42 45 46 47 3 Risk Measures 3.1 Symmetric Dispersion Measures . . . . . . . . . . . . . . . . . . . . 3.2 Downside Risk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Empirical Return Distributions . . . . . . . . . . . . . . . . . . . . . 54 54 56 67 4 CAPM 4.1 Portfolio Choice with Mean-Variance Utility . . . . . . . . . . . . . . 70 70 Index Models 2.1 The Inputs to a MV Analysis . 2.2 Single-Index Models . . . . . 2.3 Estimating Beta . . . . . . . . 2.4 Multi-Index Models . . . . . . 2.5 Principal Component Analysis 2.6 Estimating Expected Returns . 2.7 Estimation on Subsamples . . 2.8 Robust Estimation . . . . . . . . . . . . . . . .. .. .. . ...

Words: 69445 - Pages: 278

Premium Essay

Econometrics Book Description

...Using gretl for Principles of Econometrics, 4th Edition Version 1.0411 Lee C. Adkins Professor of Economics Oklahoma State University April 7, 2014 1 Visit http://www.LearnEconometrics.com/gretl.html for the latest version of this book. Also, check the errata (page 459) for changes since the last update. License Using gretl for Principles of Econometrics, 4th edition. Copyright c 2011 Lee C. Adkins. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation (see Appendix F for details). i Preface The previous edition of this manual was about using the software package called gretl to do various econometric tasks required in a typical two course undergraduate or masters level econometrics sequence. This version tries to do the same, but several enhancements have been made that will interest those teaching more advanced courses. I have come to appreciate the power and usefulness of gretl’s powerful scripting language, now called hansl. Hansl is powerful enough to do some serious computing, but simple enough for novices to learn. In this version of the book, you will find more information about writing functions and using loops to obtain basic results. The programs have been generalized in many instances so that they could be adapted for other uses if desired. As I learn more about hansl specifically...

Words: 73046 - Pages: 293

Free Essay

Ekonometria Klase Praktikoak

...EKONOMETRIARAKO SARRERA PRAKTIKAZKO KLASEAK EKONOMIA Ekonomia Aplikatua III (Ekonometria eta Estatistika) Saila Universidad del Pa´s Vasco—Euskal Herriko Unibertsitatea ı E48015 BILBAO 2008 Egileak: Pilar Gonz´lez Casimiro a Susan Orbe Mandaluniz Beatriz Goitisolo Lezama Inmaculada Gallastegui Zulaica Bilduma honen erreprodukzioa eta baita bere kopien banaketa baimenik gabe egitea ere, debekaturik dago. Halaber beste eskubide infrakzioak egitea ere. Publikatze eskubide guztiak UPV/EHUko Ekonomia eta Enpresa Zientzia Fakultateko Ekonometria eta Estatistikaren Sailak ditu. c P. Gonz´lez, S. Orbe, B. Goitisolo, I. Gallastegui 2008 a Aurkibidea 1. Ariketak 3 2. Azterketak 25 2.1. Ebaluazio jarraia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.2. Azken azterketak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3. Informatika Laborategia 65 3.1. Proposatutako ariketak . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.2. Gretl-rako Sarrera . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 1 2 1 Ariketak 3 4 Ekonometriarako Sarrera Ariketa 1. Perfume salmenten jokaera analizatu nahi da publizitate gastuaren menpean. Horretarako arlo horretako 5 enpresei dagozkien ondorengo datuak eskuragarri daude: Salmentak (Si ) Publizitate Gastua (P Gi ) 4 7 2 3 3 1 9 5 17 9 Salmentak milioi kaxetan neurtuta daude eta publizitate gastua ordea, milioi eurotan...

Words: 17623 - Pages: 71

Free Essay

Tonality Estimation Using Wavelet Packet Analysis

...UNIVERSITY OF MIAMI TONALITY ESTIMATION USING WAVELET PACKET ANALYSIS By Vaibhav Chhabra A Research Project Submitted to the Faculty of the University of Miami in partial fulfillment of the requirements for the degree of Master of Science Coral Gables, Florida May 2005 UNIVERSITY OF MIAMI A research project submitted in partial fulfillment of the requirements for the degree of Master of Science TONALITY ESTIMATION USING WAVELET PACKET ANALYSIS Vaibhav Chhabra   Approved:    ________________ Ken Pohlmann Professor of Music Engineering _________________ Dr. Edward Asmus Associate Dean of Graduate Studies ________________ Colby Leider Assistant Professor of Music Engineering _________________ Dr. Paul Mermelstein Professor of Electrical Engineering DEDICATION They say that one’s experience is what defines an individual. After all, you are what you are because of your experiences. On that note I would like to dedicate this work to all those who have contributed to my experience in this journey. For what I have learned has laid the foundation for what I will learn. I would also like to thank my family who has always been supportive of me, my brother Ruchir who is a natural send-master, Papa and Ma thanks for keeping the faith. All the Chacha’s, Chachi’s and cousins, thank you all for the support. Next on my thank you list are my Tae Kwon Do buddies. Sensei Jeff thanks for all of your advice, some day I’ll be teacher like you. Rico, training...

Words: 17208 - Pages: 69

Free Essay

Trangtrang

...Chương trình Giảng dạy Kinh tế Fulbright Niên khóa 2011-2013 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ả) Chương 7 BIẾN ĐỘC LẬP ĐỊNH TÍNH (HOẶC BIẾN GIẢ) Tất cả các biến chúng ta gặp trước đây đều có bản chất định lượng; nghĩa là các biến này có các đặc tính có thể đo lường bằng số. Tuy nhiên, hành vi của các biến kinh tế cũng có thể phụ thuộc vào các nhân tố định tính như giới tính, trình độ học vấn, mùa, công cộng hay cá nhân v.v… Lấy một ví dụ cụ thể, hãy xem xét mô hình hồi qui tuyến tính đơn sau (để đơn giản ta bỏ qua chữ t nhỏ): Y=+X+u (7.1) Gọi Y là mức tiêu thụ năng lượng trong một ngày và X là nhiệt độ trung bình. Khi nhiệt độ tăng trong mùa hè, chúng ta sẽ kỳ vọng mức tiêu thụ năng lượng sẽ tăng. Vì vậy, hệ số độ dốc  có khả năng là số dương. Tuy nhiên, trong mùa đông, khi nhiệt độ tăng ví dụ từ 20 đến 40 độ, năng lượng được dùng để sưởi ấm sẽ ít hơn, và mức tiêu thụ sẽ có vẻ giảm khi nhiệt độ tăng. Điều này cho thấy  có thể âm trong mùa đông. Vì vậy, bản chất của quan hệ giữa mức tiêu thụ năng lượng và nhiệt độ có thể được kỳ vọng là phụ thuộc vào biến định tính ―mùa‖. Trong chương này, chúng ta sẽ khảo sát các thủ tục để xem xét các biến định tính trong ước lượng và kiểm định giả thuyết. Chúng ta chỉ tập trung chú ý vào các biến độc lập định tính. Chương 12 thảo luận trường hợp các biến phụ thuộc định tính.  7.1 Các Biến Định Tính Chỉ Có Hai Lựa Chọn Chúng...

Words: 17949 - Pages: 72