How agentic AI models could (finally) open the door for agent-based modeling in economics

Everyone loves a trilogy, so let’s wrap this up. I told you why agent-based modeling never broke through in economic research. I told you how it could eventually matter. Now I’m going to tell you how AI could, and maybe should, actually make it happen. And as someone who is not fully “AI-pilled”, I will confess that there aren’t that many avenues in which I am particularly excited about AI contributions, particularly in the arts, and even where I see opportunities for great things, I remain pessimistic that Gresham’s Law is going to hit us hard and fast while we are still learning to culturally and institutionally separate the wheat from the slop-riddled chaff.

But let’s put on our more optimistic glasses for the moment and think through what the opportunity for AI to guide agent-based economic modeling into a new (and first) golden age.

First, let’s define a few terms. When I refer to Agentic AI I am specifically considering an LLM model that is capable of autonomously pursuing goals, taking actions, and adapting their behavior in response to new information, all based on a set of pre-defined rules and reward functions and with little to no need for continuing human instruction. When I refer to an Agent-Based Model (ABM) I referring to a computational model of an economic or social system in which individual, heterogeneous agents (consumers, firms, workers, etc) make decisions according to specified behavioral rules, interact with one another and their environment, and collectively generate aggregate economic outcomes.

I don’t want to be wholly redundant with my previous posts, but it’s important to revisit a key theme that ran through both posts: the greatest strength of agent-based modeling is it’s ability to accomodate incredible depth of individual and institutional heterogeneity. Which is a nice way of saying that it is parameter rich. Which is itself a nice way of saying that the models can generate any result without the prospect of credibly investigating the mechanism behind those results and, more importantly, suffiently culling enough noise from them to learn anything about how the world works. For those less familiar with the curse of dimensionality, let me explain.

If a model has 2 parameters you can simply run a grid search of every possible combination of those parameters and observe what kind of outcomes are generated. If you had an agent-based model with 100,000 agents randomly interacting you could still investigate the parameter space by “running” the model 1000 times for each possible combination of parameters and look at the full distribution of outcomes, reporting the mean, variance, and individual quantiles of every outcome of interest for each combination in your grid of parameters. Your results might look like this:

This is a useful way to design and investigate an agent-based model. But you probably already see the problem. Sure, toy models with two parameters are cute, but how do I answer complex economic questions? Toy models can only take us so far. And that’s the rub.

Once you start really start trying to advance economic theory of large, complex economic systems with an agent-based model you’re going to have a lot of visible parameters and lot more less visible parameters. An ABM will be composed of:

  1. Agents (people)
  2. Collectives of agents (firms, clubs, mosques, families, states)
  3. Rules for agent decision-making
  4. Rules for collective decision-making
  5. A context, network, and/or phystical environment with it’s own rules

Every single item on that list will in turn have attributes with both

  1. Initial conditions
  2. Distributional characteristics of those inititial conditions i.e. mean, variance, etc
  3. Are they fixed, exogenously varied, or endogenously varied over time?

Take the first list and add up the total agents, collectives, rules, etc. Then multiply those by each other and by every decision that has to be made in the second list. That number will likley be in the thousands. Congrats, that’s how many true model parameters you have.

With modern macroeconomics, and I am speaking here as a non-macroeconomist, your goal is to reduce that parameter space using basic logic, empirical observation, and modeling decisions that collapse heterogeneity to a small number of representative agents or types. You produce equilibria predictions at each stage of your model and compare them to objective reality. Once the model is sufficiently micro-founded and validated, you can then generate predictions and investigate mechanisms.

The whole point of agent-based modeling, however, is not to collapse the model to a small numbe of representative agents. It’s to endogenously grow aggregate outcomes from the individual endogenous decisions and how, through interactions within the model, they aggregate into predictions for a social system. So what’s the problem? Let’s assume every agent type and collective is characterized by 5 attributes and that each attribute is characterized by 3 statistical properties. Each rule comes with 3 functional variations, characterized by 3 weights each. We’ll then say that there are 5 total agents ( 2 individual types and 3 collectives), for each of whom half of attributes are fixed and half are endogenous. They manner in which they are endogenous has 3 functional variants. If we want to do a true grid search, we’re looking at least at a 5000 combination parameter grid space.

