Computational Approaches to the Non-Observed EconomySpace and systems

Module 7Simulating the hidden economy

An agent-based model is an executable theory: agents with states, information, actions and rules, meeting each other under institutions, with totals computed afterwards. We design one from a question, compare decision rules (beliefs, noisy choice, thresholds, communication, learning), and build Saltmarsh, an invented town of 400 firms where hiding emerges unasked and feedback through revenue, services and trust makes a recession leave a mark and history matter. Then we connect levels, calibrate honestly when many settings fit one history, and use learning and language-model agents with validators and logs.

By the end you should be able to design an agent-based model from a question, choose and test decision rules, follow micro–macro feedback, validate at several levels, report the set of acceptable calibrations, and state what each scenario really assumes.

Key ideas, one per video

  • Video 14Beliefs, not true audit rates, drive choices (30% hidden when firms know the rate, 36% or 20% when they believe otherwise). Complex contagion reached everyone on a clustered network and 1% on a random one; learning firms hid 28%, not the textbook 69%.
  • Video 15A recession left hiding about a point higher two years after demand returned. At a 6% audit rate, a town that started with hiding common ended at 38% against 29%. Two calibrations with the same average disagreed completely about targeted audits.
  • Video 16Adding the honest share as a second target left one setting. Risk-score audits recovered most per audit (0.28) but left more hiding (35% against 30% at random). The peer version fit the past better and forecast worse; repeating last year's benchmark was off by 0.4.

Book: Chapter 7 of Computational Approaches to the Non-Observed Economy: From Theory to Practice (coming soon). The videos and slides follow the chapter’s topics in our own words, figures and simulations; the towns and countries are invented, and nothing is copied from the book.

The title slide of Module 7: Simulating the hidden economy

32 slides, written to be read on your own, with worked examples, our own small simulations and check-yourself questions (answers at the end). PDF, 5.5 MB.

Watch

3 videos for this module, each about 8 to 11 minutes. Pick one from the list, and open the transcript to read along: each timestamp plays the video from there. The narration is generated with a voice clone of Teddy, used with his permission.

Video 14 · 8:12

An executable theory

A thousand invented traders, the same average threshold: a narrow spread keeps hidden trade at 2%, a slightly wider one takes it to everyone.

Beliefs, not true audit rates, drive choices (30% hidden when firms know the rate, 36% or 20% when they believe otherwise). Complex contagion reached everyone on a clustered network and 1% on a random one; learning firms hid 28%, not the textbook 69%.

TranscriptVideo 14
0:00

Same people, opposite outcomes. A thousand invented traders. Nobody is told to hide anything. Each one simply watches the others, and joins in once enough of them do. Give them thresholds that vary a little, and hidden trade never takes off. It stays with the two percent who started it. Make the thresholds vary a bit more, with the same average, and everyone ends up joining. Same people on average, opposite outcomes. To see effects like this, you have to let agents act and interact. That's agent-based simulation.

0:42

Three steps. Welcome to Module 7: simulating the hidden economy. I'm Teddy. In this video we'll build the idea of an agent-based model, design one from a question, and look at the rules agents use to decide: alone, in groups, and by learning.

0:56

What an agent-based model is. An agent-based simulation is an executable theory. Every agent has a state, information, a set of possible actions, and a rule for choosing among them. Agents can be people, households, firms, banks, platforms, or a tax office. They don't have to be identical. Differences are represented directly, not averaged away. Institutions decide which deals are allowed, taxed, reported, or visible. Totals like output or the hidden share are computed only after the agents have acted. The cycle repeats: agents observe, decide, interact, and the world updates. Whether everyone acts at once, or one after another, is part of the model, not a coding detail. Annual tax declarations fit agents acting together, once a year. Word of mouth and inspections fit agents acting one after another, each seeing what came before. How is this different from other tools? A microsimulation applies estimated transitions to individual records, usually without interaction. A system-dynamics model tracks aggregate stocks and flows. A game focuses on payoffs and equilibrium. An agent-based model can borrow from all three. Its defining feature is that heterogeneous agents and their interactions are actually executed. For the hidden economy, the key unit is often the transaction: its true value, its declared value, how it was paid, and whether the authority can see it. That separates breaking a rule from being unseen. A legal sale can be missing from statistics. A caught evasion is no longer hidden.

2:27

Start from a question. Start from a question, not from software. Does a higher audit rate reduce under-reporting? That needs a small population and a simple reporting rule. Does platform reporting change informal work, firm entry and revenue? That needs workers, firms, a platform, transactions, and feedback over time. Then make the design decisions in order: outputs, agents, states, information, actions, rules, interactions, institutions and observation, the evidence for calibration, and the experiments. Keep only the differences that matter for the mechanism. If income and tax morale drive reporting, let them vary. Don't simulate eye colour because a generator can. Begin with the smallest model that can answer the question, test it, and add a mechanism only when you can show it's missing. And describe it so others can rebuild it: who the agents are, what they know, what they can do, why they choose, who they meet, and how outcomes are measured.

3:21

