IDEAS home Printed from https://ideas.repec.org/a/wly/quante/v16y2025i1p49-87.html
   My bibliography  Save this article

Programming FPGAs for economics: An introduction to electrical engineering economics

Author

Listed:
  • Bhagath Cheela
  • André DeHon
  • Jesús Fernández‐Villaverde
  • Alessandro Peri

Abstract

We show how to use field‐programmable gate arrays (FPGAs) and their associated high‐level synthesis (HLS) compilers to solve heterogeneous agent models with incomplete markets and aggregate uncertainty (Krusell and Smith (1998)). We document that the acceleration delivered by one single FPGA is comparable to that provided by using 69 CPU cores in a conventional cluster. The time to solve 1200 versions of the model drops from 8 hours to 7 minutes, illustrating a great potential for structural estimation. We describe how to achieve multiple acceleration opportunities—pipeline, data‐level parallelism, and data precision—with minimal modification of the C/C++ code written for a traditional sequential processor, which we then deploy on FPGAs easily available at Amazon Web Services. We quantify the speedup and cost of these accelerations. Our paper is the first step toward a new field, electrical engineering economics, focused on designing computational accelerators for economics to tackle challenging quantitative models. Replication code is available on Github.

Suggested Citation

  • Bhagath Cheela & André DeHon & Jesús Fernández‐Villaverde & Alessandro Peri, 2025. "Programming FPGAs for economics: An introduction to electrical engineering economics," Quantitative Economics, Econometric Society, vol. 16(1), pages 49-87, January.
  • Handle: RePEc:wly:quante:v:16:y:2025:i:1:p:49-87
    DOI: 10.3982/QE2344
    as

    Download full text from publisher

    File URL: https://doi.org/10.3982/QE2344
    Download Restriction: no

    File URL: https://libkey.io/10.3982/QE2344?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
    ---><---

    References listed on IDEAS

    as
    1. Den Haan, Wouter J. & Rendahl, Pontus, 2010. "Solving the incomplete markets model with aggregate uncertainty using explicit aggregation," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 69-78, January.
    2. Greg Kaplan & Benjamin Moll & Giovanni L. Violante, 2018. "Monetary Policy According to HANK," American Economic Review, American Economic Association, vol. 108(3), pages 697-743, March.
    3. Reiter, Michael, 2009. "Solving heterogeneous-agent models by projection and perturbation," Journal of Economic Dynamics and Control, Elsevier, vol. 33(3), pages 649-665, March.
    4. Thomas Winberry, 2018. "A method for solving and estimating heterogeneous agent macro models," Quantitative Economics, Econometric Society, vol. 9(3), pages 1123-1151, November.
    5. Maliar, Lilia & Maliar, Serguei & Valli, Fernando, 2010. "Solving the incomplete markets model with aggregate uncertainty using the Krusell-Smith algorithm," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 42-49, January.
    6. Algan, Yann & Allais, Olivier & Den Haan, Wouter J., 2008. "Solving heterogeneous-agent models with parameterized cross-sectional distributions," Journal of Economic Dynamics and Control, Elsevier, vol. 32(3), pages 875-908, March.
    7. Algan, Yann & Allais, Olivier & Den Haan, Wouter J., 2010. "Solving the incomplete markets model with aggregate uncertainty using parameterized cross-sectional distributions," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 59-68, January.
    8. Den Haan, Wouter J. & Judd, Kenneth L. & Juillard, Michel, 2011. "Computational suite of models with heterogeneous agents II: Multi-country real business cycle models," Journal of Economic Dynamics and Control, Elsevier, vol. 35(2), pages 175-177, February.
    9. Christian Bayer & Ralph Luetticke & Lien Pham‐Dao & Volker Tjaden, 2019. "Precautionary Savings, Illiquid Assets, and the Aggregate Consequences of Shocks to Household Income Risk," Econometrica, Econometric Society, vol. 87(1), pages 255-290, January.
    10. Johannes Brumm & Simon Scheidegger, 2017. "Using Adaptive Sparse Grids to Solve High‐Dimensional Dynamic Models," Econometrica, Econometric Society, vol. 85, pages 1575-1612, September.
    11. 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.
    12. Den Haan, Wouter J., 2010. "Comparison of solutions to the incomplete markets model with aggregate uncertainty," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 4-27, January.
    13. Anmol Bhandari & David Evans & Mikhail Golosov & Thomas J. Sargent, 2017. "Fiscal Policy and Debt Management with Incomplete Markets," The Quarterly Journal of Economics, President and Fellows of Harvard College, vol. 132(2), pages 617-663.
    14. repec:hal:spmain:info:hdl:2441/72lkhuq5cm8hqrn860asm92bvs is not listed on IDEAS
    15. repec:hal:spmain:info:hdl:2441/41rhqgovpp8hnq9i7ndtl26ltm is not listed on IDEAS
    16. repec:spo:wpmain:info:hdl:2441/72lkhuq5cm8hqrn860asm92bvs is not listed on IDEAS
    17. Reiter, Michael, 2010. "Solving the incomplete markets model with aggregate uncertainty by backward induction," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 28-35, January.
    18. Den Haan, Wouter J. & Judd, Kenneth L. & Juillard, Michel, 2010. "Computational suite of models with heterogeneous agents: Incomplete markets and aggregate uncertainty," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 1-3, January.
    19. Per Krusell & Anthony A. Smith & Jr., 1998. "Income and Wealth Heterogeneity in the Macroeconomy," Journal of Political Economy, University of Chicago Press, vol. 106(5), pages 867-896, October.
    20. Bayer, Christian & Luetticke, Ralph, 2018. "Solving heterogeneous agent models in discrete time with many idiosyncratic states by perturbation methods," CEPR Discussion Papers 13071, C.E.P.R. Discussion Papers.
    21. Young, Eric R., 2010. "Solving the incomplete markets model with aggregate uncertainty using the Krusell-Smith algorithm and non-stochastic simulations," Journal of Economic Dynamics and Control, Elsevier, vol. 34(1), pages 36-41, January.
    22. Peri, Alessandro, 2020. "A hardware approach to value function iteration," Journal of Economic Dynamics and Control, Elsevier, vol. 114(C).
    23. repec:spo:wpmain:info:hdl:2441/41rhqgovpp8hnq9i7ndtl26ltm is not listed on IDEAS
    24. Mertens, Thomas M. & Judd, Kenneth L., 2018. "Solving an incomplete markets model with a large cross-section of agents," Journal of Economic Dynamics and Control, Elsevier, vol. 91(C), pages 349-368.
    Full references (including those not matched with items on IDEAS)

    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. Takeki Sunakawa, 2020. "Applying the Explicit Aggregation Algorithm to Heterogeneous Macro Models," Computational Economics, Springer;Society for Computational Economics, vol. 55(3), pages 845-874, March.
    2. Jesús Fernández‐Villaverde & Samuel Hurtado & Galo Nuño, 2023. "Financial Frictions and the Wealth Distribution," Econometrica, Econometric Society, vol. 91(3), pages 869-901, May.
    3. Adrien Auclert & Bence Bardóczy & Matthew Rognlie & Ludwig Straub, 2021. "Using the Sequence‐Space Jacobian to Solve and Estimate Heterogeneous‐Agent Models," Econometrica, Econometric Society, vol. 89(5), pages 2375-2408, September.
    4. Karsten O. Chipeniuk, 2020. "Optimal Grid Selection for the Numerical Solution of Dynamic Stochastic Optimization Problems," Computational Economics, Springer;Society for Computational Economics, vol. 56(4), pages 883-928, December.
    5. Chipeniuk, Karsten O. & Katz, Nets Hawk & Walker, Todd B., 2022. "Households, auctioneers, and aggregation," European Economic Review, Elsevier, vol. 141(C).
    6. Emoto, Masakazu & Sunakawa, Takeki, 2021. "Applying the explicit aggregation algorithm to heterogeneous agent models in continuous time," Economics Letters, Elsevier, vol. 206(C).
    7. Christian Bayer & Ralph Luetticke, 2020. "Solving discrete time heterogeneous agent models with aggregate risk and many idiosyncratic states by perturbation," Quantitative Economics, Econometric Society, vol. 11(4), pages 1253-1288, November.
    8. Gouin-Bonenfant, Emilien & Toda, Alexis Akira, 2018. "Pareto Extrapolation: Bridging Theoretical and Quantitative Models of Wealth Inequality," University of California at San Diego, Economics Working Paper Series qt90n2h2bb, Department of Economics, UC San Diego.
    9. Michael C. Hatcher & Eric M. Scheffel, 2016. "Solving the Incomplete Markets Model in Parallel Using GPU Computing and the Krusell–Smith Algorithm," Computational Economics, Springer;Society for Computational Economics, vol. 48(4), pages 569-591, December.
    10. Karsten O. Chipeniuk & Nets Hawk Katz & Todd Bruce Walker, 2022. "Households, Auctioneers, and Aggregation," CAEPR Working Papers 2022-005 Classification-E, Center for Applied Economics and Policy Research, Department of Economics, Indiana University Bloomington.
    11. SeHyoun Ahn & Greg Kaplan & Benjamin Moll & Thomas Winberry & Christian Wolf, 2018. "When Inequality Matters for Macro and Macro Matters for Inequality," NBER Macroeconomics Annual, University of Chicago Press, vol. 32(1), pages 1-75.
    12. Grey Gordon, 2020. "Computing Dynamic Heterogeneous-Agent Economies: Tracking the Distribution," Economic Quarterly, Federal Reserve Bank of Richmond, issue 2Q, pages 61-95.
    13. 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.
    14. Ralph Luetticke, 2021. "Transmission of Monetary Policy with Heterogeneity in Household Portfolios," American Economic Journal: Macroeconomics, American Economic Association, vol. 13(2), pages 1-25, April.
    15. Kase, Hanno & Melosi, Leonardo & Rottner, Matthias, 2022. "Estimating Nonlinear Heterogeneous Agents Models with Neural Networks," CEPR Discussion Papers 17391, C.E.P.R. Discussion Papers.
    16. Heejeong Kim, 2022. "Inequality, Disaster risk, and the Great Recession," Review of Economic Dynamics, Elsevier for the Society for Economic Dynamics, vol. 45, pages 187-216, July.
    17. Papp, Tamás K. & Reiter, Michael, 2020. "Estimating linearized heterogeneous agent models using panel data," Journal of Economic Dynamics and Control, Elsevier, vol. 115(C).
    18. Ivo Bakota, 2023. "Market Clearing and Krusell-Smith Algorithm in an Economy with Multiple Assets," Computational Economics, Springer;Society for Computational Economics, vol. 62(3), pages 1007-1045, October.
    19. Muffasir Badshah & Paul Beaumont & Anuj Srivastava, 2013. "Computing Equilibrium Wealth Distributions in Models with Heterogeneous-Agents, Incomplete Markets and Idiosyncratic Risk," Computational Economics, Springer;Society for Computational Economics, vol. 41(2), pages 171-193, February.
    20. Marlon Azinovic & Luca Gaegauf & Simon Scheidegger, 2022. "Deep Equilibrium Nets," International Economic Review, Department of Economics, University of Pennsylvania and Osaka University Institute of Social and Economic Research Association, vol. 63(4), pages 1471-1525, November.

    More about this item

    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:wly:quante:v:16:y:2025:i:1:p:49-87. 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: Wiley Content Delivery (email available below). General contact details of provider: https://edirc.repec.org/data/essssea.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.