And we are no where near done yet, because we haven’t considered how time works. How steps and sub-steps are ordered. What decisions are synchronous, asynchronous, hieracherially ordered or random. We haven’t considered the social or physical environment What’s you start digging in, your parameter space starts gaining orders of magnitude. And then you realize the real problem is that true grid search of the entire parameter space would take until the heat death of the universe.

What’s the solution to a grid search? A (literal and metaphorical) golden section search. For those unfamiliar, a golden section search reduces the reduces the compuational burder of a grid search by iteratively narrowing the search interval toward an optimum, rather than evaluating every possible parameter combination. What we need is a way to search through a each parameter until we can confidently reduce it to smallest possible window that actually needs to be investigated to properly answer the research question. We need to make decisions.

And that’s what research expertise really is – competently making decisions about what can and should be varied, what can and should be assumed, etc, until we have a tractable question and well-executed research endeavor to answer it. The ABM space is too big for a researcher, however, because too much of the competent execution of research is unobservable, possibly even to the researcher themselves, as the model and the interactions of each decision become intractably complex. Too big for a human researcher. But what about an Agentic AI?

What if we created a base ABM, handed it to an Agentic AI, and told it to recursively evaluate and update the model until the model and the results it generated met a pre-defined set of necessary meta-conditions that the researchers defined as i) a falsified theoretic prediction, ii) generated via observable, definable mechanisms, iii) dependent on a maximal set of modeler decisions, and iv) and independent of set of unlimited, but fully observable modeler decisions?

This is going to take a long, but not necessarily intractable amount of time because we can also define a series of “golden section” adjacent rules that allow the AI to decide with a parmeter, rule, or decicsion is sufficiently irrelevant to ignore or sufficiently constrained to tractably investigate as key outcome determinant or source of outcome sensitivity.

As long as I am giving unsolicited advice to graduate students everywhere interested in agent based modeling, I would suggest forcing such an Agent AI modeler to exclusively use a constrained, pre-defined modeling language or library. Further, you probably want to force a literal, numerical maximum on the number of lines or characters of code. And, lastly, you’ll want to come up outcome rules by which the Agentic AI has to itemize and defend every single deviation of the final model from the base model handed to it. By constraining AI to a limited variety and quantity of coding objects, you are in turn ensuring that the resulting model and the internal mechanism will be transparent to the researchers managing the AI and the broader discipline evaluating them.

Agentic AI offers researchers the ability to iterate through the prospective solution space for modeling problems otherwise intractable via brute force. Further, it allows researchers transparently reveal the instructions that guided the agentic AI dimensions on which the generated model is sensitive to both varied parameters and modeling decisions. It allow for two hierachical levels of meta-research transparency.

That’s what I would be coding write now if I was a PhD student interested in contributing to economics and other social scientific disciplines via agent-based modeling.

Economy of Communion and Expressive Rationality

Today I am learning about The Economy of Communion movement in Omaha, NE. My visual first impression of downtown Omaha is that it looks like mid-century New York City.

The Economy of Communion, founded by Chiara Lubich in Brazil in 1991, is an example of cooperation emerging through voluntary economic relationships. Businesses participating in the movement operate in competitive markets, but they commit to sharing profits and supporting people in need.

EoC gave me some books in which I came across a chapter by Luigino Bruni that included a passage on expressive rationality:

A rationality that is capable of communion should also transcend the simple instrumental logic… This term was introduced to indicate economic action that is guided not by a logic that is primarily instrumental, but by the desire to “express” something of one’s own personality or one’s own values…

