1. Introduction
In this note I outline the basic facts and rules of thumb about financial econometric software that is relevant for Rob Engle‘s Fall 2011 Financial Econometrics (2) PhD course.1 First, I give a quick introduction to EViews and point to some more in depth examples. Next, I outline the benefits and limitations of using EViews and suggest that econometric derivations should be checked via numerical simulations in a more suitable programming/statistical language such as MATLAB, R or Scientific Python. My general feeling is that EViews is an excellent point of departure for doing exploratory data analysis and initial hypothesis testing; however, when doing more complicated statistical procedures a MATLAB, R or SciPy are better choices. Finally, I conclude with some helpful resources for documenting and warehousing code.
2. Using EViews
EViews is a statistical/econometric software package that is useful for getting quick summaries of financial time series using a WYSIWYG/point-and-click interface. To my mind, EViews is to MATLAB or R what a Google Doc2 is to a LaTeX file. In the same way that you should veer towards LaTeX rather than a Word Document if you are interested in writing a very technical article with lots of equations, you should head towards MATLAB or R if you want to do any serious simulations or custom econometrics; however, no one in their right mind would bother writing a quick note or to do list in TeX. If you want to do an initial exploration of the properties of a time series, EViews is a good place to start.
Below I take a quick look at the sort of procedures EViews is well equipped to tackle. For a set of more in depth examples, I found that Dick Startz and Dave Smant had good introductions and sample code to play with.
First, I load in a EViews workspace file containing the adjusted closing price of BNP Paribas. After loading the data and mouse clicks (selecting “show” and then “graph”), I can display the time series along with the unconditional price distribution.
The summary statistics for this unconditional distribution are available using the “stats” menu icon on the upper right. This option gives ou the standard mean, median, min, max and standard deviation of the observations just as in MATLAB, R or STATA. It also gives you higher moments, skewness and kurtosis, as well as the Jarque-Bera test for normality as the software is tailor made for financial econometrics. As a reference, this is a similar print out to the one available using the RMetrics suite in R.
If you want to look at returns rather than prices, then in the command line you would enter the command below to generate (““) the new series:
(1)
This new series can then be inspected in the exact same way as the original price time series:
3. Benefits of Simulation
EViews is a nice tool for exploratory data analysis and quick intuition building experiments. However, for more serious econometric work we need to move to a more complete programming language. What’s more, because EViews includes so many out of the box statistical tests (e.g., the Jarque-Bera test for normality), it is not a great environment within which to learn econometric theory.3 At the end of the day, if you want to learn the econometrics, you need to be able to code it up.
To be more concrete, consider problem in the first homework assignment on blackboard which asks you to consider the ARCH model below:
(2)
where is the conditional volatility and is a return, and then work out some properties of the estimator .
The analytical solution to this problem can be derived by recursively substituting in the step ahead formula for returns and then applying the law of iterated expectations. However, this procedure involves a fair bit of algebra4, which tends to obscure the intuition and lead to silly errors. For this sort of question, you really want to be able to check your work in a constructive way, and this is where numerical simulations come in extremely handy as they allow you to both check your work and visualize comparative statics. There is no reason why you should ever deliver a homework question of this sort with a wrong answer. Use R, MATLAB, SciPy or rocks.
As an example, take a look at my previous post in which I walk through the properties of the Hodrick (1992) standard errors for overlapping returns.
4. Document and Share Your Code!
How many additional citations and article views does John Cochrane get simply because he posts the data and code to all his papers in a easy to find location (here) on his website?
There are a variety of ways to dynamically document your code as you work. For instance see, Doxygen for Python and Roxygen for R. Use Cell-Mode for MATLAB. If you use Emacs, take a look at Org-Mode with Org-Babel as an IDE for any language you could ever want. For EViews you really don’t have many options. All you can do is copy and paste the output into a word document.
- As always, the usual disclaimer applies: these are my thoughts and opinions. ↩
- You can actually use LaTeX equations in Google Docs now, though only in a restricted sense. Nevertheless, for short projects this seems like a nice tool for collaborating with distant coauthors as Google can take care of the version control. ↩
- This section has been updated in response to a comment. Upon re-reading, I was harsher phrasing than I intended. ↩
- Use Mathematica or SageMath for symbolic results. Don’t screw up simple algebra. You want to focus on the economics/finance, not the algebra. ↩
You must be logged in to post a comment.