SearcharxivSearch

arXiv subjects

Marco Pangallo

Publications and source records attributed to Marco Pangallo.

At least 19 recordsLinked to original sources

Machine Spirits: Speculation and Adaptation of LLM Agents in Asset Markets

As Large Language Models (LLMs) become increasingly integrated into financial systems, understanding their behavioural properties is crucial. Do LLMs conform to the rational expectations paradigm, do they exhibit human-like "animal spirits", or do they instead manifest distinct "machine spirits"? We investigate these questions with a simulated financial market, exploring the behaviour of 15 LLMs spanning a range of sizes, capabilities, and providers. Our results show that LLMs exhibit a spectrum of economic behaviours, from stable coordination on the fundamental value to human-like speculative bubbles. These behaviours are generally inconsistent with the rational expectations hypothesis. We also consider an ecology of heterogeneous agents, a more realistic setting compared to markets with identical LLM agents. These mixed markets can produce outcomes which vary substantially across repeated simulations. Even the most advanced models fail to consistently stabilise the market, with price bubbles sometimes forming despite only a minority of agents naturally forming bubbles. Instead, advanced models in mixed markets adapt their forecasting strategies to the behaviour of other agents. This adaptation can allow them to successfully exploit less sophisticated counterparts and achieve higher profits, but can also contribute to increased market volatility. These findings suggest that the introduction of AI agents into financial markets fundamentally reshapes their ecology. In particular, heterogeneous populations of LLMs can generate endogenous instability, while individual-level adaptation may amplify, rather than mitigate, market volatility.

q-fin.TR

Population synthesis with geographic coordinates

It is increasingly important to generate synthetic populations with explicit coordinates rather than coarse geographic areas, yet no established methods exist to achieve this. One reason is that latitude and longitude differ from other continuous variables, exhibiting large empty spaces and highly uneven densities. To address this, we propose a population synthesis algorithm that first maps spatial coordinates into a more regular latent space using Normalizing Flows (NF), and then combines them with other features in a Variational Autoencoder (VAE) to generate synthetic populations. This approach also learns the joint distribution between spatial and non-spatial features, exploiting spatial autocorrelations. We demonstrate the method by generating synthetic homes with the same statistical properties of real homes in 121 datasets, corresponding to diverse geographies. We further propose an evaluation framework that measures both spatial accuracy and practical utility, while ensuring privacy preservation. Our results show that the NF+VAE architecture outperforms popular benchmarks, including copula-based methods and uniform allocation within geographic areas. The ability to generate geolocated synthetic populations at fine spatial resolution opens the door to applications requiring detailed geography, from household responses to floods, to epidemic spread, evacuation planning, and transport modeling.

cs.LG

Comparing Data Assimilation and Likelihood-Based Inference on Latent State Estimation in Agent-Based Models

In this paper, we present the first systematic comparison of Data Assimilation (DA) and Likelihood-Based Inference (LBI) in the context of an Agent-Based Model (ABM). These models generate observable time series driven by evolving, partially-latent microstates. Latent states must be estimated to align simulations with real-world data, a task traditionally addressed by DA, particularly in continuous and equation-based models used in weather forecasting. However, the nature of ABMs poses challenges for standard DA methods. Solving such issues requires adapting previous DA techniques or using ad hoc alternatives such as LBI. DA approximates the likelihood in a model-agnostic way, making it broadly applicable but potentially less precise. In contrast, LBI provides more accurate state estimation by directly leveraging the model's likelihood, but at the cost of requiring a hand-crafted, model-specific likelihood function, which may be complex or infeasible to derive. We compare the two methods on the Bounded-Confidence Model, a well-known opinion dynamics ABM, where agents are affected only by others holding sufficiently similar opinions. We find that LBI better recovers latent agent-level opinions, even under model mis-specification, leading to improved individual-level forecasts. At the aggregate level, however, both methods perform comparably, and DA remains competitive across levels of aggregation under certain parameter settings. Our findings suggest that DA is well-suited for aggregate predictions, while LBI is preferable for agent-level inference.

