Since we love Python (who doesn’t?), we’ve had it in the back of our minds for a while now that we should find a way to make it easier for EViews and Python to talk to each other, so Python programmers can use the econometric engine of EViews directly from Python. So we did! We’ve written a Python package called pyeviews that uses COM to transfer data between Python and EViews (For more information on COM and EViews, take a look at our whitepaper on the subject).
Here’s a simple example going from Python to EViews. We’re going to use the popular Chow-Lin interpolation routine in EViews using data created in Python. Chow-Lin interpolation is a regression-based technique to transform low-frequency data (in our example, annual) into higher-frequency data (in our example, quarterly). It has the ability to use a higher-frequency series as a pattern for the interpolated series to follow. The quarterly interpolated series is chosen to match the annual benchmark series in one of four ways: first (the first quarter value of the interpolated series matches the annual series), last (same, but for the fourth quarter value), sum (the sum of the first through fourth quarters matches the annual series), and average (the average of the first through fourth quarters matches the annual series).