Manuscript Offprint
arXiv:2610.28907JaxMARL-BC: Multi-Agent Reinforcement Learning for Macroeconomic Modelling, in Seconds
Abstract
Multi-agent reinforcement learning (MARL) offers a principled way of populating simulated economies with many heterogeneous decision makers. Its adoption, pioneered in finance, has nonetheless been slow in macroeconomics because of two main limitations: the lack of a shared frame of reference connecting MARL systems to dynamic stochastic general equilibrium (DSGE) models the profession already trusts, and the very long training times. The first limitation was recently addressed by the Multi-Agent Reinforcement Learning Business Cycle (MARL-BC), which places deep RL households in a real business cycle economy and reduces to classic DSGE models in specific limits. Here we address the second limitation. We present JaxMARL-BC, a JAX-accelerated simulator that trains MARL-BC economies in seconds (between 75× and 724× faster than the reference implementation), and scales to 200,000 independent learning households. We verify its correctness against the known DSGE limits, characterise its scaling through a simple cost law, and demonstrate its value by a proof-of-concept calibration of an extended model with heterogeneous returns on capital, in a two-hour experiment that would previously have taken over a month. We release JaxMARL-BC as open source.
CCS Concepts
• Applied computing → Economics; • Computing methodologies → Modeling and simulation; Planning under uncertainty; Machine learning.
1 Introduction
Reinforcement learning (RL) [44] and multi-agent RL (MARL) [3] have gradually become the basis of a new modelling paradigm for simulating the behaviour of agents in economics and finance. In RL, agents learn to maximise their rewards through repeated interaction with the economy they inhabit, so that MARL becomes a principled way of populating a simulated economy with many diverse decision makers, each optimising a reasonable objective.
Antonietta Mira
USI Lugano
Switzerland
Università dell'Insubria
Italy
Aldo Glielmo*
Banca d'Italia†
Italy
The adoption of this approach was pioneered in finance, where RL and MARL are now commonly used to represent trading, hedging or market-making agents across a range of markets [5, 9, 20, 25, 29, 34, 46], or within multi-agent market simulators supported by a growing ecosystem of open-source platforms [4, 6, 23, 31]. In macroeconomics and structural macro-financial modelling, adoption has been comparatively slower. Indeed, in spite of a growing body of specialised research in the field, from stylised economies [12, 14, 50], to proofs of concept in monetary policy [13, 28], and tax design [2, 15, 17, 35], the methodology has not entered the toolkit of policymakers and practitioners.
In our view, the reason is twofold. On the one hand, this is due to scepticism and resistance towards alternative modelling methodologies, from a community that is long accustomed to a specific way of building models based on the dynamic stochastic general equilibrium (DSGE) approach. This resistance is understandable, as the DSGE approach provides a shared frame of reference that keeps modelling out of the “wilderness of bounded rationality” [22], where infinitely many deviations from optimality become available. On the other hand, this is due to the considerably higher computational cost of training RL or MARL systems, whereas a typical DSGE model can be specified and solved in seconds. A shared framework and fast solvers, in turn, make these models practical to use, and explain the remarkable success of specialised modelling software such as Dynare [1, 45].
The first limitation of MARL approaches has been convincingly addressed in a recently introduced framework, the Multi-Agent Reinforcement Learning Business Cycle (MARL-BC) [24]. MARL-BC places deep RL households inside a real business cycle (RBC) economy, so that the MARL system reduces to classic DSGE models in specific limits, recovering the representative-agent RBC and the mean-field Krusell–Smith economy. Hence, MARL-BC extends the classic models rather than replacing them, and it does so in a way that can be checked against results the profession already trusts. However, MARL-BC does not address the second limitation we mentioned, since training requires multiple hours per run [24].
In this work, we leverage JAX [11], a library for just-in-time compilation of numerical code to hardware accelerators, to reduce MARL-BC training time from hours to seconds, thereby addressing the second adoption bottleneck described above, and fostering a wider usage of the methodology by economists and practitioners. JAX has often been proposed as a viable way to lower RL training times by allowing environment, policy and optimiser to live inside a single compiled program directly on the accelerator [32, 39, 41]. The financial community has already extensively explored this
The views expressed in this paper are those of the authors and do not necessarily reflect those of Banca d'Italia.
This paper has been accepted at the 7th ACM International Conference on AI in Finance (ICAIF'26), Milan, Italy, https://icaif2026.org/.
route, with the JAX-LOB simulator for limit order book RL trading agents [23], and the JaxMARL-HFT simulator extending it to large-scale multi-agent high-frequency trading [36]. EconoJax [38] applies the same strategy to a stylised economic simulation, but no equivalent exists for structural MARL-driven macroeconomic modelling, a gap this paper fills.
More specifically, our contributions are as follows:
-
We propose JaxMARL-BC, an end-to-end JAX simulator which trains MARL-BC economies in seconds rather than hours, and scales easily to hundreds of thousands of independent learning agents.
-
We verify the correctness of our simulator against the known DSGE limits of the MARL-BC, reproducing the results at ten times the population size and at a small fraction of the cost.
-
We extensively measure the scalability to large populations of agents and to large numbers of parallel environments, which we characterise via a simple cost law that we verify empirically.
-
We showcase the capability of the simulator by performing a realistic calibration exercise of a large model with heterogeneous returns on capital, with 110 training runs sweeping different degrees of ex-ante heterogeneity in a two-hour computation that would have previously taken over a month.
We release JaxMARL-BC as open source , together with a prototype LLM-augmented dashboard that turns natural-language requests into simulation configurations, so that non-technical users can experiment without touching the command line. Removing the computational barrier to MARL in macroeconomics can let the methodology spread beyond toy demonstrations and become common practice for structural macro and macro-financial modelling.
We structure the rest of this work as follows. In Sec. 2 we review related work. In Sec. 3 we describe the JaxMARL-BC simulator. In Sec. 4 and Sec. 5 we report the experimental setup and the results of our experiments. Finally, in Sec. 6 we conclude.
2 Related work
Training RL and MARL systems typically requires substantial time and computational resources, which can limit their adoption. The creation of simulation environments in JAX has therefore become an active line of work. The design pattern was popularised for single-agent RL by PureJaxRL [32] and is now packaged in multi-agent libraries such as JaxMARL [41] and Mava [39], which report speedups of one to four orders of magnitude over comparable CPU runs. Among application domains, finance has been the most active adopter of this pattern. JAX-LOB [23] was the first GPU-accelerated limit order book simulator, processing thousands of books in parallel and delivering at least a 7× speedup over comparable CPU implementations. JaxMARL-HFT [36] builds on JAX-LOB and extends it to a heterogeneous set of agents with distinct observations, actions and rewards, reporting up to a 240× reduction in training time. EconoJax [38] ports the AI-Economist environment [50] to JAX and trains populations of 100 agents in fifteen minutes, down from the several days required by the original implementation. JaxMARL-BC follows the same design philosophy, but targets a domain none of these packages cover, namely structural heterogeneous macroeconomic modelling. Our work is also close to the ABIDES-Economist [18], which populates agent-based economies with RL agents, but which is not implemented in JAX and does not specifically target established macroeconomic benchmarks.
A different line of work uses deep learning, without RL, to solve heterogeneous-agent models [8, 27, 33], and certain fast conventional methods, such as the sequence-space Jacobian [7], can also be used for the same task. JaxMARL-BC does not aim to compete with these methods on the classes of models they already solve well. Rather, it aims to facilitate the growth and adoption of a new modelling paradigm based on independent learning agents, which these methods do not represent.
3 The JaxMARL-BC simulator
We describe JaxMARL-BC in two parts. In the first part (Sec. 3.1) we provide an overview of the MARL-BC model that forms the basis of the simulator, and in the second part (Sec. 3.2) we describe the architectural choices that allow for drastically lower training time, and we outline a simple cost model for training time. Finally, in Sec. 3.3 we briefly describe the LLM-augmented dashboard which allows non-technical users to experiment with the simulator.
3.1 The underlying model
The underlying model is based on the MARL-BC economy of [24].
One period. Household i enters period t with capital , a labour endowment , and fixed productivities of capital and of labour . Effective aggregates are productivity-weighted population means,
which are turned into output through a Cobb–Douglas function
with capital elasticity and aggregate technology . The returns on capital and wages of the households depend on their productivity of capital and labour via
and the cash-on-hand at time t is given by
where is the capital depreciation rate.
The household’s problem. The households choose their consumption fraction , from which consumption and next-period capital follow as
The households can also choose next-period labour endowment . Consumption and labour enter the reward as
where the weight prices leisure relative to consumption. Each household thus learns a policy that maps its own observations to an action in order to maximise , where is the household's discount factor.
https://github.com/danmonuni/jax-marl-bc.

Throughput vs. number of agents

Wall-clock time vs. number of agents

Figure 1: Speedup illustration and resulting scaling with population size n. Left: an illustration of the axes of parallelism. One rollout evaluation is a rectangular array of agent-transitions with n agents along one axis (a plain array dimension) and E environments along the other (with jax.vmap). This is advanced sequentially over T rollout periods, within a lax.scan, which is not parallelisable. Rollouts and training steps live inside one jit-compiled program. Centre and right: throughput and wall-clock time of training runs with periods each, as a function of the number of agents n. Curves are shown for both CPU and GPU backends (dashed light blue and solid blue lines) and each plots the mean and standard deviation over three seeds. The right-most panel also reports a linear slope as a dashed grey line. The simulator is evaluated against comparable MARL-BC runs (orange and red lines) with times taken from the original paper.
Learning. Households are trained by deep RL, and specifically by Proximal Policy Optimization (PPO) [43]. PPO is a standard algorithm for RL, and also for MARL where typically, as in our case, all agents are treated as independent learners in the same environment [16]. With n > 1 learners in one economy, the transitions and rewards any household observes depend on what the others are currently doing, so each faces a non-stationary problem and the single-agent convergence guarantees no longer apply [3]. For symmetric agents, a standard remedy is parameter sharing, in which a single policy network serves the entire population and is evaluated on each agent's private observations. This stabilises training without forcing identical behaviour, since household characteristics enter through the observation [49]. MARL-BC interprets this configuration as a stylised form of “social learning” [37, 47], and we adopt the same approach here.
Known limits of the model. The MARL-BC paper shows that the model reproduces standard DSGE models in two limit cases. Specifically, with a single agent (n = 1), individual and aggregate quantities coincide and the framework reduces to the textbook representative-agent RBC, while with many ex-ante identical agents ( and ), the framework reproduces the well-known mean-field Krusell–Smith model. These two limits make the present work easily testable, since the target behaviour is known from a well-established literature, and they also address the first of the adoption obstacles discussed in the introduction, by anchoring the framework to model classes widely recognised by the community.
3.2 The JAX speedup
We now describe the JAX design that enables the speedup of our simulator. The left panel of Figure 1 shows the three axes upon which a single rollout of the simulator is parallelised and executed. These axes differ in the kind of dependence that holds among their elements, and each kind calls for a different JAX construct. Along the first axis are the n households of one economy, which are not independent of one another, as they are coupled through the aggregates of Eq. (1) that determine the prices they all face. The agent axis is therefore a reduction axis, and we represent it as a plain array dimension so that n = 10 and n = 10,000 execute the very same program, only on wider arrays. By contrast, the second axis represents E copies of the economy, which are fully independent of one another. This is the kind of parallelism jax.vmap is designed for, as it takes a function written for a single instance and lifts it to a batch of independent ones. Here, a single jax.vmap over the environment's 'reset' and 'step' functions produces the E parallel economies. The policy forward pass flattens these two axes into one batch dimension, so the policy network only ever sees their product, the batch width . The third axis, the T periods of a rollout, is instead irreducibly sequential and is carried by a lax.scan. All of these computations happen inside one jit boundary, enclosing the optimiser, the environment reset and every update.
The computational design just described suggests a simple model of run time, which we will later use to organise and understand our measurements. To write it down, we first define the sequential depth D as the number of irreducible stages that must run one after another. In practice, these are the environment periods and the gradient steps, since period depends on period t and gradient step depends on step j. Two hardware-related properties also need to be defined. The latency is the fixed overhead of launching a one-stage computation, and hence it does not depend on the width W, while the effective maximum throughput P is the number of agent-transitions per second the device can sustain once it is fully occupied. Given these definitions, we can model the total training time as
since a training run performs D stages, and each stage costs a fixed for launching the batch computation and then roughly W/P for performing it. The above equation clearly identifies two regimes meeting at , i.e. the batch width whose execution costs roughly as much as one launch overhead. For the fixed

Figure 2: The LLM-augmented dashboard for JaxMARL-BC.
cost dominates and enlarging the batch width is close to free, while for the cost becomes linear in W with slope D/P. In practice, stages are of two kinds, rollout periods and gradient steps, each with different overheads and throughput; hence and P are to be read as effective values, averaged over the two kinds in the fixed proportion in which they occur.
In our experiments, we control the total training budget via the number of rollout periods, with a single period consisting of agent-transitions.
3.3 The LLM-augmented dashboard
Figure 2 shows a screenshot of the user-friendly dashboard we built for JaxMARL-BC. The dashboard lets users launch a simulation from a natural-language request, so that non-technical users too can easily experiment with the simulator. Under the hood, the natural-language request is sent to an LLM, currently either an OpenAI model via its API or a local Ollama model. The LLM turns the request into the YAML configuration file read by the simulation engine. Importantly, the resulting configuration is previewed in the dashboard, and can be edited before training starts. The dashboard then launches the training run, streams its log to the page, and renders the resulting artefacts. We note that JaxMARL-BC can also be run from the command line with greater parameter flexibility, and we use this approach in our experiments. The dashboard is intended as a convenience tool for exploration, and we do not evaluate it in this work.
4 Experimental setup
To validate and demonstrate the capabilities of JaxMARL-BC, we perform three main experiments: (i) a correctness check of our simulator against the original MARL-BC results, (ii) an assessment of its scalability, and (iii) a large-scale calibration exercise that showcases its practical utility. The general setup of all experiments is described in Sec. 4.1, while the detailed specifications of the three experiments are given in Sec. 4.2.
4.1 General setup
Hardware and networks. We perform our training runs on a P100 GPU, and in experiment (ii) we also use an Intel Xeon CPU. In all the experiments, the policy is a shared-parameter network, a tanh MLP. We use PPO with the Adam optimiser, a clipping parameter of 0.2, a GAE decay of 0.95, a discount factor equal to , and a learning rate of . Each gradient update iterates for 4 epochs over the collected experience, split into 64 minibatches. All computations use single-precision (float32) arithmetic, the JAX default on accelerators.
Model parameters. JaxMARL-BC can simulate any MARL-BC economy, and we have also checked its correctness against the limit of the model, which is a relatively simple limit since a single household coincides with the representative agent. Here, however, we only report the mean-field () limit of the model, as this is much harder to replicate and it is also the limit that can most benefit from the large-scale extensions unlocked by fast training. Specifically, we parametrise JaxMARL-BC to reproduce the mean-field Krusell–Smith model as follows. We set , and . Aggregate technology follows a two-state Markov chain, in good states and in bad ones, with each state persisting with probability 7/8. Individual employment follows a second chain, where an employed household supplies units of labour and an unemployed one supplies none, with the unemployment rate at 4% in good states and 10% in bad ones, as in [30]. Since the labour endowment is not chosen by the agents in the Krusell–Smith setting, we set and remove labour from Eq. (6), and set observations to . We append the individual capital productivity to allow for the ex-ante heterogeneous runs of experiment (iii), while it is not needed for (i) and (ii). Finally, we sample initial capital uniformly on [10, 70] and redraw it at every episode reset.
4.2 The three experiments
(i) Correctness. We train a Krusell–Smith economy using 640 gradient updates and using E = 12 parallel environments with episodes of n = 200 households interacting over T = 200 periods. For evaluation, we set up a fresh simulation of 200 periods with a frozen policy network, and report averages over the last 50 periods. The quantities we report are the ones used in [24] in their comparison with the original Krusell–Smith model. We then repeat the same experiment with a much larger population of n = 100,000 households.
(ii) Scaling. We first compare the wall-clock training times of the original paper with those obtained by our simulator under comparable settings: a single environment (E = 1), a budget of rollout periods, and six populations, . For a complete picture, we report the time of our simulator when running both on CPU and on GPU. Then, we push our simulator to larger sizes and perform CPU and GPU training runs with up to and households, respectively. Finally, we show how computation times depend on the batch width's dimensions E and n. Specifically, we let n and E each take the nine values , giving 81 runs, of an identical sequential depth of rollout periods. All reported times are averages over three runs.
(iii) Calibration of ex-ante heterogeneity. In the third experiment, we illustrate the practical usefulness of our simulator by performing a large-scale calibration exercise. We train an extended












Figure 3: Correctness check on the Krusell–Smith economy. The Krusell–Smith economy of experiment (i) with n = 200 (top) and n = 100,000 (bottom) households. Left: one-step transitions of aggregate capital coloured by aggregate state (good/bad), with a law of motion fitted separately in each state, at four points in training. Centre: stationary distribution of individual capital, with its Gini coefficient, before and after training. Right: learned consumption fractions against wealth (cash-on-hand), by employment status, before and after training.
model with an ex-ante different capital productivity , and demonstrate how a sweep over different levels of heterogeneity can bring the simulation closer to the data. Specifically, we take each as an i.i.d. log-normal variable with log-scale and log-location so that the population mean remains approximately 1 for every . The dispersion ranges from 0, the homogeneous benchmark , to 0.5, on a grid of step 0.05 with ten seeds at each, for a total of 110 runs. Each run trains 200 households in parallel environments, as in experiment (i).
5 Results
The three subsections that follow correspond precisely to the three experiments described in the experimental section.
5.1 Correctness
Figure 3 reports the results of JaxMARL-BC trained to reproduce a Krusell–Smith economy with n = 200 (top panels) and n = 100,000 (bottom panels) households, mirroring Figure 4 of [24]. The figure reports the three key properties used to validate the framework: a
Stationary capital distribution through training

Figure 4: The capital distribution through training. The distribution of agents' capital for agents, at evenly spaced training snapshots, with its mean overlaid. The economy quickly leaves its untrained state and settles onto the stationary distribution of Figure 3, which then holds for the rest of training.
linear law of motion for aggregate capital, a bimodal wealth distribution with a Gini index in the correct range, and a consumption fraction that declines with wealth.
Focussing on first, the left panels show that the law of motion for aggregate capital becomes linear with training, the defining property of approximate aggregation in [30]. The fit improves as the policy converges, with rising from 0.836 to 0.992 in the good state and from 0.945 to 0.995 in the bad state, the two states separating cleanly, and mean capital settling at . The middle and right panels show how training moves the economy from a near-degenerate untrained state, where capital collapses onto and the untrained network consumes a near-constant fraction of wealth, to a dispersed, bimodal stationary state with a capital Gini of 0.22 in this run. This value is in line with the obtained over ten seeds in the homogeneous benchmark of Sec. 5.3. The dispersion obtained is consistent both with [24] and with the original Krusell–Smith calculation [30]. The learned consumption fraction is a smooth, monotonically declining function of wealth, from to , and employed households consume slightly more than unemployed households at equal wealth.
The same properties hold at . With many more agents, the aggregates are averaged over a much larger population, so that all results become smoother and the law of motion for aggregate capital becomes even more clearly linear, with in both states at the end of training. Nonetheless, the figure shows that is an excellent population size for experiments, since it already captures all the phenomena of interest, while being trainable in a matter of minutes even on a CPU (see Table 1).
Figure 4 tracks the whole wealth distribution through training for the run. Each of its columns is one evaluation, evenly spaced in training steps, and the colour is the density of households on a logarithmic scale. The figure shows how the economy leaves its near-degenerate start within the first fifth of training, and then settles on a wealth distribution that remains approximately stable for the rest of the run.
| n | ours | PPO-CPU | SAC-CPU | |||
|---|---|---|---|---|---|---|
| GPU (s) | CPU (s) | (h) | (×) | (h) | (×) | |
| 10 | 21.97(3) | 13.03(28) | 0.46(14) | 75 | 0.70(15) | 115 |
| 20 | 23.38(10) | 19.13(39) | 0.70(15) | 108 | 0.77(16) | 119 |
| 50 | 26.49(11) | 29.89(27) | 1.49(24) | 203 | 0.96(13) | 130 |
| 100 | 27.98(12) | 68.93(175) | 2.72(26) | 350 | 1.45(9) | 187 |
| 200 | 29.63(8) | 134.14(365) | 4.00(28) | 486 | 1.90(22) | 231 |
| 500 | 35.77(11) | 276.33(279) | 7.20(20) | 724 | 2.99(14) | 301 |
Table 1: Speedup with respect to the original implementation. The reference times are single-CPU times of the original implementation [24] in the same mean-field Krusell–Smith limit and at the same six population sizes. Our times use and the same budget of periods, on a GPU and on a CPU backend; both are the mean over three seeds. Parenthesised digits give the standard deviation in units of the last digit. Speedups are relative to our GPU times.
5.2 Scaling
Table 1 reports training times of JaxMARL-BC for an increasing number of households against those of comparable training runs in [24]. The PPO column is the most directly comparable, since PPO is what we use in JaxMARL-BC, and its speedup ranges from about at to about at . The SAC column is also relevant since SAC is the preferred algorithm in [24], and against it the speedup goes from to . These speedups combine the effect of the JAX with that of the GPU. The two can be separated using our CPU times, which are between and faster, with the GPU contributing a further factor of up to at . Furthermore, in contrast with the reference implementation, our GPU run time grows slowly across the table, from to for a fifty-fold larger population.
The middle and right panels of Figure 1 show throughput and wall-clock time against population size on log-log axes. Each plot shows four curves: the original implementation under PPO (dashed red line) and under SAC (dashed orange line) on CPU, JaxMARL-BC on CPU (dashed light blue line) and on GPU (solid blue line). Our GPU throughput increases substantially from agent-transitions/s at to at , before plateauing and staying constant up to . The CPU curve starts at higher throughput levels of but plateaus much more quickly at for . By contrast, both reference curves stay well below throughout.
The different throughput levels directly translate to different running times in the right panel, where both reference curves exceed one hour by while JaxMARL-BC stays of the order of tens of seconds on both GPU and CPU. The right panel also shows that the CPU-hours the original implementation needs to train households is enough for JaxMARL-BC to comfortably train systems of households, opening a regime that was previously out of reach and, with it, a whole new space of large-scale experiments with heterogeneous agents.
Figure 5 reports again throughput and wall-clock time, but on a grid experiment with increasing population size (n) and number of environments (E). In both panels, the colour gradient is visibly


Figure 5: Throughput and run-time results. Throughput (left) and run time (right) for a grid over (columns) and (rows), each ranging from 1 to 500 at fixed sequential depth, with colour on a log scale. Both panels are symmetric about the diagonal, as from Eq. (7), throughput saturates at agent-transitions/s near , past which run time grows linearly in .
symmetric about the diagonal, consistent with the model of Eq. (7) that expresses training cost symmetrically only via the batch width . The left panel shows throughput rising along the diagonal until it saturates at agent-transitions/s, a plateau reached in the neighbourhood of . The throughput translates to computational cost in the right panel in a way that is again consistent with Eq. (7). Specifically, we find that for low values of run time grows only mildly, going from s at to s at , a rise across a rise in width, because the extra width is absorbed by throughput that is still climbing towards the plateau. This near-constant cost can be interpreted as the latency cost of Eq. (7). Past that width, the device is saturated and time grows linearly with , again as accounted for in Eq. (7), with slope . The two time-scaling regimes (approximately constant, and linear with ) are particularly visible in the right panel of Figure 1 where a linear slope is also drawn as a dashed grey line.
5.3 Calibration of ex-ante heterogeneity
Having established correctness and speed, we now show how JaxMARL-BC can be used for an advanced calibration exercise. Specifically, here we extend the Krusell–Smith model with heterogeneity in the ex-ante capital productivities and demonstrate how the extended model can better match empirical quantities. We set up the model by drawing each household’s capital productivity from a log-normal distribution with dispersion parameter . At every equals one, and the model is equivalent to the ex-ante homogeneous Krusell–Smith economy of Sec. 5.1. Since productivities enter the equation for returns on capital (see Eq. (3)), we can calibrate their dispersion to match empirically plausible values for the Gini index and for the heterogeneous returns on capital.
Figure 6 reports the outcome of the training runs with means and standard deviations over seeds. As expected, a higher dispersion produces systematically more skewed Lorenz curves, and correspondingly higher Gini indices. More specifically, the capital Gini rises from at , the ex-ante homogeneous benchmark of Sec. 5.1, to at , and it then plateaus up to . Since the wealth Gini of most advanced economies is of the order of 0.6–0.8 [10, 42], this indicates that the extended Krusell–Smith economy can be brought considerably closer to the data than the original one, and that a dispersion of constitutes a good parametrisation of the extended model. Furthermore, Figure 7 shows that the same values of also imply plausible cross-sectional distributions of returns on capital, whose heterogeneity is widely recognised as an important driver of wealth concentration [21, 48].
This calibration exercise consists of 110 runs, ten seeds at each of eleven dispersion values and the whole computation takes about two hours. To give a rough estimate of the time this would have taken before JaxMARL-BC, we can use the times in Table 1 and assume that similar speedups also hold for the E = 12 environments needed here. This is a lower-bound estimate since it assumes that the reference implementation scales as efficiently as ours with E, and it still amounts to more than a month of compute, which shows how JaxMARL-BC can unlock a class of calibration experiments that was previously out of reach.
6 Conclusions
We presented JaxMARL-BC, a JAX-accelerated simulator for MARL-driven macroeconomic modelling. Training a MARL-BC economy takes tens of seconds rather than hours, and populations of independent learning households come within reach of a single run, a regime never touched previously. Speedups of this size change what can be attempted, as large-scale runs and parameter calibration can become an integral part of model development.
Several directions follow naturally. Wider model coverage is the most immediate extension. The RBC and Krusell–Smith economies studied here are natural entry points, but the same machinery should accommodate Huggett economies, New Keynesian economies and their heterogeneous-agent (HANK) versions. At the same time, the rational-expectations counterpart of the economies studied here remains within reach of classical solution methods, and it will be important to address economies with richer heterogeneity and with

Figure 6: Calibration of ex-ante heterogeneity in capital productivity. Individual capital productivities are drawn from a log-normal distribution with unit mean and dispersion , with swept from 0 (the homogeneous Krusell–Smith benchmark, ) to 0.5, with ten seeds per value. Every curve is a mean over seeds with a one-standard-deviation band. Left: the realised profiles by agent rank. Increasing tilts the flat benchmark profile into an increasingly skewed one. Centre: Lorenz curves of the resulting wealth distributions move away from the diagonal in the same fashion, the bottom 80% of households holding 70% of aggregate capital at and under 20% at . Right: the resulting capital Gini, rising from to more than 0.7 at .

Figure 7: Heterogeneous return on capital. Density of percentage returns on capital across agents, in percentage points, for and . Heterogeneity produces right-skewed distributions in which most agents earn less than the average, with a thin upper tail extending beyond returns of 15%. Increasing shifts mass towards lower returns and widens dispersion.
less stringent rational expectations or general equilibrium assumptions, where classical methods cannot be used. On the algorithmic side, while PPO was adequate for everything we ran, richer environments may benefit from advanced off-policy learners such as SAC [26]. A JAX simulator is also largely differentiable end-to-end, so gradients with respect to structural parameters come for free. These could make gradient-based calibration available in place of grid search, in the spirit of recent work on differentiable agent-based models [19, 40], and also pave the way for the development of targeted gradient-based RL solvers.
JaxMARL-BC is released as open source, together with an LLM-augmented dashboard. The framework is anchored to model classes the profession already trusts, and it is fast enough to quickly iterate on model specifications. We expect these two properties to facilitate the transition of MARL from proof-of-concept demonstration to standard practice in macroeconomic modelling.
References
[1] Stéphane Adjemian, Houtan Bastani, Michel Juillard, Frédéric Karamé, Junior Maih, Ferhat Mihoubi, Willi Mutschler, George Perendia, Johannes Pfeifer, Marco Ratto, and Sébastien Villemot. 2011. Dynare: Reference Manual, Version 4. Dynare Working Paper 1. CEPREMAP.
[2] Akash Agrawal, Joel Dyer, Aldo Glielmo, and Michael J. Wooldridge. 2025. Robust Policy Design in Agent-Based Simulators using Adversarial Reinforcement Learning. In The First MARW: Multi-Agent AI in the Real World Workshop at AAAI 2025.
[3] Stefano V. Albrecht, Filippos Christianos, and Lukas Schäfer. 2024. Multi-Agent Reinforcement Learning: Foundations and Modern Approaches. MIT Press.
[4] Selim Amrouni, Aymeric Moulin, Jared Vann, Svitlana Vyetrenko, Tucker Balch, and Manuela Veloso. 2021. ABIDES-Gym: Gym Environments for Multi-Agent Discrete Event Simulation and Application to Financial Markets. In Proceedings of the Second ACM International Conference on AI in Finance. 1–9.
[5] Leo Ardon, Nelson Vadori, Thomas Spooner, Mengda Xu, Jared Vann, and Sumitra Ganesh. 2021. Towards a Fully RL-Based Market Simulator. In Proceedings of the Second ACM International Conference on AI in Finance. 1–9.
[6] Leo Ardon, Jared Vann, Deepeka Garg, Thomas Spooner, and Sumitra Ganesh. 2023. Phantom – A RL-Driven Multi-Agent Framework to Model Complex Systems. In Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems (London, United Kingdom) (AAMAS '23). International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC, 2742–2744.
[7] Adrien Auclert, Bence Bardóczy, Matthew Rognlie, and Ludwig Straub. 2021. Using the Sequence-Space Jacobian to Solve and Estimate Heterogeneous-Agent Models. Econometrica 89, 5 (2021), 2375–2408.
[8] Marlon Azinovic, Luca Gaegaf, and Simon Scheidegger. 2022. Deep Equilibrium Nets. International Economic Review 63, 4 (2022), 1471–1525.
[9] Tiziano Bacaloni, Aldo Glielmo, and Marco Taboga. 2025. Natural-Gas Storage Modelling by Deep Reinforcement Learning. In Proceedings of the 6th ACM International Conference on AI in Finance (ICAIF '25). Association for Computing Machinery, New York, NY, USA, 829–837. https://doi.org/10.1145/3768292.3770348
[10] Carlotta Balestra and Richard Tonkin. 2018. Inequalities in household wealth across OECD countries: Evidence from the OECD Wealth Distribution Database. OECD statistics Working papers 2018, 01 (2018).
[11] James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. 2018. JAX: Composable Transformations of Python+NumPy Programs. (2018). http://github.com/google/jax.
[12] Simone Brusatin, Tommaso Padoan, Andrea Coletta, Domenico Delli Gatti, and Aldo Glielmo. 2024. Simulating the Economic Impact of Rationality through Reinforcement Learning and Agent-Based Modelling. In Proceedings of the 5th ACM International Conference on AI in Finance (ICAIF '24). ACM, 159–167. https://doi.org/10.1145/3677052.3698621
[13] Mingli Chen, Rama Cont, Andreas Joseph, Michael Kumhof, Xinlei Pan, Xiong Wei, and Xuan Zhou. 2025. Deep Reinforcement Learning in a Monetary Model. Bank of England Staff Working Paper 1142 (2025).
[14] Thomas R. Cook and Nathan M. Palmer. 2025. Reinforcement Learning in Macroeconomics. In Oxford Research Encyclopedia of Economics and Finance.
[15] Michael Curry, Alexander Trott, Soham Phade, Yu Bai, and Stephan Zheng. 2023. Learning Solutions in Large Economic Networks using Deep Multi-Agent Reinforcement Learning. In Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems (London, United Kingdom) (AAMAS '23). International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC, 2760–2762.
[16] Christian Schroeder De Witt, Tarun Gupta, Denys Makoviichuk, Viktor Makoviychuk, Philip HS Torr, Mingfei Sun, and Shimon Whiteson. 2020. Is independent learning all you need in the starcraft multi-agent challenge? arXiv preprint arXiv:2011.09533 (2020).
[17] Kshama Dwarakanath, Jialin Dong, and Svitlana Vyetrenko. 2024. Tax Credits and Household Behavior: The Roles of Myopic Decision-Making and Liquidity in a Simulated Economy. In Proceedings of the 5th ACM International Conference on AI in Finance. 168–176.
[18] Kshama Dwarakanath, Svitlana Vyetrenko, Peyman Tavallali, and Tucker Balch. 2024. ABIDES-Economist: Agent-Based Simulator of Economic Systems with Learning Agents. arXiv preprint arXiv:2402.09563 (2024).
[19] Joel Dyer, Arnau Quera-Bofarull, Ayush Chopra, J. Doyne Farmer, Anisoara Calinescu, and Michael Wooldridge. 2023. Gradient-Assisted Calibration for Financial Agent-Based Models. In Proceedings of the Fourth ACM International Conference on AI in Finance. https://doi.org/10.1145/3604237.3626857
[20] Benjamin Patrick Evans and Sumitra Ganesh. 2024. Learning and Calibrating Heterogeneous Bounded Rational Market Behaviour with Multi-Agent Reinforcement Learning. In Proceedings of the 23rd International Conference on Autonomous Agents and Multiagent Systems (Auckland, New Zealand) (AAMAS '24). International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC, 534–543.
[21] Andreas Fagereng, Luigi Guiso, Davide Malacrino, and Luigi Pistaferri. 2020. Heterogeneity and persistence in returns to wealth. Econometrica 88, 1 (2020), 115–170.
[22] J. Doyne Farmer. 2024. Making Sense of Chaos: A Better Economics for a Better World. Yale University Press.
[23] Sascha Frey, Kang Li, Peer Nagy, Silvia Sapora, Chris Lu, Stefan Zohren, Jakob Foerster, and Anisoara Calinescu. 2023. JAX-LOB: A GPU-Accelerated Limit Order Book Simulator to Unlock Large Scale Reinforcement Learning for Trading. In Proceedings of the 4th ACM International Conference on AI in Finance (ICAIF).
[24] Federico Gabriele, Aldo Glielmo, and Marco Taboga. 2026. Heterogeneous RBCs via Deep Multi-Agent Reinforcement Learning. In Proceedings of the 25th International Conference on Autonomous Agents and Multiagent Systems (Paphos, Cyprus) (AAMAS '26). International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC, 1284–1293. https://doi.org/10.65109/VZHC1838 Preprint: arXiv:2510.12272.
[25] Kang Gao, Stephen Weston, Perukrishnen Vytelingum, Namid Stillman, Wayne Luk, and Ce Guo. 2023. Deeper Hedging: A New Agent-Based Model for Effective Deep Hedging. In Proceedings of the Fourth ACM International Conference on AI in Finance. 270–278.
[26] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. 2018. Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor. In Proceedings of the 35th International Conference on Machine Learning (ICML). PMLR, 1861–1870.
[27] Jiequn Han, Yucheng Yang, and Weinan E. 2026. DeepHAM: A Global Solution Method for Heterogeneous Agent Models with Aggregate Shocks. Quantitative Economics (2026).
[28] Natascha Hinterlang and Alina Tänzer. 2021. Optimal Monetary Policy using Reinforcement Learning. Discussion Paper. Deutsche Bundesbank.
[29] Michaël Karpe, Jin Fang, Zhongyao Ma, and Chen Wang. 2020. Multi-agent reinforcement learning in a realistic limit order book market simulation. In Proceedings of the first ACM international conference on AI in finance. 1–7.
[30] Per Krusell and Anthony A. Smith, Jr. 1998. Income and Wealth Heterogeneity in the Macroeconomy. Journal of Political Economy 106, 5 (October 1998), 867–896. https://doi.org/10.1086/250034
[31] Xiao-Yang Liu, Hongyang Yang, Jiechao Gao, and Christina Dan Wang. 2021. FinRL: Deep reinforcement learning framework to automate trading in quantitative finance. In Proceedings of the second ACM international conference on AI in
finance. 1–9.
[32] Chris Lu, Jakub Kuba, Alistair Letcher, Luke Metz, Christian Schroeder de Witt, and Jakob Foerster. 2022. Discovered Policy Optimisation. Advances in Neural Information Processing Systems 35 (2022), 16455–16468.
[33] Lilia Maliar, Serguei Maliar, and Pablo Winant. 2021. Deep Learning for Solving Dynamic Economic Models. Journal of Monetary Economics 122 (2021), 76–101.
[34] Chris Mascioli, Anri Gu, Yongzhao Wang, Mithun Chakraborty, and Michael Wellman. 2024. A Financial Market Simulation Environment for Trading Agents Using Deep Reinforcement Learning. In Proceedings of the 5th ACM International Conference on AI in Finance. 117–125.
[35] Qirui Mi, Siyu Xia, Yan Song, Haifeng Zhang, Shenghao Zhu, and Jun Wang. 2024. TaxAI: A Dynamic Economic Simulator and Benchmark for Multi-Agent Reinforcement Learning. In Proceedings of the 23rd International Conference on Autonomous Agents and Multiagent Systems (Auckland, New Zealand) (AAMAS '24). International Foundation for Autonomous Agents and Multiagent Systems, Richland, SC, 1390–1399.
[36] Valentin Mohl, Sascha Frey, Reuben Leyland, Kang Li, George Nigmatulin, Mihai Cucuringu, Stefan Zohren, Jakob Foerster, and Anisoara Calinescu. 2025. JaxMARL-HFT: GPU-Accelerated Large-Scale Multi-Agent Reinforcement Learning for High-Frequency Trading. In Proceedings of the 6th ACM International Conference on AI in Finance. 18–26.
[37] Kamal K. Ndousse, Douglas Eck, Sergey Levine, and Natasha Jaques. 2021. Emergent Social Learning via Multi-Agent Reinforcement Learning. In International Conference on Machine Learning. PMLR, 7991–8004.
[38] Koen Ponse, Aske Plaat, Niki van Stein, and Thomas M. Moerland. 2024. EconoJax: A Fast & Scalable Economic Simulation in JAX. arXiv preprint arXiv:2410.22165 (2024).
[39] Arnu Pretorius, Kale-ab Tessera, Andries P. Smit, Claude Formanek, St John Grimbly, Kevin Eloff, Siphelele Danisa, Lawrence Francis, Jonathan Shock, Herman Kamper, Willie Brink, Herman Engelbrecht, Alexandre Laterre, and Karim Beguir. 2021. Mava: A Research Framework for Distributed Multi-Agent Reinforcement Learning. arXiv preprint arXiv:2107.01460 (2021).
[40] Arnau Quera-Bofarull, Nicholas Bishop, Joel Dyer, Daniel Jarne Ornia, Anisoara Calinescu, Doyne Farmer, and Michael Wooldridge. 2025. Automatic differentiation of agent-based models. arXiv preprint arXiv:2509.03303 (2025).
[41] Alexander Rutherford, Benjamin Ellis, Matteo Gallici, Jonathan Cook, Andrei Lupu, Gardar Ingvarsson, Timon Willi, Ravi Hammond, Akbir Khan, Christian Schroeder de Witt, Alexandra Souly, Saptarashmi Bandyopadhyay, Mikayel Samvelyan, Minqi Jiang, Robert Tjarko Lange, Shimon Whiteson, Bruno Lacerda, Nick Hawes, Tim Rocktaschel, Chris Lu, and Jakob Nicolaus Foerster. 2024. JaxMARL: Multi-Agent RL Environments and Algorithms in JAX. In Advances in Neural Information Processing Systems 38, Datasets and Benchmarks Track. arXiv:2311.10090.
[42] Emmanuel Saez and Gabriel Zucman. 2016. Wealth inequality in the United States since 1913: Evidence from capitalized income tax data. The Quarterly Journal of Economics 131, 2 (2016), 519–578.
[43] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. 2017. Proximal Policy Optimization Algorithms. arXiv preprint arXiv:1707.06347 (2017).
[44] Richard S. Sutton and Andrew G. Barto. 1998. Reinforcement Learning: An Introduction. Vol. 1. MIT Press, Cambridge, MA.
[45] Sébastien Villemot. 2011. Solving Rational Expectations Models at First Order: What Dynare Does. Dynare Working Paper 2. CEPREMAP.
[46] Ziyi Wang, Carmine Ventre, and Maria Polukarov. 2025. Multi-agent reinforcement learning for market making: Competition without collusion. In Proceedings of the 6th ACM International Conference on AI in Finance. 814–822.
[47] Andrew Whalen, Thomas L. Griffiths, and Daphna Buchsbaum. 2018. Sensitivity to Shared Information in Social Learning. Cognitive Science 42, 1 (2018), 168–187.
[48] Inês Xavier. 2021. Wealth Inequality in the US: The Role of Heterogeneous Returns. (2021). SSRN Working Paper 3915439.
[49] Chao Yu, Akash Velu, Eugene Vinitsky, Jiaxuan Gao, Yu Wang, Alexandre Bayen, and Yi Wu. 2022. The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games. In Advances in Neural Information Processing Systems (Datasets and Benchmarks Track), Vol. 35.
[50] Stephan Zheng, Alexander Trott, Sunil Srinivasa, David C. Parkes, and Richard Socher. 2022. The AI Economist: Taxation Policy Design via Two-Level Deep Multiagent Reinforcement Learning. Science Advances 8, 18 (2022), eabk2607.