Introduction to E-views - COMESA Monetary Institute...
-
Upload
truongkien -
Category
Documents
-
view
232 -
download
1
Transcript of Introduction to E-views - COMESA Monetary Institute...
Introduction
• Opening an Eviews workfile
• Loading data into e-views– Direct load
– Importing
– Command/program based importation
• Performing data transformations
• Basic equation estimation
• Diagnostic tests
• Building a model
• Forecasting and policy simulations
Opening an Eviews work file
To open a new work file go to file, New, then select work file
Opening an Eviews workfile
• Once the workfile option is selected the following window will appear
Opening and eviews wok file
Choose the structureOf the data
Opening an eviews work file
Select the frequency of the data
Opening an Eviews workfile
Insert data range,name the work fileand assign a page
Workfile
• Once the structure of the workfile and the data range has been set the following window appear
Inputing data into eviews
• There are various ways to copy data into eviews:
– Direct copy and paste
– Copy and paste via empty group
– Importing from excel
– Importing data using a program (programing based technique)
Direct copy and paste
Click on quick, then choose the empty group series
Direct copy and paste
Direct copy and paste
Copy data directly from excel and paste in E-views
Direct copy and paste
program based import
After you have created the work fileGo to file, New, Program to start importing using the program
Program based import
Program based import
• In the command window write the following command and run it.
read(b2,s=dta) d:\\comesaprc\tinasdatp.xlsx 22File path
Excel sheet in which data is contained
File type
Point at which command starts reading data
number of variables
Descriptive statistics
• To view the descriptive statistics of a data series first open the data series or the group of variables.
Descriptive statistics
Class exercise 1
• Load data into Eviews using the copy and paste technique
• Plot the following series :– Credit
– Nominal gdp
– Household consumption
– Private consumption
• Compute all descriptive statistics
• Compute the correlations between the four series
Data transformations and manipulation
Click on generate series
Generating series
Type the equation of choiceLcpi=log(cpi)
Generating series
Alternatively you can generate series and perform transformations using commands in this window
We can use the series or genr command e.g. type series lcpi=log(cpi)
Class exercise 21. Generate logs of the variables you have loaded in 1
using the Genr window
2. Compute the rate of inflation, year on year growth rate for GDP and the credit to GDP ratio
3. Generate differences of the series
4. In your groups, estimate an equation for:– Credit
– Inflation
– Imports
– exports
• Explain the reasoning behind the estimated equations and interpret coefficients
Class exercise 3
• Repeat 1 to 4 using a program
Financial cycle and business cycle:using the HP filter
By
Tinashe Bvirindi
HP filter
• The Hodrick-Prescott Filter is a smoothingmethod that is widely used amongmacroeconomists to obtain a smooth estimateof the long-term trend component of a series.
• The method was first used in a working paper(circulated in the early 1980’s and publishedin1997) by Hodrick and Prescott to analyzepostwar U.S. business cycles.
HP filter
• Technically, the Hodrick-Prescott (HP) filter is a two-sided linear filter that computes the smoothed series (s) of (Y) by minimizing the variance of (Y) around (s), subject to a penalty that constrains the second difference of (s)
• That is, the HP filter chooses to minimize (s):
HP filter
HP Filtering in E-views• To compute an HP filtered series in E-views you need to open
the data series
• Then go to procedures and select HP Filter
HP filter
Name the new filtered series
Alternative is to use the RavanUhlig (2002) power rule and set power to 4
HP Filter
-60
-40
-20
0
20
40
60
0
50
100
150
200
250
90 92 94 96 98 00 02 04 06 08 10
STCKPR Trend Cycle
Hodrick-Prescott Filter (lambda=1600)
Permanent trend
Countercyclical capital buffer • Designed to limit pro-cyclicality
• Configuration of the buffer based on deviations of credit to gdp ratio from longrun trends
• Buffer rules are that:
– Capital requirement 2.5% if deviation > 10%
– Proportional upto 2.5% if deviation is between 2% and 10%
– Zero if deviation is less than 2%
– Lamda provided by basel
Class exercise 4
• Generate filtered series for credit and nominal GDP
• Plot the business cycle against the financial cycle and comment
• Generate filtered credit to GDP ratio and compute countercyclical capital buffers requirements
Business and financial cycles
-.12
-.08
-.04
.00
.04
.08
.12
90 92 94 96 98 00 02 04 06 08 10
LTDC_CYCLE LNGDP_CYCLE
Countercyclical capital buffer
-17.00%
-14.50%
-12.00%
-9.50%
-7.00%
-4.50%
-2.00%
0.50%
3.00%
5.50%
8.00%
20
00
Q2
20
00
Q3
20
00
Q4
20
01
Q1
20
01
Q2
20
01
Q3
20
01
Q4
20
02
Q1
20
02
Q2
20
02
Q3
20
02
Q4
20
03
Q1
20
03
Q2
20
03
Q3
20
03
Q4
20
04
Q1
20
04
Q2
20
04
Q3
20
04
Q4
20
05
Q1
20
05
Q2
20
05
Q3
20
05
Q4
20
06
Q1
20
06
Q2
20
06
Q3
20
06
Q4
20
07
Q1
20
07
Q2
20
07
Q3
20
07
Q4
20
08
Q1
20
08
Q2
20
08
Q3
20
08
Q4
20
09
Q1
20
09
Q2
20
09
Q3
20
09
Q4
20
10
Q1
20
10
Q2
20
10
Q3
20
10
Q4
20
11
Q1
20
11
Q2
20
11
Q3
20
11
Q4
counter cyclical capital buffer
gap buffer
NB: The CCCBR is 2.5% if growth>10%, 0% if CG<2% and is adjusted proportionally to 2.5% if between 2% and 10%
Frequency/ Band pass filters
• They are used to isolate the cyclical componentof a time series by specifying a range for itsduration.
• The filter takes a two sided weighted movingaverage of the data where cycles in a band givenby the specified upper and lower limits arepassed through and the remaining filtered out.
• There are two types of filters i.e. fixed lengthsymmetric filters and full sample asymmetricfilters:
Frequency/Band pass filters
Fixed length symmetric filters– Baxter and King (1999) – Christiano and Fitzgerald (2003)
• Symmetric filters are time invariant since moving averages depend on the specified frequency range and do not use the full data
• Require same number of leads and lags and therefore loses endpoint information
Full sample asymmetric filter– Christiano and Fitzgerald (2003)
• Weights on the leads and lags are allowed to differ• Calculated to the end of the original sample
Frequency and band pass filters
• Fixed length symmetric filters the weight matrix is of dimension 1*(q+1) where q is the number of user specified lags
• Filtered series is computed as:
Business cycle and financial cyclesBaxter and King (1998)
-.08
-.04
.00
.04
.08
.12
1975 1980 1985 1990 1995 2000 2005 2010
LNGDP_BP LTDC_BP
References
• Borio. C. (2012), Financial cycles and macroeconomics, what we have learnt so far, BIS working papers No 395
• Haldane (2010), curbing the credit cycle, bank of England publications
• Introductory econometrics of finance
• Basic econometrics Gujarati
• W. Anders (2010), Applied time series analysis
• Greene(2005),
• Baxter and King (1998), deciphering the business cycle