Some concept of this runs through economic literature (Kreps 1997). Bruni claims that the idea can be traced back to Max Weber. The EoC project could also relate to the work of Elinor Ostrom (1990), who challenged the conventional wisdom that common resources inevitably suffer from overuse. Ostrom documented communities that successfully developed their own institutions for cooperation.

  • Economy of Communion. “About the Economy of Communion.” Official project website.
  • Kreps, David M. “Intrinsic Motivation and Extrinsic Incentives.” The American Economic Review, vol. 87, no. 2, 1997, pp. 359–64. JSTOR, http://www.jstor.org/stable/2950946. Accessed 7 Nov. 2026.
  • Ostrom, Elinor. 1990. Governing the Commons: The Evolution of Institutions for Collective Action. Cambridge University Press.

Fiscal Health & Divided Government

For the past two years, we’ve had a unified government in which the Republican party has populated the White House and had majorities in both chambers of congress. Once the new legislators are in office we’ll have a divided government. That means that the political party controling the White House won’t also control the senate and house of representatives. In the spirit of saying something of substance, I want to know what the implications are for our fiscal picture.

One can measure fiscal health in many ways. Does a divided government bode well for shrinking the deficit? Rather than spit-ball about politics, I take the data since 1960 in one hand and a model in the other. See the end notes for model details.

Since 1960, the most popular form of government split has been a Democratic president and unified government, followed by Republican presidents and a divided government. Democrats have controlled at least one chamber of congress for 62% of the years. Do these splits matter for federal outlays, receipts, and the deficit? Since a unified democratic government was most common, I use that as the baseline fiscal case and compare the cases to it.

Below are the average impacts of government-party types on federal spending, revenues, and the deficit. The blanks are insignificant differences. On average, the only party split that results in less spending is a Democrat president with divided government. Those and unified Republican governments raise more revenue and reduce the budget deficit from its trend (there was a small decline in in discretionary spending at the start of Trump’s 2nd term with a unified government).  The bad news for deficit hawks is that Republican presidents with a divided government – the type that we’ll have for the next two years – perform poorly. On average, they reduce government revenue and increase the deficit. Again, all of this is ‘on average’.

Continue reading →

Welcome Back, Divided Government

Last week I predicted:

the midterm wipeout is coming.

I predicted a ‘moderate red wave’ here in 2022. I predict a blue wave for 2026 that is bigger than the red wave of 2022, though not a ‘mega tsunami‘

That post looks good now with the exception of those last five words- it was in fact a blue ‘mega tsunami’ by Kalshi’s definition (Democrats hold 240+ House and 54+ Senate seats).

Polling from the WSJ backs up my assessment that this was mainly about the economy and prices:

This comes after a longtime WSJ editorial writer hoped for a big Republican loss, something I’ve never seen from the WSJ before. But if they speak for the markets, it makes sense- US stocks opened up 2% the day after the election.

Crypto and gold prices are also up, an odd combination. Oil prices are down, perhaps seeing an end to the Iran war as more likely. Polymarket shows the odds of a US invasion of Iran this year down 5%. John Ossoff and Ron Desantis saw their odds of becoming President in 2028 rise at the expense of JD Vance and Gavin Newsom.

What will we see change on economic policy? Congress may lower tariffs and take back some of the tariff power they have long delegated to presidents. The Federal Reserve board will feel more free to raise interest rates if they think it is warranted. Many state-level results mean data centers will get harder to build, which will hurt the ‘picks and shovels’ companies literally building them but not necessarily the frontier labs who won’t be able to spend as much on racing ahead. NVDA and Micron stock is down while Google, Meta, Anthropic and OpenAI are up.

But the fact that President Trump still has veto power will limit how many big changes we’ll see over the next two years for anything that would require a new bill. Welcome back to divided government, to gridlock, and to checks and balances.

The Blue Wave Was Not That Surprising If You Followed Prediction Markets

The election last night was clearly a victory for Democrats. But was it a surprise? For the most part, no, especially if you follow prediction markets. Here’s what the Senate map looked like on ElectionBettingOdds.com the night before the election:

