EconPapers    
Economics at your fingertips  
 

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

Chase Coleman, Spencer Lyon and Serguei Maliar

No 13210, CEPR Discussion Papers from C.E.P.R. Discussion Papers

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.

Keywords: Toolkit; Matlab; Python; Julia; Dynamic programming; Global solution; Nonlinear; High dimensionality; Large scale; Value function iteration (search for similar items in EconPapers)
JEL-codes: C6 C61 C63 C68 E31 E52 (search for similar items in EconPapers)
Date: 2018-09
New Economics Papers: this item is included in nep-cmp, nep-dge and nep-mac
References: View references in EconPapers View complete reference list from CitEc
Citations: View citations in EconPapers (6)

Downloads: (external link)
https://cepr.org/publications/DP13210 (application/pdf)
CEPR Discussion Papers are free to download for our researchers, subscribers and members. If you fall into one of these categories but have trouble downloading our papers, please contact us at subscribers@cepr.org

Related works:
Journal Article: Matlab, Python, Julia: What to Choose in Economics? (2021) Downloads
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:cpr:ceprdp:13210

Ordering information: This working paper can be ordered from
https://cepr.org/publications/DP13210

Access Statistics for this paper

More papers in CEPR Discussion Papers from C.E.P.R. Discussion Papers Centre for Economic Policy Research, 33 Great Sutton Street, London EC1V 0DX.
Bibliographic data for series maintained by ().

 
Page updated 2025-03-19
Handle: RePEc:cpr:ceprdp:13210