Deciding alone. Now the decision rules. The classic starting point is expected utility: weigh the tax saved against the expected penalty, the moral cost, and the social cost. In our setup, the tax is 25 percent and the penalty adds 50 percent of the hidden amount. With no moral cost, hiding pays unless the audit chance is above one in three. But agents act on what they believe, not on the true rate. We gave 2,000 firms different moral costs and a true audit chance of 4 percent. If they know the true rate, they hide 30 percent of their income. If they believe it's 1 percent, they hide 36. After a visible campaign, believing it's 10 percent, they hide 20. People also have limited time and attention. They satisfice, use rules of thumb, or choose noisily, picking better options more often but not always. A noisy choice rule has a consistency parameter. In our firms, a perfectly consistent rule leads 36 percent to hide. As choices get noisier, that share drifts toward half. Noise can stand for real experimentation. It shouldn't hide a missing mechanism. Vary it, and check that conclusions don't depend on implausibly frequent mistakes. Choices under risk can also lean on a reference point. A penalty can feel like losing money already in hand, and a small audit chance can feel bigger or smaller than it is.

4:43

Thresholds and contagion. Decisions are made in groups. Peers carry information about audits, set norms, and make some actions easier. Invoice-free trade is easier when your suppliers already accept it. A threshold rule captures this. Each agent joins once the share of others doing it passes their personal threshold. Our thousand traders have thresholds averaging 30 percent, and two percent start. With a narrow spread, hidden trade stays at two percent. With a slightly wider spread, it reaches everyone. Here's the starkest version. A hundred agents with thresholds zero, one percent, two percent, and so on. Each one's joining triggers the next, and everyone joins. Change one agent's threshold from one percent to two, and the chain stops at the first person. Some behaviour needs reinforcement from several contacts. If a trader joins only after two neighbours have, it spread to everyone on a clustered network, and to about one percent on a random one. Simple contagion, needing just one contact, spread everywhere on both. So the network's shape matters, and so does the rule.

5:49

The communication rule. Beliefs spread too. Suppose 200 agents each hold a view on how acceptable undeclared work is, and they talk. Same starting views, three communication rules. With open averaging among neighbours, everyone converges to one shared view. If agents only listen to people who already think alike, the population splits into four separate camps. If one agent in ten never changes their mind, agreement never arrives. Views stay spread out for good. Agents learn from peers is not a model. The communication rule is the model.

6:25

Learning. Finally, learning. A simple learner keeps a value for each action and nudges it after every outcome. Hide and escape, and hiding looks better. Get caught, and it looks worse. With a 5 percent audit chance, the textbook answer says about 69 percent of our firms should hide. After thirty years of quarterly learning, 28 percent do. Learning is slow, and it depends on luck. Among firms with similar moral costs, every one that was never caught ended up hiding. Of those caught early, only about four in ten did. Evolutionary rules work one level up. Strategies that do well get copied, weak ones disappear, and mutation keeps adding new ones. A learned policy isn't free of assumptions. The reward, the actions, the exploration and the training world all encode a theory.

7:15

Recap. Let's recap. An agent-based model is an executable theory: agents, information, actions, rules, interactions and institutions. Start from a question, keep only the differences that matter, and describe the model so it can be rebuilt. Beliefs differ from the truth, choices are noisy, thresholds create cascades, communication rules shape consensus, and learning depends on rewards and luck. In the lab, you'll set thresholds, networks and communication rules, and watch hidden trade spread or stall. Next video: from many small decisions to a whole economy, and the feedback that ties them together.

Interactive lab

Town in silico

Run a small agent-based town of 300 invented firms. Change the audit rate, how much firms copy their peers and how much their moral costs vary, add a recession or e-invoicing, and look for lasting marks and tipping points.

A small version of the videos' Saltmarsh, simulated in your browser. Four challenges are checked as you go.

Simple math

Town in silico: 300 firms, nobody told to hide

A small version of the videos’ Saltmarsh. Every quarter each invented firm chooses how much of its cash sales to declare, weighing the tax, the audit risk it believes, a moral cost that grows with trust, and what its peer group does. Card sales are always recorded. Trust follows the revenue the town collects.

A firm’s choice
max −τd − p̂(τ+φ)(1−d) − m(1−d)

Declared share d; believed audit chance p̂; moral cost m.

Moral cost
m = m₀(0.4 + trust) − peers × group hiding

Peers make hiding cheaper; trust makes it dearer.

Feedback
trust ← trust + 0.25(services − trust)

Services are paid by the revenue actually collected.

Hidden share (end)
–
Firms declaring everything
–
Top tenth of firms hold
–
Started high vs low
–

Running…

Hidden share, quarter by quarter

Challenges

Each one is checked on your current settings.

  1. Find an audit rate where a town that starts with hiding common ends at least 5 points above one that starts honest.
  2. Switch on the recession and see hiding still at least a point higher two years after demand returns.
  3. Switch on e-invoicing and see the small firms, which were not reformed, hide at least 8 points less.
  4. Get the hidden share below 15% with an audit rate of at most 8%.