Srovnávací analýza Dynare v MATLABu a Pythonu: Posouzení možností a omezení Pythonu pro modelování DSGE
Date issued
2024
Journal Title
Journal ISSN
Volume Title
Publisher
Západočeská univerzita v Plzni
Abstract
Tento článek se zaměřuje na lidskou zájem předpovídat budoucí ekonomické události a roli moderních ekonomických modelů v tomto úsilí. Historicky se ekonomické modelování opíralo o popisné metody a analýzu historických dat, avšak s rostoucí komplexností ekonomik se ukázaly limity těchto přístupů. V reakci na to se objevily strukturální ekonomické modely (SEM) a dynamické stochastické modely obecné rovnováhy (DSGE), které se staly klíčovými nástroji pro pochopení makroekonomických jevů.Tento článek zkoumá, zda Python, podporovaný velkou komunitou vývojářů open source, může konkurovat zavedenému nástroji Dynare v prostředí MATLAB pro modelování DSGE. Python je široce oceňován pro svou univerzálnost a uživatelsky přívětivé prostředí, což přispělo k jeho rostoucí popularitě v oblasti ekonomie a financí. Jeho open-source charakter ho také činí dostupným pro širší publikum. Naopak MATLAB vyžaduje placenou licenci, což může být pro mnoho uživatelů omezující faktor. Přestože Octave existuje jako bezplatná alternativa, postrádá výpočetní efektivitu a robustnost MATLABu.Naše srovnání ukázalo, že zatímco Python, konkrétně knihovna DSGEpy (Amarante, 2019), inspirovaná Dynarem, v současnosti nedosahuje výpočetní rychlosti a přesnosti Dynare v MATLABu, nabízí intuitivnější a flexibilnější prostředí pro začátečníky. Open-source rámec Pythonu rovněž umožňuje přizpůsobení a budoucí vývoj, což poskytuje příležitosti nadšencům stavět na existujících knihovnách a časem konkurovat tradičnějším nástrojům, jako je Dynare. Python se tak může stát preferovanou volbou pro ty, kteří začínají s ekonomickým modelováním, zatímco MATLAB zůstává lepší volbou pro potřeby s vysokým výkonem.
This article focuses on the human desire to predict future economic events and the role of modern economic models in this endeavor. Historically, economic modeling relied on descriptive methods and analysis of historical data, but as economies became more complex, these approaches revealed their limitations. In response, structural economic models (SEMs) and dynamic stochastic general equilibrium (DSGE) models emerged, becoming essential tools for understanding macroeconomic phenomena.This paper investigates whether Python, supported by a large open-source developer community, can compete with the established Dynare tool in MATLAB for DSGE modeling. Python is widely praised for its versatility and user-friendly environment, which has contributed to its growing popularity in economics and finance. Its open-source nature also makes it accessible to a broader audience. In contrast, MATLAB requires a paid license, which can be a limiting factor for many users. While Octave exists as a free alternative, it lacks the computational efficiency and robustness of MATLAB.Our comparison found that while Python, specifically DSGEpy library (Amarante, 2019) (inspired by Dynare), currently cannot match the computational speed and precision of Dynare in MATLAB, it offers a more intuitive and flexible environment for beginners. Python’s open-source framework also allows for customization and future development, providing opportunities for enthusiasts to build on existing libraries and eventually rival more traditional tools like Dynare. Thus, Python may be the preferred choice for those starting in economic modeling, while MATLAB remains a better option for high-performance needs.
This article focuses on the human desire to predict future economic events and the role of modern economic models in this endeavor. Historically, economic modeling relied on descriptive methods and analysis of historical data, but as economies became more complex, these approaches revealed their limitations. In response, structural economic models (SEMs) and dynamic stochastic general equilibrium (DSGE) models emerged, becoming essential tools for understanding macroeconomic phenomena.This paper investigates whether Python, supported by a large open-source developer community, can compete with the established Dynare tool in MATLAB for DSGE modeling. Python is widely praised for its versatility and user-friendly environment, which has contributed to its growing popularity in economics and finance. Its open-source nature also makes it accessible to a broader audience. In contrast, MATLAB requires a paid license, which can be a limiting factor for many users. While Octave exists as a free alternative, it lacks the computational efficiency and robustness of MATLAB.Our comparison found that while Python, specifically DSGEpy library (Amarante, 2019) (inspired by Dynare), currently cannot match the computational speed and precision of Dynare in MATLAB, it offers a more intuitive and flexible environment for beginners. Python’s open-source framework also allows for customization and future development, providing opportunities for enthusiasts to build on existing libraries and eventually rival more traditional tools like Dynare. Thus, Python may be the preferred choice for those starting in economic modeling, while MATLAB remains a better option for high-performance needs.
Description
Subject(s)
DSGE, Dynare, MATLAB, Python, DSGEpy, DSGE, Dynare, MATLAB, Python, DSGEpy