We use all four languages in their standard forms, and for Python, we also consider the just-in-time compiler package Numba, with significantly speeds up Python calculations in those specific cases where it can be used. It is iterative and non-vectorisable, with a nontrivial computation time, making it an excellent test for speed. The first comparison is the calculation of a GARCH log-likelihood function. We start by evaluating computation speed, with all code available on the web appendix at. One could conceivably do everything Stata offers in one of the four languages while the reverse is certainly not true. It is not a general-purpose programming language, our interest in this piece. The reason is that while Stata offers much better algorithms than any of the four languages, users engage with algorithms written by Stata rather than writing their own. This leaves the question of why we are not discussing Stata, which might be the most used statistical programme in economics, one we have used extensively. Not surprisingly, it has been adopted in high quality projects, such as Quantitative Economics with Julia, popularised by Thomas Sargent (Perla et al., 2022). Julia is modern, carrying none of the baggage of the other three, but at the cost of less maturity and familiarity. They are mature but also suffer from incremental changes over the years, so they can be archaic, inconsistent and slow. Three of these four – MATLAB, Python, and R – date back several decades, bringing advantages and problems. Still, as all four are in active development, the landscape has changed considerably since the last time, so it is worthwhile revisiting the question. We have compared these four languages twice before here on Vox (Danielsson and Fan 2018, Aguirre and Danielsson 2020). Researchers in economics and finance looking for a modern general purpose programming language have four choices – Julia, MATLAB, Python, and R.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |