Programming Languages for Economics
I shortly touch upon the programming languages to use in economics and finance
Students and professionals in economics, finance, and related fields inevitably encounter various software tools designed to analyze real-world data. This raises a crucial question: Which software should you choose? Is there one program that handles everything? The answer depends entirely on your specific area of work. No single software excels at every task, so your choice should align with your research focus and the nature of your work.
For those specializing in macroeconomics and economic modeling, Matlab or Octave are standard choices because they support Dynare, which is essential for Dynamic Stochastic General Equilibrium (DSGE) models. Anyone pursuing graduate studies in macroeconomics would benefit from learning Matlab. However, this represents just one part of the landscape.
In econometrics and statistics, Stata, Eviews, and R each serve different purposes. Stata excels with microeconomic and panel data analysis, offering powerful loop and conditional statement capabilities. Eviews, by contrast, is better suited for time series econometrics, with user-friendly drop-down menus that facilitate quick analyses. While you can technically perform any task in either program, doing so outside their strengths requires significantly more effort. The key is minimizing the time and energy invested in working around software limitations.
R can handle all these econometric tasks as well, though its lack of drop-down menus presents a steeper learning curve. Where R truly shines is in data analysis and visualization. As data science grows increasingly important due to the proliferation of large, complex datasets, R has become an invaluable tool. Its greatest advantages are that it’s free and offers thousands of packages covering virtually every analytical need. For working with large datasets efficiently, DuckDB has emerged as a powerful addition to R’s ecosystem, providing remarkably fast analytical database capabilities directly within R workflows.
Software preferences are also shifting as technology advances. Newer programs often outperform older ones, and many are free with open-source code available on various platforms. This allows users to develop packages or contribute to existing ones, fostering rapid expansion and vibrant communities. Python exemplifies this trend, offering excellent data analysis capabilities and extensive scientific libraries. For data manipulation at scale, the Polars library has become a favorite among Python users, delivering exceptional performance for large datasets with an intuitive API. Python’s rise has even begun to erode Matlab’s dominance among macroeconomists.
However, all these programs share one limitation: speed. Depending on your work, computational speed can be critical. While Python offers powerful data analysis tools and scientific libraries, it may not be fast enough for certain applications. This is where Julia enters the picture. Developed at MIT, Julia features syntax similar to Matlab and Python, making it relatively easy to learn. Its defining characteristic is exceptional speed, achieved through a feature called Multiple Dispatch, allowing it to approach the performance of C and Fortran while maintaining clean, readable syntax. The Federal Reserve Bank of New York, for instance, has switched to Julia for DSGE models precisely because of its superior speed compared to Matlab. Julia also offers growing packages for data analysis, with an expanding community that threatens to further diminish Matlab’s position.
Ultimately, the software you should use depends on what you do. Choose the tool that best fits your specific tasks and workflow.
Citation
@online{ciftci2021,
author = {Ciftci, Muhsin},
title = {Programming {Languages} for {Economics}},
date = {2021-10-01},
langid = {en}
}