cs.LG

Statistical Model Checking of NetLogo Models

Agent-based models (ABMs) are gaining increasing traction in several domains, due to their ability to represent complex systems that are not easily expressible with classical mathematical models. This expressivity and richness come at a cost: ABMs can typically be analyzed only through simulation, making their analysis challenging. Specifically, when studying the output of ABMs, the analyst is often confronted with practical questions such as: (i) how many independent replications should be run? (ii) how many initial time steps should be discarded as a warm-up? (iii) after the warm-up, how long should the model run? (iv) what are the right parameter values? Analysts usually resort to rules of thumb and experimentation, which lack statistical rigor. This is mainly because addressing these points takes time, and analysts prefer to spend their limited time improving the model. In this paper, we propose a methodology, drawing on the field of Statistical Model Checking, to automate the process and provide guarantees of statistical rigor for ABMs written in NetLogo, one of the most popular ABM platforms. We discuss MultiVeStA, a tool that dramatically reduces the time and human intervention needed to run statistically rigorous checks on ABM outputs, and introduce its integration with NetLogo. Using two ABMs from the NetLogo library, we showcase MultiVeStA's analysis capabilities for NetLogo ABMs, as well as a novel application to statistically rigorous calibration. Our tool-chain makes it immediate to perform statistical checks with NetLogo models, promoting more rigorous and reliable analyses of ABM outputs.

cs.MA

Learning Individual Behavior in Agent-Based Models with Graph Diffusion Networks