Of course, there are still a few surprises on that map, such as Iowa, South Carolina, and maybe Mississippi. But only Mississippi was a huge surprise. Betting markets had Iowa as a toss-up, and South Carolina as 2/1. And even in Mississippi, the Democrat had 1-in-7 chances based on the average across three betting markets. 1-in-7 chances do happen sometimes! None of the states that were solid blue or red on the map (indicating >90% chances) went the other way. But even without those three races, it was clear that Democrats were the favorite (even if the extent of their domination wasn’t completely clear the day before).

And these are not just a few cherry-picked results from one election. A recent paper published in PNAS shows that across a wide variety of outcomes, prediction markets are “well calibrated” — that is, events with X% probability on prediction markets tend to happen… about X% of the time!

UPDATE: Here’s a calibration Kalshi just provided for the 2026 midterms:

I Found My Lost Wedding Ring with Cheap Metal Detectors (Bounty Hunter Tracker IV, SUNPOW OTMD12)

About two weeks ago, after my wife and I boarded our plane and settled into our seats, she (seated to my left) noticed that my wedding ring was missing. “Huh,” I said, “That’s weird. I never take it off.” Where could it be?  I remembered that just before we left, I had vigorously shaken the water out of a washed, paintbrush, using a whiplike motion of my arm. And that could have worked my ring off my finger, without me noticing. Maybe. If that’s what happened, my ring was lost somewhere in a 10 ft x 20 ft strip of dense grass. Some kind family members spent time on their hands and knees looking there on my behalf, without results.
A replacement genuine 14 karat gold ring might run close to $1000. Cheaper imitation gold rings are available, of course. But, being a techie, I wondered if I could find my ring using a cheap metal detector.

There is a fraternity of serious coin/jewelry hunters, who you see swinging detectors along at the beach. They also enjoy finding artifacts at historical sites, etc. They use more expensive metal detector gear, that really does perform better, especially at distinguishing signals from gold/silver/copper, versus iron/steel trash items. This is essential if you are trying to search large areas efficiently for gold/silver/copper-based coins and jewelry. But since I wasn’t sure my ring was actually lost in that grass, I wanted to minimize my investment. AI helpfully zeroed in on the Bounty Hunter Tracker IV as the cheapest regular metal detector that would perform reasonably well. I got it on Amazon for $71.



I refer the reader to more extended reviews, such as are here and here and here, for technical details on this device. I will just note here that it did exactly what I needed to do. In its “tone” mode, it is relatively insensitive to small steel objects, and puts out a distinctive low tone for gold (vs. a high beep for copper/silver). As with all such metal detectors, you have to swing it back-and-forth to generate a signal. I swept my 10 x 20‘ area, and got about a dozen hits (beeps). I marked these locations with tabs of blue painter’s tape, some of which are visible in this photo (click to enlarge):


This type of metal detector, with a flat coil that you swing over the ground, is good for detecting the approximate location of metal at or near the surface. But AI recommended also getting a “pinpointer” type detector for zeroing in to the nearest centimeter/ inch. Supposedly the cheapest such pinpointer that gives reasonable performance is the SUNPOW OTMD12, available for $20 on Amazon. It doesn’t discriminate among different metals, it just beeps and vibrates when the tip gets close to metal. See comments on Amazon, and reviews here and here:



I poked around with the pinpointer on the first ten or eleven locations found by the bounty hunter. There was no metal on the surface, but it still beeped on about half of the locations, suggesting there were fairly large pieces of metal buried at some depths.

Then, at the far edge of my 10’ x 20‘ search area, I heard a special low-pitched tone from the Bounty Hunter, indicative of gold or nickel. I poked around with the pinpointer, zeroed in with its beeps, and pulled aside the grass, and…there was my ring, bought by my sweetheart nearly fifty years ago:

A very welcome sight indeed, which was invisible until the grass over it was pulled aside. Besides my ring, I now have a couple safe, intriguing devices for my grandkids. A way to keep kids occupied is to throw a handful of pennies or other coins out on the lawn and turn the kids loose with the metal detectors.

Halloween candy quality has plummeted

