![]() ![]() The four languages come with varying amounts of learning materials. R also has a large community, followed by MATLAB and finally Julia. Python has the largest community, benefiting from its widespread use outside of the type of scientific computations considered here. All four languages have a vibrant online community, helping researchers. We look at the community support from several directions, especially the number of questions on Stack Overflow and the number of public repositories for each language on GitHub. While the Stack Overflow website is the most popular, other more specific websites are also beneficial. Programmers increasingly rely on community support in their work. These findings are in line with results of Arouba (2018), Coleman et al. ![]() MATLAB stays significantly behind with a worse relative time than in 2020. Python has moved up a place, at the expense of R. Julia is still the fastest, and is now relatively faster than in 2020. When using Julia, we use two versions, standard and without bonds checking, We normalise all results to a pure C implementation to establish a speed baseline. 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 |