IDEAS home Printed from https://ideas.repec.org/a/eee/dyncon/v58y2015icp265-273.html
   My bibliography  Save this article

A comparison of programming languages in macroeconomics

Author

Listed:
  • Aruoba, S. Borağan
  • Fernández-Villaverde, Jesús

Abstract

We solve the stochastic neoclassical growth model, the workhorse of modern macroeconomics, using C++14, Fortran 2008, Java, Julia, Python, Matlab, Mathematica, and R. We implement the same algorithm, value function iteration, in each of the languages. We report the execution times of the codes in a Mac and in a Windows computer and briefly comment on the strengths and weaknesses of each language.

Suggested Citation

  • Aruoba, S. Borağan & Fernández-Villaverde, Jesús, 2015. "A comparison of programming languages in macroeconomics," Journal of Economic Dynamics and Control, Elsevier, vol. 58(C), pages 265-273.
  • Handle: RePEc:eee:dyncon:v:58:y:2015:i:c:p:265-273
    DOI: 10.1016/j.jedc.2015.05.009
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0165188915000883
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.jedc.2015.05.009?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to search for a different version of it.

    References listed on IDEAS

    as
    1. Tauchen, George, 1986. "Finite state markov-chain approximations to univariate and vector autoregressions," Economics Letters, Elsevier, vol. 20(2), pages 177-181.
    2. Aruoba, S. Boragan & Fernandez-Villaverde, Jesus & Rubio-Ramirez, Juan F., 2006. "Comparing solution methods for dynamic equilibrium economies," Journal of Economic Dynamics and Control, Elsevier, vol. 30(12), pages 2477-2508, December.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Carrillo-Maldonado, Paul & Díaz-Cassou, Javier, 2023. "An anatomy of external shocks in the Andean region," The Journal of Economic Asymmetries, Elsevier, vol. 27(C).
    2. Bognanni, Mark & Zito, John, 2020. "Sequential Bayesian inference for vector autoregressions with stochastic volatility," Journal of Economic Dynamics and Control, Elsevier, vol. 113(C).
    3. Stephen J. Terry, 2017. "Alternative Methods for Solving Heterogeneous Firm Models," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 49(6), pages 1081-1111, September.
    4. Jesús Fernández-Villaverde & Isaiah J. Hull, 2023. "Dynamic Programming on a Quantum Annealer: Solving the RBC Model," NBER Working Papers 31326, National Bureau of Economic Research, Inc.
    5. Mingzhuo Deng & Pablo A. Guerron-Quintana & Lewis Tseng, 2023. "Parallel Computation of Sovereign Default Models," Computational Economics, Springer;Society for Computational Economics, vol. 62(3), pages 1047-1085, October.
    6. Yifei Wu & Jeffrey H Dorfman, 2018. "Reducing residential mortgage default: Should policy act before or after home purchases?," PLOS ONE, Public Library of Science, vol. 13(7), pages 1-23, July.
    7. Paul Carrillo‐Maldonado, 2023. "Partial identification for growth regimes: The case of Latin American countries," Metroeconomica, Wiley Blackwell, vol. 74(3), pages 557-583, July.
    8. Yifei Wu & Jeffrey H. Dorfman & Brady E. Brewer, 2021. "The susceptibility of farmland loans to default under falling farmland and commodity prices," Agricultural Economics, International Association of Agricultural Economists, vol. 52(4), pages 561-574, July.
    9. Harutyun Shahumyan & Rolf Moeckel, 2017. "Integration of land use, land cover, transportation, and environmental impact models: Expanding scenario analysis with multiple modules," Environment and Planning B, , vol. 44(3), pages 531-552, May.
    10. Duarte, Victor & Duarte, Diogo & Fonseca, Julia & Montecinos, Alexis, 2020. "Benchmarking machine-learning software and hardware for quantitative economics," Journal of Economic Dynamics and Control, Elsevier, vol. 111(C).

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Carlo A. Favero, 2007. "Model Evaluation in Macroeconometrics: from early empirical macroeconomic models to DSGE models," Working Papers 327, IGIER (Innocenzo Gasparini Institute for Economic Research), Bocconi University.
    2. Andrew Foerster & Juan F. Rubio‐Ramírez & Daniel F. Waggoner & Tao Zha, 2016. "Perturbation methods for Markov‐switching dynamic stochastic general equilibrium models," Quantitative Economics, Econometric Society, vol. 7(2), pages 637-669, July.
    3. Kenneth L. Judd & Lilia Maliar & Serguei Maliar & Inna Tsener, 2017. "How to solve dynamic stochastic models computing expectations just once," Quantitative Economics, Econometric Society, vol. 8(3), pages 851-893, November.
    4. Karen Kopecky & Richard Suen, 2010. "Finite State Markov-chain Approximations to Highly Persistent Processes," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 13(3), pages 701-714, July.
    5. Aruoba, S. Boragan & Fernandez-Villaverde, Jesus & Rubio-Ramirez, Juan F., 2006. "Comparing solution methods for dynamic equilibrium economies," Journal of Economic Dynamics and Control, Elsevier, vol. 30(12), pages 2477-2508, December.
    6. Barillas, Francisco & Fernandez-Villaverde, Jesus, 2007. "A generalization of the endogenous grid method," Journal of Economic Dynamics and Control, Elsevier, vol. 31(8), pages 2698-2712, August.
    7. Dario Caldara & Jesus Fernandez-Villaverde & Juan Rubio-Ramirez & Wen Yao, 2012. "Computing DSGE Models with Recursive Preferences and Stochastic Volatility," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 15(2), pages 188-206, April.
    8. Dorofeenko, Victor & Lee, Gabriel S. & Salyer, Kevin D., 2010. "A new algorithm for solving dynamic stochastic macroeconomic models," Journal of Economic Dynamics and Control, Elsevier, vol. 34(3), pages 388-403, March.
    9. Robert Kirkby Author-Email: robertkirkby@gmail.com|, 2017. "Convergence of Discretized Value Function Iteration," Computational Economics, Springer;Society for Computational Economics, vol. 49(1), pages 117-153, January.
    10. Hintermaier, Thomas & Koeniger, Winfried, 2010. "The method of endogenous gridpoints with occasionally binding constraints among endogenous variables," Journal of Economic Dynamics and Control, Elsevier, vol. 34(10), pages 2074-2088, October.
    11. Fernandez-Villaverde, Jesus & Rubio-Ramirez, Juan F., 2006. "Solving DSGE models with perturbation methods and a change of variables," Journal of Economic Dynamics and Control, Elsevier, vol. 30(12), pages 2509-2531, December.
    12. Monteiro, Paulo Santos, 2008. "Family Labor Supply and Aggregate Saving," Economic Research Papers 269886, University of Warwick - Department of Economics.
    13. Moody Chu & Chun-Hung Kuo & Matthew Lin, 2013. "Tensor Spline Approximation in Economic Dynamics with Uncertainties," Computational Economics, Springer;Society for Computational Economics, vol. 42(2), pages 175-198, August.
    14. Heer Burkhard & Maußner Alfred, 2011. "Value Function Iteration as a Solution Method for the Ramsey Model," Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), De Gruyter, vol. 231(4), pages 494-515, August.
    15. Ayse Kabukcuoglu & Enrique Martínez-García, 2016. "The Market Resources Method for Solving Dynamic Optimization Problems," Koç University-TUSIAD Economic Research Forum Working Papers 1607, Koc University-TUSIAD Economic Research Forum.
    16. Aldrich, Eric M. & Fernández-Villaverde, Jesús & Ronald Gallant, A. & Rubio-Ramírez, Juan F., 2011. "Tapping the supercomputer under your desk: Solving dynamic equilibrium models with graphics processors," Journal of Economic Dynamics and Control, Elsevier, vol. 35(3), pages 386-393, March.
    17. Peri, Alessandro, 2020. "A hardware approach to value function iteration," Journal of Economic Dynamics and Control, Elsevier, vol. 114(C).
    18. Jesus Fernandez-Villaverde & Juan F. Rubio-Ramirez, 2003. "Some Results on the Solution of the Neoclassical Growth Model," PIER Working Paper Archive 04-002, Penn Institute for Economic Research, Department of Economics, University of Pennsylvania.
    19. Yongyang Cai & Kenneth Judd & Jevgenijs Steinbuks, 2017. "A nonlinear certainty equivalent approximation method for dynamic stochastic problems," Quantitative Economics, Econometric Society, vol. 8(1), pages 117-147, March.
    20. Fernández-Villaverde, J. & Rubio-Ramírez, J.F. & Schorfheide, F., 2016. "Solution and Estimation Methods for DSGE Models," Handbook of Macroeconomics, in: J. B. Taylor & Harald Uhlig (ed.), Handbook of Macroeconomics, edition 1, volume 2, chapter 0, pages 527-724, Elsevier.

    More about this item

    Keywords

    Dynamic equilibrium economies; Computational methods; Programming languages;
    All these keywords.

    JEL classification:

    • C63 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computational Techniques
    • C68 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computable General Equilibrium Models
    • E37 - Macroeconomics and Monetary Economics - - Prices, Business Fluctuations, and Cycles - - - Forecasting and Simulation: Models and Applications

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:eee:dyncon:v:58:y:2015:i:c:p:265-273. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/locate/jedc .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.