GRETL. (Gnu Regression, Econometrics and. Timeseries Library)


 Dennis Horton
 1 years ago
 Views:
Transcription
1 1 GRETL (Gnu Regression, Econometrics and Timeseries Library)
2 2 In this project you should analyze generated and real data. Analysis of each set of data should contain: a) Descriptive statistics. b) Time series plot. c) Checking of normality. d) If data are nonstationary take, for example logdifferences to assure stationarity. e) Descriptive statistics, time series plot, checking of normality, analysis of stationarity of new data. f) Analysis of correlogram, finding AR and MA processes order. g) Estimating ARMA processes (in gretl) h) Compare estimated models using information criterions. i) Choosing the best ARMA model. j) Estimating ARMAGARCH processes (in Ox) k) Compare estimated models using information criterions. l) Choosing the best ARMAGARCH model.
3 3 Projekty oddajemy w wersji papierowej. Kazdy projekt bedzie "broniony" indywidualnie. W projekcie prosze zamiescic kolejne kroki dochodzenia do ostatecznego modelu (co obserwujemy, jakie modele beda rozpatrywane w zwiazki z tym, jakie sa kryteria wyboru optymalnego modelu itd, warto porobic troche rysunkow) Which financial time series features do you observe? Which class of models do you chose and why? What are the probably orders of the models? Which model is the best for given data? Is it really the best existing model? wygenerowane dane pochodza z modeli poznanych na wykladzie ARMA + szeroka klasa modeli GARCH z roznymi efektami + rozne rozklady warunkowe rzedy modeli sa zdroworozsadkowe czyli zawiaraja sie w ARMA(2,2), GARCH(2,1) proponowane narzedzia do analizy to GRETL oraz OX z pakietem
4 4 1. How to get and install gretl a) Go to page or and download gretl (Section Gretl for Windows, gretl exe)
5 5 b) Install gretl with default parameters After that, gretl will be installed, but usually in Polish language, to run gretl in English language you have to click: Narzędzia > Ustawienia > Ogólne or Tools > Preferences > General Choose Wybór języka dla GUI > English
6 Choose Wybór języka dla GUI > English or Language Preserence > Polish 6
7 7 2. To load data to gretl from ASCI (text) file, you have to choose from menu: File > Open data > Import > Text/CSV When gretl loads chosen file it will open window with question about structure of data. Answer Yes a) Choose Time series, then click Forward b) Choose Daily (5 days), then click Forward c) Type 1970/01/01 as a starting date, then click Forward (any other date will do) d) Click Apply (if everything is OK).
8 8
9 9
10 right mouse button 10
11 11 3. To load data to gretl from Excel file: File > Open data > Import > Excell Gretl will open first window, click Yes. Then it will open next window with the same question like previous, so you have to choose the same steps.
12 5. With loaded and set data you can: a) Get a time series plot: click with right mouse button second variable name (first is a constant added by gretl) and choose Time series plot b) Get a descriptive statistics: click with right mouse button and choose Descriptive statistics c) Get a correlogram: click with right mouse button and choose Correlogram (you have to choose a proper lag, in most cases the default lag will be good) After choosing lag two windows will open, first with graph of autocorrelation and partial autocorrelation, second with coefficient of autocorrelation and partial autocorrelation functions (with significance of each coefficient). 12
13 13 6. Transformations of variables: a) returns: Add > Define new variable In opened window type: new_variable = (x x(1))/x(1) where x name of variable b) logarithmic returns: Add > Log differences of selected variables
14 14
15 15 8. Checking of normality: Variable > Frequency distribution Variable > Frequency distribution> Against Normal QQ plot for rates 6 y = x Normal quantiles
16 16 The lower the pvalue, the less likely the result is if the null hypothesis is true, and consequently the more "significant" the result is, in the sense of statistical significance. One often rejects the null hypothesis when the pvalue is less than 0.05 or 0.01, corresponding respectively to a 5% or 1% chance of rejecting the null hypothesis when it is true (Type I error).
17 17 9. Checking AR and MA processes order: Variable > Correlogram other data than APATOR!! ACF for Data /T^ lag PACF for Data /T^ lag
18 Estimating ARMA processes: a) Model > Time series > ARIMA b) Choose dependent variable.
19 H0: parameter insignificant pvalue<0.05 reject H0 19
20 You can save the residuals of model by choosing Save>Residuals in the window with models characteristics
21 21 ACF for uhat /T^ lag PACF for uhat /T^ lag
22 TEST of ARCH effect in residuals 22
23 GARCH models 23
24 GARCH model 24
25 Example data_gretl.xls 25
26 Density 26 Example data_gretl.xls 30 Test statistic for normality: Chisquared(2) = pvalue = Data N( , ) Data
27 27 Example data_gretl.xls ACF for Data /T^ lag PACF for Data /T^ lag
28 28
29 29
30 30 Residual ACF /T^ lag Residual PACF /T^ lag
31 31
32 32 check the normality of ARMA residuals do the ARCH test
33 33 Test for normality of residual  Null hypothesis: error is normally distributed Test statistic: Chisquare(2) = with pvalue = 1.88e005
34 34
35 35 Test for ARCH of order 5  Null hypothesis: no ARCH effect is present Test statistic: LM = with pvalue = P(Chisquare(5) > ) = e018 Test for ARCH of order 5 coefficient std. error tratio pvalue alpha(0) e e012 *** alpha(1) e08 *** alpha(2) * alpha(3) alpha(4) *** alpha(5) ***
36 36
37 Density standardized residuals Test statistic for normality: Chisquared(2) = pvalue = uhat6 N( ,1.0021) uhat6 37
38 squared residuals of ARMA model 38
39 39 squared standardized residuals ACF for usq /T^ lag PACF for usq /T^ lag
40 Density 40 if it is not Gaussian distribution we need tstudent distribution or skewed tst leverage effect OX Test statistic for normality: Chisquared(2) = pvalue = uhat6 N( ,1.0021) uhat6
Analysis of the Volatility of the Electricity Price in Kenya Using Autoregressive Integrated Moving Average Model
Science Journal of Applied Mathematics and Statistics 2015; 3(2): 4757 Published online March 28, 2015 (http://www.sciencepublishinggroup.com/j/sjams) doi: 10.11648/j.sjams.20150302.14 ISSN: 23769491
More informationNCSS Statistical Software
Chapter 06 Introduction This procedure provides several reports for the comparison of two distributions, including confidence intervals for the difference in means, twosample ttests, the ztest, the
More informationGetting Started with Minitab 17
2014 by Minitab Inc. All rights reserved. Minitab, Quality. Analysis. Results. and the Minitab logo are registered trademarks of Minitab, Inc., in the United States and other countries. Additional trademarks
More informationAt the end of this lesson, you will be able to create a Request Set to run all of your monthly statements and detail reports at one time.
Request Set Creation You can use a Request Set to run all of your monthly reports at one time, such as your Department Statements, Project Statements and RIT Account Analysis reports. A Request Set allows
More informationStudent Guide to SPSS Barnard College Department of Biological Sciences
Student Guide to SPSS Barnard College Department of Biological Sciences Dan Flynn Table of Contents Introduction... 2 Basics... 4 Starting SPSS... 4 Navigating... 4 Data Editor... 5 SPSS Viewer... 6 Getting
More informationXPost: Excel Workbooks for the Postestimation Interpretation of Regression Models for Categorical Dependent Variables
XPost: Excel Workbooks for the Postestimation Interpretation of Regression Models for Categorical Dependent Variables Contents Simon Cheng hscheng@indiana.edu php.indiana.edu/~hscheng/ J. Scott Long jslong@indiana.edu
More informationOutlook Data File navigate to the PST file that you want to open, select it and choose OK. The file will now appear as a folder in Outlook.
Migrate Archived Outlook Items Outlook includes archiving functionality that is used to free up space on the mail server by moving older items from the mail server to PST files stored on your computer
More informationAutoArchiving your Emails in Outlook
Changing the AutoArchive Settings for all your Mailbox Folders Changing the AutoArchive Settings for all your Mailbox Folders (cont.) One way to minimize the amount of server space you are using for your
More informationPROGRAM TSW REVISED REFERENCE MANUAL
PROGRAM TSW REVISED REFERENCE MANUAL July 2004 Gianluca Caporello and Agustín Maravall Banco de España Thanks are due to Fernando Sánchez Gálvez, Domingo Pérez Cañete, Jorge Carrillo Moya and Nieves Morales
More informationSelecting a Subset of Cases in SPSS: The Select Cases Command
Selecting a Subset of Cases in SPSS: The Select Cases Command When analyzing a data file in SPSS, all cases with valid values for the relevant variable(s) are used. If I opened the 1991 U.S. General Social
More informationWISE Power Tutorial All Exercises
ame Date Class WISE Power Tutorial All Exercises Power: The B.E.A.. Mnemonic Four interrelated features of power can be summarized using BEA B Beta Error (Power = 1 Beta Error): Beta error (or Type II
More informationA Guide to Sample Size Calculations for Random Effect Models via Simulation and the MLPowSim Software Package
A Guide to Sample Size Calculations for Random Effect Models via Simulation and the MLPowSim Software Package William J Browne, Mousa Golalizadeh Lahi* & Richard MA Parker School of Clinical Veterinary
More informationOutlook Web App User Guide
Outlook Web App User Guide Outlook Web App (OWA) is the new version of the webmail system that enables you to access your email from home, or wherever you have an Internet connected computer. There are
More informationGretl User s Guide. Gnu Regression, Econometrics and Timeseries Library. Allin Cottrell Department of Economics Wake Forest University
Gretl User s Guide Gnu Regression, Econometrics and Timeseries Library Allin Cottrell Department of Economics Wake Forest University Riccardo Jack Lucchetti Dipartimento di Economia Università Politecnica
More information3.1 Stationary Processes and Mean Reversion
3. Univariate Time Series Models 3.1 Stationary Processes and Mean Reversion Definition 3.1: A time series y t, t = 1,..., T is called (covariance) stationary if (1) E[y t ] = µ, for all t Cov[y t, y t
More informationRegression Analysis: A Complete Example
Regression Analysis: A Complete Example This section works out an example that includes all the topics we have discussed so far in this chapter. A complete example of regression analysis. PhotoDisc, Inc./Getty
More information11. Analysis of Casecontrol Studies Logistic Regression
Research methods II 113 11. Analysis of Casecontrol Studies Logistic Regression This chapter builds upon and further develops the concepts and strategies described in Ch.6 of Mother and Child Health:
More informationIBM SPSS Missing Values 22
IBM SPSS Missing Values 22 Note Before using this information and the product it supports, read the information in Notices on page 23. Product Information This edition applies to version 22, release 0,
More informationRecall this chart that showed how most of our course would be organized:
Chapter 4 OneWay ANOVA Recall this chart that showed how most of our course would be organized: Explanatory Variable(s) Response Variable Methods Categorical Categorical Contingency Tables Categorical
More informationResults from the 2014 AP Statistics Exam. Jessica Utts, University of California, Irvine Chief Reader, AP Statistics jutts@uci.edu
Results from the 2014 AP Statistics Exam Jessica Utts, University of California, Irvine Chief Reader, AP Statistics jutts@uci.edu The six freeresponse questions Question #1: Extracurricular activities
More informationHow to import 3D (*.PTZ) data from MaxSea v12 to MaxSea TimeZero
Note: EN_TN_3D v12 to TimeZero MaxSea TimeZero v1.1.1 version Windows : : Windows XP / Windows Vista/ Windows 7 Update : January 2012 Technical Note: 3D v12 to TimeZero How to import 3D (*.PTZ) data from
More informationCreating an Email Archive in Outlook
Creating an Email Archive in Outlook Setting up AutoArchive Auto Archiving is the suggested method for archiving mail in Outlook. Mailbox items are AutoArchived on last modification date, not the date
More informationCox Business Premium Online Backup USER'S GUIDE. Cox Business VERSION 1.0
Cox Business Premium Online Backup USER'S GUIDE Cox Business VERSION 1.0 Table of Contents ABOUT THIS GUIDE... 4 DOWNLOADING COX BUSINESS PREMIUM ONLINE BACKUP... 5 INSTALLING COX BUSINESS PREMIUM ONLINE
More informationEconometrics in R. Grant V. Farnsworth. October 26, 2008
Econometrics in R Grant V. Farnsworth October 26, 2008 This paper was originally written as part of a teaching assistantship and has subsequently become a personal reference. I learned most of this stuff
More informationAn analysis method for a quantitative outcome and two categorical explanatory variables.
Chapter 11 TwoWay ANOVA An analysis method for a quantitative outcome and two categorical explanatory variables. If an experiment has a quantitative outcome and two categorical explanatory variables that
More informationOneWay Analysis of Variance (ANOVA) Example Problem
OneWay Analysis of Variance (ANOVA) Example Problem Introduction Analysis of Variance (ANOVA) is a hypothesistesting technique used to test the equality of two or more population (or treatment) means
More informationUsing the Bulk Export/Import Feature
Using the Bulk Export/Import Feature Through Bulksheet Export and Import, agencies have the ability to download complete campaign structures and statistics across multiple clients and providers, and to
More informationGetting Census Data into ArcMap or ArcView. Obtaining Shapefiles from ESRI and Data from the Census Bureau
Obtaining Shapefiles from ESRI and Data from the Census Bureau 1) Download the boundary shapefile from the ESRI website: http://arcdata.esri.com/data/tiger2000/tiger_download.cfm. Select the area that
More informationUSER GUIDE MANTRA WEB EXTRACTOR. www.altiliagroup.com
USER GUIDE MANTRA WEB EXTRACTOR www.altiliagroup.com Page 1 of 57 MANTRA WEB EXTRACTOR USER GUIDE TABLE OF CONTENTS CONVENTIONS... 2 CHAPTER 2 BASICS... 6 CHAPTER 3  WORKSPACE... 7 Menu bar 7 Toolbar
More informationReview of basic statistics and the simplest forecasting model: the sample mean
Review of basic statistics and the simplest forecasting model: the sample mean Robert Nau Fuqua School of Business, Duke University August 2014 Most of what you need to remember about basic statistics
More information