Professional Documents
Culture Documents
for Version 7
Richard Startz
University of Washington
EViews Illustrated for Version 7
Copyright © 2007, 2009 Quantitative Micro Software, LLC
All Rights Reserved
Printed in the United States of America
ISBN: 978-1-880411-44-5
Disclaimer
The author and Quantitative Micro Software assume no responsibility for any errors that may
appear in this book or the EViews program. The user assumes all responsibility for the selection
of the program to achieve intended results, and for the installation, use, and results obtained
from the program.
Trademarks
Windows, Word and Excel are trademarks of Microsoft Corporation. PostScript is a trademark of
Adobe Corporation. Professional Organization of English Majors is a trademark of Garrison Keil-
lor. All other product names mentioned in this manual may be trademarks or registered trade-
marks of their respective companies.
You and I are going to start our conversation by taking a quick walk through some of
EViews’ most used features. To have a concrete example to work through, we’re going to
take a look at the volume of trade on the New York Stock Exchange. We’ll view the data as
a set of numbers on a spreadsheet and as a graph over time. We’ll look at summary statis-
tics such as mean and median together with a histogram. Then we’ll build a simple regres-
sion model and use it for forecasting.
Being impatient to get started, let’s take the quick solution and load an existing workfile. If
you’re working on the computer while reading, you may want to load the workfile
“nysevolume.wf1” using the menu steps File/Open/EViews Workfile… as pictured on the
next page.
4—Chapter 1. A Quick Walk Through
Hint: All the files used in this book are available on the web at www.eviews.com.
occurred. Most periods trading is light. Heavy trading volume— say over a billion shares—
happened much less frequently.
To the right of the histogram we see a variety of summary statistics for the data. The aver-
age (mean) volume was just over 93 million shares, while the median volume was 1.75 mil-
lion. The largest recorded trading volume was over 1.6 billion and the smallest was just
over 100,000.
Now we’ve looked at two different views (Spreadsheet and Histogram and Stats) of a
series (VOLUME). We’ve learned that trading volume on the NYSE is enormously variable.
Can we say something more systematic, explaining when trading volume is likely to be high
versus low? A starting theory for building a model of trading volume is that trading volume
grows over time. Underlying this idea of growth over time is some sense that the financial
sector of the economy is far larger than it was in the past.
As a first pass, we’ll look at only the last three years or so of data. To limit what we see to
this period, we need to change the sample.
Looking at different samples—7
Hint: Ranges of dates in EViews are specified in pairs, so “2001q1 @last” means all
dates starting with the first quarter of 2001 and ending with the last date in the work-
file. EViews accepts a variety of conventions for writing a particular date. “2001:1”
means the first period of 2001 and “2001q1” more specifically means the first quarter
of 2001. Since the periods in our data are quarterly, the two are equivalent.
Remember: when we changed the sample on the view, we have not changed the underlying
data, just the portion of the data that we’re viewing at the moment. The complete set of data
remains intact, ready for us to use any time we’d like.
Historical hint: Ever wonder why so many computer commands are limited to four let-
ters? Back in the early days of computing, several widely used computers stored char-
acters “four bytes to the word.” It was convenient to manipulate data a “word” at a
time. Hence the four letter limit and commands spelled like “smpl”.
Now that you’ve set the sample to include all the data, let’s generate LOGVOL again, this
time from the command line. Type:
series logvol = log(volume)
in the command pane and hit Enter. (This is the last time I’ll nag you about hitting the
Enter key. I promise.)
Looking at a pair of series together—11
Hint: Menu items, both in the menu bar at the top of the screen and menus chosen
from the button bar, change to reflect the contents of the currently active window. If
the menu items differ from those you expect to see, the odds are that you aren’t look-
ing at the active window. Click on the desired window to be sure it’s the active win-
dow.
We might conclude from looking at our LOGVOL line graph that NYSE volume rises at a
more or less constant percentage growth rate in the long run, with a lot of short-run fluctua-
tion. Or perhaps the picture is better represented by slow growth in the early years, a drop in
volume during the Great Depression (starting around 1929), and faster growth in the post-
War era. We’ll leave the substantive question as a possibility for future thought and turn
now to building a regression model and making a forecast of future trading volume.
To get started we need to create the variable t. In the command pane at the top of the
EViews screen type:
series t = @trend
12—Chapter 1. A Quick Walk Through
The group shows time and log volume, that is, the
series T and LOGVOL, together. Just as there are multi-
ple ways to view a series, there are also a number of
group views. Here’s the spreadsheet view.
Estimating your first regression in EViews—13
We can see that the straight line gives a good rough description of how log volume moves
over time, even though the line doesn’t hit very many points exactly.
The equation for the plotted line can be written algebraically as y = â + b̂t . â is the inter-
cept estimated by the computer and b̂ is the estimated slope. Just looking at the plot, we
can see that the intercept is roughly -2.5. When t = 400, LOGVOL looks to be about 4.
Reaching back—possibly to junior high school—for the formula for the slope gives us an
approximation for b̂ .
4 – ( – 2.5 )
b̂ ª ------------------------ = 0.01625
400 – 0
An eyeball approximation is that LOGVOL rises sixteen thousandths—a bit over a percent
and a half—each quarter.
You can “run a regression” either by using a menu and dialog or by typing a command.
Let’s try both, starting with the menu and dialog method. Pick the menu item Quick/Esti-
mate Equation… at the top of the EViews window. Then in the upper field type “logvol c t”.
as shown below.
14—Chapter 1. A Quick Walk Through
Hint: Sometimes the dependent variable is called the “left-hand side” variable and the
independent variables are called the “right-hand side” variables. The terminology
reflects the convention that the dependent variable is written to the left of the equal
sign and the independent variables appear to the right, as, for example, in
log ( volume t ) = a + bt .
Whoa a minute. “LOGVOL” is the variable we created with the logarithm of volume, and
“T” is the variable we created with a time trend. But where does the “C” in the command
come from? “C” is a special keyword signaling EViews to estimate an intercept. The coeffi-
cient on the “variable” C is â , just as the coefficient on the variable T is b̂ .
Estimating your first regression in EViews—15
Whether we look at the top or bottom we see that the fitted line goes smack though the mid-
dle of log ( volume ) in the early part of the sample, but then the fitted value is above the
actual data from about 1930 through 1980 and then too low again in the last years of the
sample. If we could get an equation with some upward curvature perhaps we could do a bet-
ter job of matching up with the data. One way to specify a curve is with a quadratic equa-
tion such as:
log ( volume t ) = a + b 1 t + b 2 t 2 + e
For this equation we need a squared time trend. As in most computer programs, EViews
uses the caret, “^”, for exponentiation. In the command pane type:
series tsqr = t^2
Estimating your first regression in EViews—17
We’ve typed in “log(volume)” instead of the series name LOGVOL, and could have typed
“t^2” instead of tsqr: thus illustrating that you can use either a series name or an algebraic
expression in a regression command.
Prior to this step the title bar of the equation window read “Equation: untitled.” Using the
button changed two things: the equation now has a name which appears in the title
bar, and more importantly, the equation object is stored in the workfile. You can see these
changes below. If you like, close the equation window and then double-click on
to re-open the equation. But don’t take the break quite yet!
Saving your work—19
Before leaving the computer, click on the workfile window. Use the File menu choice
File/Save As… to save the workfile on the disk.
Now would be a good time to take a break. In fact, take a few minutes and indulge in your
favorite beverage.
Back so soon? If your computer froze while you were gone you can start up EViews and use
File/Open/EViews Workfile… to reload the workfile you saved before the break.
Your computer didn’t freeze, did it? (But then, you probably didn’t really take a break
either.) This is the spot in which authors enjoin you to save your work often. The truth is,
EViews is remarkably stable software. It certainly crashes less often than your typical word
processor. So, yes, you should save your workfile to disk as a safety measure since it’s easy,
but there’s a different reason that we’re emphasizing saving your workfile.
As you work you make changes to the data in the workfile. Sometimes you find you’ve gone
up a blind alley and would like to back out. Since there is no Undo feature, we have to sub-
stitute by doing Save As… frequently. If you like, save files as “foo1.wf1”, “foo2.wf1”, etc.
If you find you’ve made changes to the workfile in memory that you now regret you can
“backup” by loading in “foo1.wf1”.
You can also hit the Save button on the workfile window to save a copy of the workfile to
disk. This is a few keystrokes easier than Save As…. But while Save protects you from com-
puter failure, it doesn’t substitute for an Undo feature. Instead it copies the current workfile
in memory—including all the changes you’ve made—on top of the version stored on disk.
Pedantic note: EViews does have an Undo item in the usual place on the Edit menu. It
works when you’re typing text. It doesn’t Undo changes to the workfile.
20—Chapter 1. A Quick Walk Through
Forecasting
What’s Ahead
This chapter’s been a quick stroll through EViews, just enough—we hope—to whet your
appetite. You can continue walking through the chapters in order, but skipping around is
fine too. If you’ll be mostly using EViews files prepared by others, you might proceed to
Chapter 3, “Getting the Most from Least Squares,” to dive right into regressions; to
Chapter 7, “Look At Your Data,” for both simple and advanced techniques for describing
your data, or to Chapter 5, “Picture This!,” if it’s graphs and plots you’re after. If you like
22—Chapter 1. A Quick Walk Through
the more orderly approach, continue on to the next chapter where we’ll start the adventure
of setting up your own workfile and entering your own data.