Citation

Discussion Paper Details

Please find the details for DP13210 in an easy to copy and paste format below:

Full Details   |   Bibliographic Reference

Full Details

Title: Matlab, Python, Julia: What to Choose in Economics?

Author(s): Chase Coleman, Spencer Lyon, Lilia Maliar and Serguei Maliar

Publication Date: September 2018

Keyword(s): Dynamic programming, Global solution, High dimensionality, Julia, Large scale, Matlab, Nonlinear, Python, Toolkit and Value function iteration

Programme Area(s): Monetary Economics and Fluctuations

Abstract: We perform a comparison of Matlab, Python and Julia as programming languages to be used for implementing global nonlinear solution techniques. We consider two popular applications: a neoclassical growth model and a new Keynesian model. The goal of our analysis is twofold: First, it is aimed at helping researchers in economics to choose the programming language that is best suited to their applications and, if needed, help them transit from one programming language to another. Second, our collections of routines can be viewed as a toolbox with a special emphasis on techniques for dealing with high dimensional economic problems. We provide the routines in the three languages for constructing random and quasi-random grids, low-cost monomial integration, various global solution methods, routines for checking the accuracy of the solutions, etc. Our global solution methods are not only accurate but also fast. Solving a new Keynesian model with eight state variables only takes a few seconds, even in the presence of active zero lower bound on nominal interest rates. This speed is important because it then allows the model to be solved repeatedly as one would require in order to do estimation.

For full details and related downloads, please visit: https://cepr.org/active/publications/discussion_papers/dp.php?dpno=13210

Bibliographic Reference

Coleman, C, Lyon, S, Maliar, L and Maliar, S. 2018. 'Matlab, Python, Julia: What to Choose in Economics?'. London, Centre for Economic Policy Research. https://cepr.org/active/publications/discussion_papers/dp.php?dpno=13210