There’s plenty of press about sticker shock on halloween candy prices this year, but the day having arrived and the candy now opened, I can tell you the biggest shock to me was how notably inferior it was to standard “full size” candy equivalents. The Kit Kats are thin and flavorless, the Twizzlers taste like bottom shelf generics. I had heard that chocalate products had reduced their cocao content, but Twizzlers? I tried a few other gummmy candies from other brands and they were inedible. As a livelong afficianodo of Halloween childhood sugar crashes and adult weight gain, this is a generational crime.

It’s a good reminder that shrinkflation often hits quality harder than quantity. Whether there is a direct tariff or not, the reality is that everything costs more to import than it used to. Cross product subsidies exist in every dimension when you’re trying to fill a cargo ship. Your kid’s candy haul this year is one of the purest ways to experience the thousands of sources of consumer surplus lost as we’ve crippled our own economy for no reason but spite and ignorance (all dusted with the unmissable taste of xenophobia and racism).

I used to worry about the first week in the office after Halloween and all the willpower that I was going to have to muster not to sample a Twix, Kit Kat, Snickers, or Twizzler every time I needed to get up from my desk.

Not going to be a problem this year.

Prompting versus fine-tuning

I saw a paper presented at the Economic Science Association meeting that relates to my project on fine-tuning with Josh Foster.

Aligning AI Agents with Economic Preferences in Strategic Environments

Abstract: As large language models (LLMs) increasingly act as autonomous agents in markets and organizations, their behavior in strategic environments becomes economically consequential. We document that off-the-shelf LLM agents exhibit systematic deviations from payoff-sensitive behavior in canonical economic games, including excessive cooperation and limited responsiveness to incentives. We introduce a supervised fine-tuning approach that aligns agent behavior…

LLMs agents get us thinking about humans in a different way (e.g. consciousness and language). We find that fine-tuning alters LLM “behavior.” Prompting matters, too, since everything matters. But fine-tuning is probably more reliable as a way to ensure that a model will act the way you want it to in a wide variety of contexts.

An analogy comes to mind. Prompting is like yelling at your kid to get up so they are not late for school (usually works, but you have to do it every morning). Fine-tuning would be like teaching them to set their own alarm.

Random Sample Vs Sobol Sequence

Say that you have a bachelor’s in finance, but that you’re not exactly a ‘math’ person. You know that diversification is good for reducing the volatility of returns, but the calculations are a bit mysterious to you. You know what the efficient frontier is, but its calculation is elusive. All is not lost! There are alternatives to the math: Sampling methods. By testing a few possible portfolios, we can get an idea of which one is the best fit for you. Here I’ll provide an example using 1) a simple random sample, 2) stratified random sample, 3) Sobol sequence, & 4) Scrambled Sobol.

I’ll use a two-asset portfolio here for ease. I assume that the portfolio includes no short or leveraged positions and that the asset weights sum to one. This is known as ‘long only’. The challenge is that we want a certain return-volatility profile for our portfolio, but it’s a bit hard to figure out what our options are. Luckily, both return and standard deviation (SD) of a portfolio are determined by the weights on the individual assets.

With a long only portfolio, all possible weights are uniformly distributed between one asset having zero weight and the same asset having 100% of the weight. Since the weights sum to one, whatever weight remains after the first asset is attributable to the 2nd asset. See the figure below. Unlike many distributions, we know exactly what’s possible for the weights. The portfolio expected return is simply the linearly weighted average and the portfolio variance is quadratically weighted. Return and SD equations are below.

The portfolio return is mathematically easy, since it’s just a linear average: more weight on asset A implies a rate of return that is closer to that of asset A. But the same is not true for SD, due to the covariance component. We can graph how both portfolio returns and SD are related to the asset weights below.

We already know that the possible weights are distributed uniformly (and so are the returns), but the possible SD are not distributed uniformly. Without the math, we want to know what our possible portfolio SD are so that we can determine what mix of assets is right for us. This example is a bit trite, but the gains occur when generalizing to many-asset portfolios. We can choose from a few methods for describing the correspondence between weights and the SD.

