AWS HPC Blog
How agent-based models powered by HPC are enabling large scale economic simulations
This post was contributed by J. Doyne Farmer, Institute of New Economic Thinking, Oxford University, Jagoda Kaszowska-Mojsa, Oxford University & Institute of Economics, Polish Academy of Sciences, Sam Bydlon, Senior Solutions Architect and Ilan Gleiser, Principal Machine Learning Specialist, WWSO Emerging Technologies, AWS
Economists and policy makers have maintained a sustained interest in understanding the effects of macroprudential economic policies. Recently, a novel approach using agent-based models has emerged, which provides insights into the complexity of these policies.
Agent-based models (ABM) are a type of computer simulation that has proven instrumental in shedding light on how different types of economic agents interact in a heterogeneous environment.
In this post, we will explore the use of agent-based models and high performance computing on AWS used by researchers at the University of Oxford’s Institute for New Economic Thinking (INET) to enhance our comprehension of macroprudential policies and their potential implications on economic systems.
Defining macroprudential policy
Public policies play a pivotal role as instruments used by governments and central banks to maintain financial stability and promote sustainable economic growth. In recent years, there has been a growing focus on a significant category of policies known as macroprudential policies.
At its core, macroprudential policy is centered around implementing measures that are designed to mitigate the risks and vulnerabilities that are inherent in a financial system. It focuses on the stability of a financial system as a whole, rather than addressing the concerns of individual institutions. Its main objective is to prevent the build-up of systemic risks, such as excessive credit growth, asset price bubbles, and excessive leverage. These risks have the potential to precipitate financial crises and macroprudential policy is oriented towards preventing such destabilizing events.
Traditionally, macroprudential policies have been put into practice through a range of instruments, such as capital adequacy requirements, loan-to-value ratio restrictions and countercyclical buffers. These policy tools are designed to mitigate risks by affecting the behavior of financial institutions, and to influence the decisions made by households and businesses.
The most used economic models have limitations when it comes to capturing the complexities of a financial system and the interactions among the various economic agents. This is where agent-based modeling steps in as a powerful tool. ABM is a simulation approach that enables economists to model the behavior of individual agents, such as banks, households, and firms and facilitates an examination of their interactions.
Using ABM, economists can simulate how different macroprudential policies impact the behavior of agents and the overall stability of a financial system. For example, they can investigate the effectiveness of different capital requirements on mitigating systemic risks or explore the consequences of changing loan-to-value ratios on housing markets.
An interesting case study that highlights the potential of ABM in understanding macroprudential policy is the work by Dr. Jagoda Kaszowska-Mojsa from the University of Oxford (INET) & the Institute of Economics, Polish Academy of Sciences. In her article titled “Macroprudential Policy in a Heterogeneous Environment: An Application of Agent-Based Approach in Systemic Risk Modelling1”, she used ABM to study the impact of different policy measures on the stability of a banking system. Through simulations, she showed how the heterogeneity of agents, and their interactions can affect the effectiveness of policy interventions.
Using ABM to analyze macroprudential policies offers several advantages. Firstly, it provides a more realistic representation of a financial system and economy by capturing the diversity of economic agents and their decision-making processes. Secondly, ABM enables us to analyze nonlinear and dynamic interactions, which are often difficult to capture in traditional models. Lastly, ABM can provide insights into the unintended consequences of policy interventions and help policy makers design more robust and effective measures.
Looking ahead, the use of ABM in understanding macroprudential policies holds significant potential.
“Agent based models are about to be the next technology revolution. In economics, we have shown2 how agent-based models can make better real-time (before the fact) predictions than standard models. This is just the tip of a large iceberg …”
Prof. J. Doyne Farmer, INET (Institute of New Economic Thinking), Oxford University
Limitations of economic models
The widely embraced economic models such as the Dynamic Stochastic General Equilibrium (DSGE) framework have also been used to assess the effects of macroprudential policies. However, these models still rely on the representative agent assumption, which assumes that all individuals in the economy behave in the same way. This assumption limits their ability to capture the diversity and complexity of economic agents in the real world. Efforts to integrate the heterogeneity of agents are currently in the early stages in most of the DSGE models, which primarily rely on stylized solutions. A case in point is the DSGE-3D model, which was developed and is used by the European Systemic Risk Board and the European Central Bank and has three layers of default (3D) that are aimed at scrutinizing the impact of macroprudential policies on the stability of financial systems3.
This is where Agent-Based Modelling (ABM) takes center stage. A large-scale, data-driven ABM presents a more realistic framework for comprehending the consequences of macroprudential policies. It empowers researchers to construct an environment that embraces the inherent diversity of economic agents by encompassing households, businesses, and financial institutions. By simulating the behaviors of these diverse agents, ABM can provide valuable insights into the intricate dynamics and interactions within a financial system and the broader economy.
Furthermore, agent-based modelling offers the ability to conduct counterfactual simulations, which is a valuable tool for assessing the impact of macroprudential policies on both a financial system and the broader economy. For instance, researchers can use ABM to simulate the consequences of various policy instruments, such as changes in capital requirements or loan-to-value ratios, on the stability of a financial system. This approach furnishes a more holistic comprehension of the potential impacts of these policies than is typically achievable within the conventional economic frameworks.
Furthermore, ABM can shed light on the stabilizing effects of macroprudential policies during economic or financial distress. For instance, the Basel III regulatory framework, which was adopted in 2010-2011, imposes stricter capital requirements for financial institutions that are designed to enhance their resilience. ABM helps to assess the effectiveness of such policies in mitigating systemic risks and preventing financial crises.
In summary, most of the economic models have limitations when it comes to capturing the diversity and complexity of economic agents. ABM offers a more realistic and comprehensive framework for understanding the impact of macroprudential policies, thereby enabling counterfactual simulations – and providing insights into the stability of a financial system.
An overview of agent-based modelling for simulating economics
Agent-based modelling (ABM) is an innovative approach that has gained increasing popularity in economics and policy research. Unlike most economic models that assume rational and homogeneous agents, ABM provides a more realistic representation of the complexity and diversity of economic agents in a system. In this section, we will provide an overview of ABM and its key features.
At its core, ABM is a simulation-based modelling approach that focuses on individual agents and their interactions within a system. These agents can represent a variety of economic actors, such as households, firms, and financial institutions. Each agent has its own set of characteristics, preferences, and decision-making processes, which are influenced by both internal and external factors.
The main advantage of ABM is its ability to capture emergent properties and complex interactions that are often overlooked by standard models. Rather than assuming linear relationships, ABM enables the modelling of nonlinear dynamics, feedback loops, and the amplification of shocks within a system. This enables economists to explore how small changes in individual behaviors can have significant implications for the overall stability and functioning of a system.
ABM also provides the versatility to accommodate varying degrees of agent heterogeneity. This implies that the agents within the model can possess diverse levels of knowledge, information, and decision-making rules. To illustrate, within a banking system, certain banks may exhibit a greater degree of risk aversion, while others may have a higher risk appetite. By capturing these nuanced distinctions, ABM enables researchers to investigate how different types of agents react to policy interventions and how their interactions shape the dynamics of a system.
To implement ABM, researchers typically use computer simulations. Simulating systems with the scale and complexity of the real world, however, requires a great deal of computing power. High performance computing services like those offered by Amazon Web Services (AWS) Advanced Computing Team offer the necessary power to run, calibrate, test, and validate complex ABM simulations in a cost-efficient manner.
Case study: the Polish economy: applying an ABM to macroprudential policy
Organizations like the Institute for New Economic Thinking (INET) have been at the forefront of promoting ABM and supporting research in this area. They provide resources, funding, and a platform for economists to share their findings and collaborate. This support has been instrumental in advancing the use of ABM for analyzing policies and has fostered innovation in the field.
One notable case study that showcases the application of ABM in this context is the study by Dr. Jagoda Kaszowska-Mojsa from the University of Oxford (INET) & the Institute of Economics, Polish Academy of Sciences. Recently, Dr. Kaszowska-Mojsa teamed up with the AWS Global Impact Compute team to scale ABMs that explore how the implementation of new macroprudential policies can impact financial stability while minimizing their contribution to societal inequality.
In this project (‘MACROPRU’), Dr. Kaszowska-Mojsa used state-of-the-art, large-scale, data-driven agent-based simulation techniques to uncover the redistributive consequences of macroprudential policies and evaluate the most advantageous combination of these policies. The findings from this project complemented the insights from the European Central Bank’s (ECB) system-wide stress-testing exercises by providing valuable data on the rise of inequality in European Union (EU) countries because of the adoption of new financial regulations. (That project secured funding from the European Union’s Horizon 2020 Research and Innovation Programme through a Marie Skłodowska-Curie grant (no 101023445)).
The MACROPRU model5 (outlined in Figure 1) is a distinctive economic framework that differentiates between heterogeneous economic agents: individuals that form households (consumers), versatile firms that operate across sectors, and banks within a financial sector.
This model stands apart from conventional economic approaches such as the Dynamic Stochastic General Equilibrium (DSGE) model due to its emphasis on the unique characteristics of the economic entities, which are derived from empirical data.
In the case of households, we calibrated their attributes and behaviors using data from the Eurosystem Household Finance and Consumption Survey (HFCS), from the European Central Bank (ECB). This data provides essential insights into how individuals and households function as consumers.
Although the model focuses on Poland as a small open economy, we could use it to simulate the economic scenarios in 22 different European countries where data is available (Eurozone, Poland, Hungary). A key aspect of the model is its ability to capture both the statistical equilibrium and disequilibrium states, thus shedding light on the internal forces that drive the economic and financial cycles.
The model is made up from 58 modules, each governing the interactions and behaviors of the agents. These modules consider various factors, such as production, the procurement of goods, the sources of finance, demographic dynamics, investment decisions, and intergenerational wealth transfers.
Additionally, the model is capable of simulating changes in employment scenarios that result from macroeconomic shifts and transformations in different sectors. Such transitions occur in a probabilistic manner, effectively representing the intricate nature of occupational shifts in interconnected networks.
The model also analyses the impact of macroprudential policies on income and wealth inequalities. It departs from the conventional money multiplier approach by recognizing banks as creators of money.
The use of Agent-Based Modelling (ABM) in this study offers valuable insights into how different policy measures could affect the stability of a financial system and individual agents, including their income and wealth. Policy makers can use this approach to assess the effectiveness of macroprudential policies and to make informed decisions to promote financial stability and sustainable economic growth. ABM emphasizes the importance of considering the heterogeneity of agents and their interactions when designing and implementing policies. By incorporating individual behaviors and feedback loops into the model, policy makers gain a more accurate understanding of how different policy measures could affect both the stability of a financial system and the well-being of individual agents.
ABM provides flexibility, which enables the simulation of various scenarios and the exploration of different policy interventions. This helps policy makers to identify any potential risks and vulnerabilities within a system and to devise appropriate measures to mitigate them.
AWS reference architecture
Jagoda worked with the AWS Emerging Technologies team, to design an architecture with several key advantages. AWS services like Amazon Relational Database Service (RDS), Amazon Elastic Container Service (ECS) on Amazon Elastic Compute Cloud (EC2), AWS Batch, and Amazon Simple Storage Service (S3) played a pivotal role in calibrating and validating the model, optimizing the simulations, ensuring data integrity, and enabling scalability. The cloud-based infrastructure depicted in Figure 2 enhances the model’s analytical abilities and promotes transparency and accessibility in accordance with modern research practices.
We harnessed all these services to streamline the entire process and to optimize its efficiency. Amazon RDS for PostgreSQL stored the essential input data, ensuring data integrity and accessibility. Containerizing the applications let us leverage the cloud’s elasticity, so it became possible to dynamically scale the resources when we needed. Store the output data and logs in comma-delimited CSV files and other text formats helped us adhere to the principles of the open data policy advocated by the European Commission.
These choices simplified our analysis using various econometric packages but also maintained compatibility with other AWS services, including ECS on Amazon EC2, AWS Batch and Amazon S3. This approach not only improved the simulation’s analytical abilities but it also promoted transparency and accessibility in accordance with modern research practices.
Dr. Kaszowska-Mojsa also leveraged AWS Batch processes to facilitate the calibration and Monte Carlo analysis of the model, which ultimately improved the accuracy of the simulations. These AWS services provided an ideal environment for conducting complex, compute-intensive agent-based simulations to assess the impact of macroprudential policies on both an economy and society. This approach ensured scalability, reliability, security, and seamless integration, aligning perfectly with the project’s requirements.
Running the MACROPRU simulation on the AWS cloud infrastructure also proved to be a cost-effective and efficient choice. The cloud environment made it easier to store data securely, but also permitted the parallel execution of the same simulation with different calibrations – this significantly expedited the research process. Moreover, the scalability offered by AWS, combined with the use of services like Amazon RDS, ECS on Amazon EC2, AWS Batch and Amazon S3, ensured that the simulation ran smoothly and efficiently.
The ability to achieve these results in a secure, fast, and cost-efficient way underscores the advantages of leveraging cloud computing in research project like ours.
Simulation results
Our simulation comprehensively considered all the macroprudential instruments that were outlined in the CRR/CRD IV directive and subsequent European legislation and aligned with the principles of Basel III.
Practical testing within this framework involves diverse calibrations, including Capital Adequacy Ratios (CAR), Liquidity Coverage Ratio (LCR), Leverage Ratio (LR), as well as Sectorial Requirements and Large Exposures (LE). We also incorporated national requirements – specifically the Financial Stability Authority recommendations – which encompassed Debt Service to Income (DSTI), Loan to Value (LTV), Debt to Income (DTI) and Debt to Assets (DTA).
Creditworthiness evaluation for individual entities or companies remained contingent on individual banks in the simulation, which resulted in varying requirements based on a bank’s market strategy and risk assessment. In extending our model’s capabilities, we could also analyze additional elements such as the Capital Conservation Buffer, specific Countercyclical Capital Buffer (CCB), Systemic Risk Buffer (SRB), Global Systemically Important Banks (G-SIB) buffer and the buffers for other Systemically Important Banks (the “D-SIB” buffer).
Figure 3 illustrates the main message of the MACROPRU project: an inappropriate combination and poor calibration of macroprudential tools result in significant adverse redistributive outcomes, which can potentially undermine the positive effects of other public policy instruments – like fiscal, monetary, or social policies – on both an economy and wider society.
An aside: In Poland, the Debt Service to Income Ratio (DSTI) is calculated by dividing the sum of annual liabilities by the sum of annual income and then multiplying the result by 100%. DSTI serves as a crucial measure of household indebtedness in Poland. Each bank is required to calculate DSTI when evaluating the creditworthiness of households and ensuring compliance with regulatory requirements, specifically Recommendation S.
To demonstrate the effects of our analysis, we performed two scenarios where we adjusted the calibration parameters for DSTI and LTV while keeping the official calibrations for other macroprudential instruments. This allowed us to isolate the impacts of changes to DSTI and LTV, which affect the creditworthiness of businesses and their access to credit.
In the first counterfactual scenario, tightening DSTI and LTV led to a deterioration in the financial positions of populations in the lower percentiles, especially those with limited loans, compared to the base scenario. We validated this against empirical data. Populations in the higher percentiles who were accessing loans were minimally impacted – underscoring the differentiated effect of macroprudential policy changes across different income spectrums.
In each scenario, we performed a distinct calibration of macroprudential instruments which let us evaluate changes in inequality using the simulation’s output data, based on wellbeing economic KPIs such as the Gini Coefficient.
Naturally, more complex analyses are feasible, including calculating any uni- or multi- dimensional inequality measures. We could also conduct a time-based analysis to examine how policies influence individual agents, sectors and markets, along with a comprehensive assessment of risk transmission between economic sectors.
The quantification of the effects is of utmost significance to policy makers, central bankers, and regulators who shoulder the responsibility of maintaining a resilient economy and for safeguarding the overall societal welfare. There’s more information about this on the home page for the project.
Potential future applications and developments
Agent-based modelling (ABM) has significant potential for improving our comprehension of macroprudential policies and their ramifications on the financial system, economy, and society. As researchers continue to explore and refine the approach, there are many future applications and developments that could further increase our understanding of public policies such as macroprudential policies, monetary policy, fiscal policy, environmental policy and other sectoral policies.
One potential application is the use of ABM to analyze the impact of macroprudential policies on the different sectors of an economy. Currently, most research is focused on the banking system, but there is also a need to understand how policies affect the housing market dynamics, consumer credit, Universal Basic Income, Circular Economy, climate adaptation and corporate lending. By expanding the scope of an analysis, policy makers can gain a more comprehensive understanding of the transmission channels and potential spillover effects of macroprudential policies.
Central bankers, regulators, and researchers may use DSGE and ABM models together in the future. This can address complex questions. It can also combine the strengths of each model type.
DSGE models are common for macroeconomics. But they have limits in showing diversity and change in finance. ABM models are better for this.
Using both models together gives more insights. Some central banks do this already. These include the Bank of England, Bank of Canada, Bank of Hungary, Bank of Spain, and Bank of Poland.
Furthermore, there is a pressing need for the increased real-world testing of ABM models. While ABM has shown its ability to capture the complexities of the financial system, we have to subject these models to rigorous testing using real-world data, validate them against stylized facts, and compare them to other economic models. This will help build confidence in ABMs and ensure their reliability and accuracy for policy analysis.
If you are a policy maker, business executive or financial services professional, please feel free to reach out to the AWS Emerging Technologies Computing team and we will help you get your ABM up and running on AWS.
Conclusion
The potential future applications and developments of ABM for understanding macroprudential policies are vast and as the complexity and scale of these models increases, AWS services like AWS Batch are well positioned to serve the needs of ABM developers and researchers.
By expanding the scope of analysis, integrating ABM with other modelling approaches, validating models with real-world data, and receiving support from organizations like INET, policy makers can benefit from a more comprehensive and nuanced understanding of macroprudential policy and its implications for a financial system. As we continue to refine and advance ABM, we expect to uncover new insights and approaches that will contribute to the design and implementation of effective macroprudential, monetary and fiscal policies.
The content and opinions in this blog are those of the third-party author and AWS is not responsible for the content or accuracy of this blog.
References
1 – Kaszowska-Mojsa, J., Pipień, M. 2020. Macroprudential Policy in a Heterogeneous Environment – An Application of Agent-Based Approach in Systemic Risk Modelling, Entropy, 22(2), p. 129.
2 – Pichler, A., Pangallo, M., del Rio-Chanona, R.M., Lafond, F. and Farmer, J.D., 2022. Forecasting the propagation of pandemic shocks with a dynamic input-output model. Journal of Economic Dynamics and Control, 144, p.104527.
3 – Clerc et al., 2015. Capital Regulation in a Macroeconomic Model with Three Layers of Default, International Journal of Central Banking, 11(3), p. 9-63.
4 – Kaszowska-Mojsa, J., Farmer, D., Bydlon, S., Gleiser, I., 2023. Cloud-Powered Insights: Unveiling the Effects of Macroprudential Policy in a Small Open Economy, available on: https://monetaristinheels.com/project
5 – Kaszowska-Mojsa, J., Farmer, J.D., Włodarczyk, P., 2023. The details of the model, available on: https://monetaristinheels.com/project
This research uses data from the Eurosystem Household Finance and Consumption Survey. The results published and the related observations and analysis may not correspond to results or analysis of the data producers.