IDEAS home Printed from https://ideas.repec.org/p/nbr/nberwo/24561.html
   My bibliography  Save this paper

A Practical Guide to Parallelization in Economics

Author

Listed:
  • Jesús Fernández-Villaverde
  • David Zarruk Valencia

Abstract

This guide provides a practical introduction to parallel computing in economics. After a brief introduction to the basic ideas of parallelization, we show how to parallelize a prototypical application in economics using, on CPUs, Julia, Matlab, R, Python, C++-OpenMP, Rcpp–OpenMP, and C++-MPI, and, on GPUs, CUDA and OpenACC. We provide code that the user can download and fork, present comparative results, and explain the strengths and weaknesses of each approach. We conclude with some additional remarks about alternative approaches.

Suggested Citation

  • Jesús Fernández-Villaverde & David Zarruk Valencia, 2018. "A Practical Guide to Parallelization in Economics," NBER Working Papers 24561, National Bureau of Economic Research, Inc.
  • Handle: RePEc:nbr:nberwo:24561
    Note: EFG
    as

    Download full text from publisher

    File URL: http://www.nber.org/papers/w24561.pdf
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. 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.
    2. Fernández-Villaverde, Jesús & Krueger, Dirk, 2011. "Consumption And Saving Over The Life Cycle: How Important Are Consumer Durables?," Macroeconomic Dynamics, Cambridge University Press, vol. 15(5), pages 725-770, November.
    3. Joao F. Cocco, 2005. "Consumption and Portfolio Choice over the Life Cycle," The Review of Financial Studies, Society for Financial Studies, vol. 18(2), pages 491-533.
    4. repec:dau:papers:123456789/1908 is not listed on IDEAS
    5. Yoram Ben-Porath, 1967. "The Production of Human Capital and the Life Cycle of Earnings," Journal of Political Economy, University of Chicago Press, vol. 75(4), pages 352-352.
    6. Juan C. Conesa & Dirk Krueger, 1999. "Social Security Reform with Heterogeneous Agents," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 2(4), pages 757-795, October.
    7. Gourieroux, Christian & Monfort, Alain, 1997. "Simulation-based Econometric Methods," OUP Catalogue, Oxford University Press, number 9780198774754.
    8. Aldrich, EM, 2014. "GPU Computing in Economics," Santa Cruz Department of Economics, Working Paper Series qt8p12748g, Department of Economics, UC Santa Cruz.
    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. Chase Coleman & Spencer Lyon & Lilia Maliar & Serguei Maliar, 2021. "Matlab, Python, Julia: What to Choose in Economics?," Computational Economics, Springer;Society for Computational Economics, vol. 58(4), pages 1263-1288, December.
    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. Yasuo Hirose & Takeki Sunakawa, 2019. "Review of Solution and Estimation Methods for Nonlinear Dynamic Stochastic General Equilibrium Models with the Zero Lower Bound," The Japanese Economic Review, Springer, vol. 70(1), pages 51-104, March.
    4. Bluhm, Benjamin & Cutura, Jannic, 2020. "Econometrics at scale: Spark up big data in economics," SAFE Working Paper Series 266, Leibniz Institute for Financial Research SAFE.
    5. Jesus Fernandez-Villaverde, 2020. "Simple Rules for a Complex World with Arti?cial Intelligence," PIER Working Paper Archive 20-010, Penn Institute for Economic Research, Department of Economics, University of Pennsylvania.
    6. Jesús Fernández-Villaverde & Pablo A. Guerrón-Quintana, 2021. "Estimating DSGE Models: Recent Advances and Future Challenges," Annual Review of Economics, Annual Reviews, vol. 13(1), pages 229-252, August.
    7. Julien Albertini & Stéphane Moyen, 2020. "A General and Efficient Method for Solving Regime-Switching DSGE Models," Working Papers 2035, Groupe d'Analyse et de Théorie Economique Lyon St-Étienne (GATE Lyon St-Étienne), Université de Lyon.
    8. 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.
    9. Aur'elien Ouattara & Matthieu Bult'e & Wan-Ju Lin & Philipp Scholl & Benedikt Veit & Christos Ziakas & Florian Felice & Julien Virlogeux & George Dikos, 2021. "Scalable Econometrics on Big Data -- The Logistic Regression on Spark," Papers 2106.10341, arXiv.org.
    10. Peri, Alessandro, 2020. "A hardware approach to value function iteration," Journal of Economic Dynamics and Control, Elsevier, vol. 114(C).
    11. 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).
    12. Jeppe Druedahl, 2021. "A Guide on Solving Non-convex Consumption-Saving Models," Computational Economics, Springer;Society for Computational Economics, vol. 58(3), pages 747-775, October.

    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. Daniel Harenberg & Alexander Ludwig, 2019. "Idiosyncratic Risk, Aggregate Risk, And The Welfare Effects Of Social Security," International Economic Review, Department of Economics, University of Pennsylvania and Osaka University Institute of Social and Economic Research Association, vol. 60(2), pages 661-692, May.
    2. Kraft, Holger & Munk, Claus & Seifried, Frank Thomas & Steffensen, Mogens, 2014. "Consumption and wage humps in a life-cycle model with education," SAFE Working Paper Series 53, Leibniz Institute for Financial Research SAFE.
    3. Aydilek, Asiye, 2016. "The allocation of time and puzzling profiles of the elderly," Economic Modelling, Elsevier, vol. 53(C), pages 515-526.
    4. Julián Díaz-Saavedra & Ramon Marimon & João Brogueira de, 2023. "A Worker’s Backpack as an Alternative to PAYG Pension Systems," Journal of the European Economic Association, European Economic Association, vol. 21(5), pages 1944-1993.
    5. Thakurata, Indrajit & D'Souza, Errol, 2018. "Child labour and human capital in developing countries - A multi-period stochastic model," Economic Modelling, Elsevier, vol. 69(C), pages 67-81.
    6. Claudio Campanale, 2007. "Increasing Returns to Savings and Wealth Inequality," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 10(4), pages 646-675, October.
    7. Roberto Casarin & Stefano Grassi & Francesco Ravazzolo & Herman K. van Dijk, 2020. "A Bayesian Dynamic Compositional Model for Large Density Combinations in Finance," Working Paper series 20-27, Rimini Centre for Economic Analysis.
    8. He, Hui, 2012. "What drives the skill premium: Technological change or demographic variation?," European Economic Review, Elsevier, vol. 56(8), pages 1546-1572.
    9. Hui He & Zheng Liu, 2008. "Investment-Specific Technological Change, Skill Accumulation, and Wage Inequality," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 11(2), pages 314-334, April.
    10. Daniel Harenberg & Alexander Ludwig, "undated". "Social Security and the Interactions Between Aggregate and Idiosyncratic Risk," Working Papers ETH-RC-14-002, ETH Zurich, Chair of Systems Design.
    11. Zhang, Linwan & Wu, Weixing & Wei, Ying & Pan, Rulu, 2015. "Stock holdings over the life cycle: Who hesitates to join the market?," Economic Systems, Elsevier, vol. 39(3), pages 423-438.
    12. Huggett, Mark & Ventura, Gustavo & Yaron, Amir, 2006. "Human capital and earnings distribution dynamics," Journal of Monetary Economics, Elsevier, vol. 53(2), pages 265-290, March.
    13. Hans Fehr, 2009. "Computable Stochastic Equilibrium Models and Their Use in Pension- and Ageing Research," De Economist, Springer, vol. 157(4), pages 359-416, December.
    14. Annamaria Lusardi & Pierre-Carl Michaud & Olivia S. Mitchell, 2017. "Optimal Financial Knowledge and Wealth Inequality," Journal of Political Economy, University of Chicago Press, vol. 125(2), pages 431-477.
    15. Kartik Athreya & Felicia Ionescu & Urvi Neelakantan, 2023. "Stock Market Participation: The Role of Human Capital," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 47, pages 1-18, January.
    16. Roberto Casarin & Stefano Grassi & Francesco Ravazzolo & Herman K. van Dijk, 2015. "Dynamic predictive density combinations for large data sets in economics and finance," Working Paper 2015/12, Norges Bank.
    17. Heathcote, Jonathan & Storesletten, Kjetil & Violante, Giovanni L., 2020. "Optimal progressivity with age-dependent taxation," Journal of Public Economics, Elsevier, vol. 189(C).
    18. Krueger, Dirk & Jeske, Karsten & Mitman, Kurt, 2011. "Housing and the Macroeconomy: The Role of Bailout Guarantees for Government Sponsored Enterprises," CEPR Discussion Papers 8624, C.E.P.R. Discussion Papers.
    19. Nalan Baştürk & Stefano Grassi & Lennart Hoogerheide & Herman K. Van Dijk, 2016. "Parallelization Experience with Four Canonical Econometric Models Using ParMitISEM," Econometrics, MDPI, vol. 4(1), pages 1-20, March.
    20. Christian Jaag, 2005. "The Role of Endogenous Skill Choice in an Aging Economy," Public Economics 0505005, University Library of Munich, Germany.

    More about this item

    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

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:nbr:nberwo:24561. 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: the person in charge (email available below). General contact details of provider: https://edirc.repec.org/data/nberrus.html .

    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.