Method 1: Random Sample

The easiest thing to do is take a random draw of a few weights and calculate their associated returns and SDs. However, randomness also implies that we may get a set of points which are clustered together or that don’t sample the various nooks and crannies very well.  An example of a random sample is below, along with a line that connects the sampled options (I assume that we know the extrema weights: 0% & 100% values). Random sampling does an ‘ok’ job of choosing relevant portfolio allocations. But due to the random nature, substantial pieces of the actual SD menu options may be omitted. Sometimes the omitted portions are no big deal and other times they are – and which occurs entirely at random.  In the image below, the random portfolios left out the possible allocations that yielded the lowest volatility.

Method 2: Stratified Random Sample

The fact that the possible weights are distributed uniformly in weight-space is a big advantage. One way to constrain our sample of weights is to use a stratified random sample. In this case, we split the uniform weights into several equal intervals and then take a random sample from within each interval. This ensures that each interval’s characteristics are reflected, even partially, in the overall sample. The various shaded regions below reflect the regions from which a sample was drawn. While the regions are uniformly distributed, the random sample(s) within each region can occur anywhere within the region.

The green line implied by the sample is closer to the minimum SD, and the portions that have less weight on asset A are now less accurate (further from the dotted line). So, we gained some precision in some parts of the SD correspondence, but lost some in others. Loss is especially likely to occur near more jagged or irregular possible values. Since we don’t necessarily want the minimum SD allocation, using a stratified random sample is not always better than a simple random sample. But at least the maximum gaps between the observations are constrained. A simple random sample can detect local irregular shape sometimes, whereas a stratified random sample might always lack adequate resolution in a narrow interval.

Method 3: Sobol Sequence

Continue reading →

Midterms: It’s The Economy

This is my last post before the midterms Tuesday. What will they bring?

Midterm elections are usually bad for the President’s party:

I don’t think this year will be an exception to the rule. I see many indicators pointing in the same direction.

The largest US prediction market Kalshi currently gives Democrats a 91% chance to take the House and a 66% chance to take the Senate. The international Polymarket and play-money Manifold currently give slightly higher chances, 93/67 and 94/69. Forecaster Nate Silver is higher still at 95/76.

The best odds I’m seeing for Republicans among the models I have followed for years is Ray Fair giving Dems only a 60% chance to take the House (he doesn’t forecast the Senate). In Fair’s model, the economy is working in favor of Republicans; inflation is a negative for them but economic growth is a stronger positive (including the 3.4% Q3 GDP estimate just released today).

In practice though I think economic issues are working in favor of Democrats. The economy is good in many ways, like 4.2% unemployment- but most people aren’t happy about it. Consumer sentiment is at record lows. Economic growth is solid but largely driven by the AI boom, which gives people plenty to be nervous about. Inflation is only a bit high (3.4% vs a 2% target) but easy to tie to administration policies like tariffs, war, and pressuring the Fed to lower interest rates. Ad spending indicates that politicians on both sides think tariffs have gone from a minor issue that voters have mixed feelings about to a major issue that voters don’t like:

Gas prices have long been especially salient, and are currently high because of the Iran war. I said here in March:

if the US administration wants to avoid a midterm wipeout driven by high gas prices, I see only 3 options:

  1. Get lucky and see the Iranian regime fall quickly
  2. Negotiate an end to the war quickly (which might itself be unpopular if they can’t get a good deal) or just declare victory and go home (but its not clear whether Iran would re-open the strait now just because the US stopped bombing)
  3. Restrict Exports

But they took none of those three options, and now it seems the midterm wipeout is coming.

I predicted a ‘moderate red wave’ here in 2022. I predict a blue wave for 2026 that is bigger than the red wave of 2022, though not a ‘mega tsunami‘. The main things Republicans have going for them are the Senate map (Dems need to win in multiple 2024 red states to win) and the possibility that angry anti-incumbent voters will take down some Dems too.