Agent-Based Models (ABMs) are powerful tools for studying emergent properties in complex systems. In ABMs, agent behaviors are governed by local interactions and stochastic rules. However, these rules are, in general, non-differentiable, limiting the use of gradient-based methods for optimization, and thus integration with real-world data. We propose a novel framework to learn a differentiable surrogate of any ABM by observing its generated data. Our method combines diffusion models to capture behavioral stochasticity and graph neural networks to model agent interactions. Distinct from prior surrogate approaches, our method introduces a fundamental shift: rather than approximating system-level outputs, it models individual agent behavior directly, preserving the decentralized, bottom-up dynamics that define ABMs. We validate our approach on two ABMs (Schelling's segregation model and a Predator-Prey ecosystem) showing that it replicates individual-level patterns and accurately forecasts emergent dynamics beyond training. Our results demonstrate the potential of combining diffusion models and graph learning for data-driven ABM simulation.

cs.AI

Can Generative AI agents behave like humans? Evidence from laboratory market experiments

We explore the potential of Large Language Models (LLMs) to replicate human behavior in economic market experiments. Compared to previous studies, we focus on dynamic feedback between LLM agents: the decisions of each LLM impact the market price at the current step, and so affect the decisions of the other LLMs at the next step. We compare LLM behavior to market dynamics observed in laboratory settings and assess their alignment with human participants' behavior. Our findings indicate that LLMs do not adhere strictly to rational expectations, displaying instead bounded rationality, similarly to human participants. Providing a minimal context window i.e. memory of three previous time steps, combined with a high variability setting capturing response heterogeneity, allows LLMs to replicate broad trends seen in human experiments, such as the distinction between positive and negative feedback markets. However, differences remain at a granular level--LLMs exhibit less heterogeneity in behavior than humans. These results suggest that LLMs hold promise as tools for simulating realistic human behavior in economic contexts, though further research is needed to refine their accuracy and increase behavioral diversity.

econ.GN

Floods do not sink prices, historical memory does: How flood risk impacts the Italian housing market

Do home prices incorporate flood risk in the immediate aftermath of specific flood events, or is it the repeated exposure over the years that plays a more significant role? We address this question through the first systematic study of the Italian housing market, which is an ideal case study because it is highly exposed to floods, though unevenly distributed across the national territory. Using a novel dataset containing about 550,000 mortgage-financed transactions between 2016 and 2024, as well as hedonic regressions and a difference-in-difference design, we find that: (i) specific floods do not decrease home prices in areas at risk; (ii) the repeated exposure to floods in flood-prone areas leads to a price decline, up to 4\% in the most frequently flooded regions; (iii) responses are heterogeneous by buyers' income and age. Young buyers (with limited exposure to prior floods) do not obtain any price reduction for settling in risky areas, while experienced buyers do. At the same time, buyers who settle in risky areas have lower incomes than buyers in safe areas in the most affected regions. Our results emphasize the importance of cultural and institutional factors in understanding how flood risk affects the housing market and socioeconomic outcomes.

econ.GN

Data-Driven Economic Agent-Based Models

Economic agent-based models (ABMs) are becoming more and more data-driven, establishing themselves as increasingly valuable tools for economic research and policymaking. We propose to classify the extent to which an ABM is data-driven based on whether agent-level quantities are initialized from real-world micro-data and whether the ABM's dynamics track empirical time series. This paper discusses how making ABMs data-driven helps overcome limitations of traditional ABMs and makes ABMs a stronger alternative to equilibrium models. We review state-of-the-art methods in parameter calibration, initialization, and data assimilation, and then present successful applications that have generated new scientific knowledge and informed policy decisions. This paper serves as a manifesto for data-driven ABMs, introducing a definition and classification and outlining the state of the field, and as a guide for those new to the field.

econ.GN

Forecasting Macroeconomic Dynamics using a Calibrated Data-Driven Agent-based Model

In the last few years, economic agent-based models have made the transition from qualitative models calibrated to match stylised facts to quantitative models for time series forecasting, and in some cases, their predictions have performed as well or better than those of standard models (see, e.g. Poledna et al. (2023a); Hommes et al. (2022); Pichler et al. (2022)). Here, we build on the model of Poledna et al., adding several new features such as housing markets, realistic synthetic populations of individuals with income, wealth and consumption heterogeneity, enhanced behavioural rules and market mechanisms, and an enhanced credit market. We calibrate our model for all 38 OECD member countries using state-of-the-art approximate Bayesian inference methods and test it by making out-of-sample forecasts. It outperforms both the Poledna and AR(1) time series models by a highly statistically significant margin. Our model is built within a platform we have developed, making it easy to build, run, and evaluate alternative models, which we hope will encourage future work in this area.

econ.GN

The unequal effects of the health-economy tradeoff during the COVID-19 pandemic

The potential tradeoff between health outcomes and economic impact has been a major challenge in the policy making process during the COVID-19 pandemic. Epidemic-economic models designed to address this issue are either too aggregate to consider heterogeneous outcomes across socio-economic groups, or, when sufficiently fine-grained, not well grounded by empirical data. To fill this gap, we introduce a data-driven, granular, agent-based model that simulates epidemic and economic outcomes across industries, occupations, and income levels with geographic realism. The key mechanism coupling the epidemic and economic modules is the reduction in consumption demand due to fear of infection. We calibrate the model to the first wave of COVID-19 in the New York metropolitan area, showing that it reproduces key epidemic and economic statistics, and then examine counterfactual scenarios. We find that: (a) both high fear of infection and strict restrictions similarly harm the economy but reduce infections; (b) low-income workers bear the brunt of both the economic and epidemic harm; (c) closing non-customer-facing industries such as manufacturing and construction only marginally reduces the death toll while considerably increasing unemployment; and (d) delaying the start of protective measures does little to help the economy and worsens epidemic outcomes in all scenarios. We anticipate that our model will help designing effective and equitable non-pharmaceutical interventions that minimize disruptions in the face of a novel pandemic.

econ.GN

On learning agent-based models from data

Agent-Based Models (ABMs) are used in several fields to study the evolution of complex systems from micro-level assumptions. However, ABMs typically can not estimate agent-specific (or "micro") variables: this is a major limitation which prevents ABMs from harnessing micro-level data availability and which greatly limits their predictive power. In this paper, we propose a protocol to learn the latent micro-variables of an ABM from data. The first step of our protocol is to reduce an ABM to a probabilistic model, characterized by a computationally tractable likelihood. This reduction follows two general design principles: balance of stochasticity and data availability, and replacement of unobservable discrete choices with differentiable approximations. Then, our protocol proceeds by maximizing the likelihood of the latent variables via a gradient-based expectation maximization algorithm. We demonstrate our protocol by applying it to an ABM of the housing market, in which agents with different incomes bid higher prices to live in high-income neighborhoods. We demonstrate that the obtained model allows accurate estimates of the latent variables, while preserving the general behavior of the ABM. We also show that our estimates can be used for out-of-sample forecasting. Our protocol can be seen as an alternative to black-box data assimilation methods, that forces the modeler to lay bare the assumptions of the model, to think about the inferential process, and to spot potential identification problems.

physics.soc-ph

Best-response dynamics, playing sequences, and convergence to equilibrium in random games

We analyze the performance of the best-response dynamic across all normal-form games using a random games approach. The playing sequence -- the order in which players update their actions -- is essentially irrelevant in determining whether the dynamic converges to a Nash equilibrium in certain classes of games (e.g. in potential games) but, when evaluated across all possible games, convergence to equilibrium depends on the playing sequence in an extreme way. Our main asymptotic result shows that the best-response dynamic converges to a pure Nash equilibrium in a vanishingly small fraction of all (large) games when players take turns according to a fixed cyclic order. By contrast, when the playing sequence is random, the dynamic converges to a pure Nash equilibrium if one exists in almost all (large) games.

econ.TH

In and out of lockdown: Propagation of supply and demand shocks in a dynamic input-output model

Economic shocks due to Covid-19 were exceptional in their severity, suddenness and heterogeneity across industries. To study the upstream and downstream propagation of these industry-specific demand and supply shocks, we build a dynamic input-output model inspired by previous work on the economic response to natural disasters. We argue that standard production functions, at least in their most parsimonious parametrizations, are not adequate to model input substitutability in the context of Covid-19 shocks. We use a survey of industry analysts to evaluate, for each industry, which inputs were absolutely necessary for production over a short time period. We calibrate our model on the UK economy and study the economic effects of the lockdown that was imposed at the end of March and gradually released in May. Looking back at predictions that we released in May, we show that the model predicted aggregate dynamics very well, and sectoral dynamics to a large extent. We discuss the relative extent to which the model's dynamics and performance was due to the choice of the production function or the choice of an exogenous shock scenario. To further explore the behavior of the model, we use simpler scenarios with only demand or supply shocks, and find that popular metrics used to predict a priori the impact of shocks, such as output multipliers, are only mildly useful.

econ.GN

Production networks and epidemic spreading: How to restart the UK economy?

We analyse the economics and epidemiology of different scenarios for a phased restart of the UK economy. Our economic model is designed to address the unique features of the COVID-19 pandemic. Social distancing measures affect both supply and demand, and input-output constraints play a key role in restricting economic output. Standard models for production functions are not adequate to model the short-term effects of lockdown. A survey of industry analysts conducted by IHS Markit allows us to evaluate which inputs for each industry are absolutely necessary for production over a two month period. Our model also includes inventory dynamics and feedback between unemployment and consumption. We demonstrate that economic outcomes are very sensitive to the choice of production function, show how supply constraints cause strong network effects, and find some counter-intuitive effects, such as that reopening only a few industries can actually lower aggregate output. Occupation-specific data and contact surveys allow us to estimate how different industries affect the transmission rate of the disease. We investigate six different re-opening scenarios, presenting our best estimates for the increase in R0 and the increase in GDP. Our results suggest that there is a reasonable compromise that yields a relatively small increase in R0 and delivers a substantial boost in economic output. This corresponds to a situation in which all non-consumer facing industries reopen, schools are open only for workers who need childcare, and everyone who can work from home continues to work from home.

econ.GN

What do online listings tell us about the housing market?

Traditional data sources for the analysis of housing markets show several limitations, that recently started to be overcome using data coming from housing sales advertisements (ads) websites. In this paper, using a large dataset of ads in Italy, we provide the first comprehensive analysis of the problems and potential of these data. The main problem is that multiple ads ("duplicates") can correspond to the same housing unit. We show that this issue is mainly caused by sellers' attempt to increase visibility of their listings. Duplicates lead to misrepresentation of the volume and composition of housing supply, but this bias can be corrected by identifying duplicates with machine learning tools. We then focus on the potential of these data. We show that the timeliness, granularity, and online nature of these data allow monitoring of housing demand, supply and liquidity, and that the (asking) prices posted on the website can be more informative than transaction prices.

econ.EM

Synchronization of endogenous business cycles

Business cycles tend to comove across countries. However, standard models that attribute comovement to propagation of exogenous shocks struggle to generate a level of comovement that is as high as in the data. In this paper, we consider models that produce business cycles endogenously, through some form of non-linear dynamics -- limit cycles or chaos. These models generate stronger comovement, because they combine shock propagation with synchronization of endogenous dynamics. In particular, we study a demand-driven reduced-form model in which business cycles emerge from strategic complementarities within countries, synchronizing their oscillations through international trade linkages. We develop an eigendecomposition that explores the interplay between non-linear dynamics, shock propagation and network structure, and use this theory to understand the mechanisms of synchronization. Next, we calibrate the model to data on 24 countries and show that the empirical level of comovement can only be matched by combining endogenous business cycles with exogenous shocks. Despite the limitations of using a stylized model, our results support the hypothesis that business cycles are at least in part caused by underlying non-linear dynamics.

econ.GN

Best reply structure and equilibrium convergence in generic games

Game theory is widely used as a behavioral model for strategic interactions in biology and social science. It is common practice to assume that players quickly converge to an equilibrium, e.g. a Nash equilibrium. This can be studied in terms of best reply dynamics, in which each player myopically uses the best response to her opponent's last move. Existing research shows that convergence can be problematic when there are best reply cycles. Here we calculate how typical this is by studying the space of all possible two-player normal form games and counting the frequency of best reply cycles. The two key parameters are the number of moves, which defines how complicated the game is, and the anti-correlation of the payoffs, which determines how competitive it is. We find that as games get more complicated and more competitive, best reply cycles become dominant. The existence of best reply cycles predicts non-convergence of six different learning algorithms that have support from human experiments. Our results imply that for complicated and competitive games equilibrium is typically an unrealistic assumption. Alternatively, if for some reason "real" games are special and do not possess cycles, we raise the interesting question of why this should be so.

physics.soc-ph

Towards a taxonomy of learning dynamics in 2 x 2 games

Do boundedly rational players learn to choose equilibrium strategies as they play a game repeatedly? A large literature in behavioral game theory has proposed and experimentally tested various learning algorithms, but a comparative analysis of their equilibrium convergence properties is lacking. In this paper we analyze Experience-Weighted Attraction (EWA), which generalizes fictitious play, best-response dynamics, reinforcement learning and also replicator dynamics. Studying $2\times 2$ games for tractability, we recover some well-known results in the limiting cases in which EWA reduces to the learning rules that it generalizes, but also obtain new results for other parameterizations. For example, we show that in coordination games EWA may only converge to the Pareto-efficient equilibrium, never reaching the Pareto-inefficient one; that in Prisoner Dilemma games it may converge to fixed points of mutual cooperation; and that limit cycles or chaotic dynamics may be more likely with longer or shorter memory of previous play.

econ.GN