Course Content
2nd Module: Agent-Based Models of Supply and Demand in the Rental Market
In the first unit of this course, we prepared the ground. We asked what the supply-and-demand diagram shows, and what it hides. We saw that the diagram gives us an equilibrium outcome, but not the market process that could produce that outcome. We also examined one of the hidden assumptions behind the diagram: fixed reservation prices. Finally, we asked what models are for, and distinguished between models used for prediction and models used for explanation. We are now ready to begin building agent-based models. This module starts with a familiar example: the rental market for student housing. At the beginning of the academic year, new students arrive in a city and look for rooms. At the same time, some homeowners have rooms available for rent. A textbook normally analyzes this market with supply and demand curves. It asks how many rooms students demand at each rent, how many rooms homeowners supply at each rent, and where the two curves cross. In this module, we take a different route. We begin with the agents themselves: students looking for rooms and homeowners offering rooms. We give these agents simple characteristics, such as maximum rental budgets for students and minimum acceptable rents for homeowners. Then we specify the rules of the market: what agents know, how they meet, how they negotiate, whether contracts are final, and whether contracts can be renegotiated. Once these rules are specified, we simulate the market step by step. The goal is not merely to reproduce the textbook supply-and-demand result. The deeper goal is to understand what must be assumed for that result to emerge. We will see that equilibrium does not appear automatically. It depends on strong assumptions about information, competition, contracts, search costs, and renegotiation. This is the power of agent-based modeling. It makes the hidden structure of the market visible. In Lecture 4, we build the first model. We begin with six students and six homeowners. We allow them to meet, bargain, form tentative contracts, and then compete under additional rules. By the end of the lecture, we will reproduce the familiar supply-and-demand outcome — but now we will understand the process behind it. This module marks the transition from critique to construction. We are no longer only asking what the diagram hides. We are now building the market beneath the diagram.
0/2
Agent Based Microeconomics

Lecture 4  

In the first three lectures, we asked what the supply-and-demand diagram hides.

We saw that the diagram shows an equilibrium price and quantity, but it does not show the market process that could produce that outcome. We also saw that textbook diagrams depend on hidden assumptions about information, behavior, contracts, search, and adjustment.

In this lecture, we begin the actual construction.

We will build a simple agent-based model of a rental market. We will not begin with curves. We will begin with students looking for rooms and homeowners offering rooms.

Then we will ask a key question:

Can a simple agent-based model reproduce the familiar supply-and-demand equilibrium?

If the answer is yes, we will ask an even more important question:

What assumptions were needed for that result to emerge?


1. The Rental Market Example

We begin with a familiar textbook example: the market for student housing.

At the beginning of the academic year, new students arrive in town and begin looking for rooms. At the same time, graduating students have left, so some rooms are vacant and available for rent.

A textbook analyzes this market by drawing demand and supply curves. It asks how many students want rooms at different rents, how many homeowners are willing to rent rooms at different rents, and where the two curves cross.

We will analyze the same market differently.

Instead of beginning with curves, we will put in the agents themselves:

  • students looking for rooms;
  • homeowners with rooms to rent.

The purpose is to rebuild the supply-and-demand result from the ground up.


2. Putting in the Agents

An agent is a decision-maker.

A student looking for housing has goals, information, constraints, expectations, and possible strategies. A homeowner offering a room also has goals, information, constraints, expectations, and strategies.

This is very different from the standard supply-and-demand diagram. In that diagram, the agency of buyers and sellers is mostly hidden. Buyers and sellers appear through curves, not as decision-makers.

But real agents search, compare, bargain, learn, make mistakes, revise plans, and adapt to circumstances. They also act with limited information. A student cannot choose the best room in the city if he does not know all the available rooms. A homeowner cannot choose the best tenant if she does not know all possible tenants.

Agent-based modeling begins by restoring this agency.

We ask:

Who are the decision-makers?
What do they know?
What do they want?
What strategies do they use?
How do they interact?
How does their interaction produce market outcomes?


3. Reservation Prices in the First Model

To build an ABM, we must say how agents decide.

In real markets, agent behavior can be rich and flexible. Students may change their plans, share rooms, live farther away, borrow money, negotiate, or continue searching. Homeowners may lower rents, wait for better offers, respond to urgency, or adjust expectations.

Agent-based models can handle these richer forms of behavior.

However, in this first model, we use a very simple decision rule: reservation prices.

Each student has a maximum rent they are willing to pay. Each homeowner has a minimum rent they are willing to accept.

This assumption is not required by ABM. We use it here because our first goal is to reproduce the textbook supply-and-demand result. Since textbook supply and demand requires reservation prices, we include them in the first model.

Later, we can relax this assumption and study what happens when agents adapt more realistically.


4. The Agents in Our Model

We use six students and six homeowners.

The students are:

  • SA(100)
  • SB(200)
  • SC(300)
  • SD(400)
  • SE(500)
  • SF(600)

The number in parentheses is the student’s maximum rental budget. For example, SA(100) means Student A can pay at most 100. SF(600) means Student F can pay at most 600.

The homeowners are:

  • HP(50)
  • HQ(150)
  • HR(250)
  • HS(350)
  • HT(450)
  • HU(550)

The number in parentheses is the homeowner’s minimum acceptable rent. For example, HP(50) means Homeowner P will accept a rent of at least 50. HU(550) means Homeowner U requires at least 550.

This gives us the first part of the model: the agents and their basic characteristics.

But agents alone are not enough.

To simulate a market, we also need rules.


5. Market Rules

A market is not defined only by buyers and sellers. It is also defined by rules.

In an ABM, we must state these rules explicitly.

We must specify:

What do agents know?
How do they meet?
When does a deal happen?
How is the rent chosen?
Are contracts final or tentative?
Can contracts be broken and renegotiated?
Is information public or private?
Are there search costs?
Are there legal or social penalties for breaking agreements?

These rules are part of the market microstructure.

In a supply-and-demand diagram, many of these rules are hidden. In an ABM, they must be stated openly. This is one of the great advantages of agent-based modeling. Assumptions become visible.

The agents plus the rules define the model.

Once we specify them, we can simulate the market step by step and see what outcome emerges.


6. Day 1: Limited Knowledge and Random Matching

For the first simulation, we use simple rules.

Each agent knows only their own reservation price. A student knows the maximum rent they can pay. A homeowner knows the minimum rent they will accept.

Students and homeowners are randomly matched.

If the student’s maximum budget is less than the homeowner’s minimum acceptable rent, no deal is possible.

If the student’s maximum budget is greater than or equal to the homeowner’s minimum acceptable rent, a deal is possible.

When a deal is possible, the rent is chosen somewhere between the homeowner’s minimum and the student’s maximum. The exact rent depends on bargaining.

These rules give us a simple first version of the rental market.


7. Day 1 Outcome

The lecture uses one possible random matching:

  • SA(100) meets HS(350): no deal.
  • SB(200) meets HP(50): deal possible.
  • SC(300) meets HR(250): deal possible.
  • SD(400) meets HU(550): no deal.
  • SE(500) meets HQ(150): deal possible.
  • SF(600) meets HT(450): deal possible.

This produces four contracts and two failed negotiations.

The rents are different: 100, 180, 290, and 590.

This is a realistic outcome. Real rental markets often show price dispersion. Similar rooms may rent for different amounts. Some students find good deals. Others pay more. Some negotiations fail.

But this Day 1 outcome is not the textbook supply-and-demand equilibrium.

It gives us an important lesson:

A market with agents, limited information, random matching, and bargaining does not automatically produce the textbook equilibrium.

To get the textbook result, we must add more assumptions.


8. What Must Be Added to Reach Equilibrium?

To move toward the supply-and-demand outcome, we need additional ingredients.

First, agents need information. They must learn something about the contracts others have made.

Second, there must be competition. Students paying high rents must be able to look for cheaper rooms. Homeowners receiving low rents must be able to seek higher-paying tenants.

Third, contracts must be renegotiable. If contracts are final at the end of Day 1, then the market stops there. There is no way to move toward the textbook equilibrium.

So we add three important rules:

  1. Contracts are tentative and can be cancelled within 24 hours.
  2. All tentative contracts are publicly announced.
  3. Students and homeowners can compete for better deals.

These rules create the possibility of movement toward equilibrium.


9. Competition and Renegotiation

Once tentative contracts are public, agents can compare their outcomes.

Students paying high rents look for cheaper rooms. Homeowners receiving low rents look for higher-paying students. Agents make new offers and try to improve their position.

This competition pushes rents toward a common range.

But notice what we have assumed.

We assumed that contracts can be broken without penalty. There are no legal costs, no delay costs, no reputation costs, and no moral or social penalties for cancelling agreements. We also assumed that information about all tentative contracts is public. We assumed agents can quickly identify better opportunities and compete for them.

These are strong assumptions.

They are not minor technical details. They are part of the market structure required to produce the textbook outcome.


10. Final Outcome

After several rounds of competition, the model reaches a final outcome.

At rent 310, three students rent rooms:

  • SD(400)
  • SE(500)
  • SF(600)

These are the students with the highest budgets.

The rooms are supplied by:

  • HP(50)
  • HQ(150)
  • HR(250)

These are the homeowners with the lowest minimum acceptable rents.

The students with budgets below 310 drop out of the market. The homeowners who require more than 310 also drop out.

This reproduces the textbook supply-and-demand outcome.

The students with the highest willingness to pay get the rooms. The homeowners with the lowest acceptable rents supply the rooms. The rent lies in the equilibrium range.

So the simple ABM has reproduced the textbook result.

But now we have seen the process behind the result.


11. What Did It Take?

This is the most important lesson of the lecture.

The supply-and-demand diagram makes equilibrium look simple. Demand and supply cross, and the market clears.

But in our ABM, equilibrium emerged only after we added a strong set of assumptions:

  • fixed reservation prices;
  • public information;
  • tentative contracts;
  • costless renegotiation;
  • competitive bidding;
  • price matching;
  • no search costs;
  • no legal, social, or moral penalties for breaking contracts.

This is the hidden market microstructure behind the diagram.

The textbook diagram does not show these assumptions. ABM makes them visible.

This changes our understanding of supply and demand. The equilibrium is not a natural or automatic outcome. It is the result of a particular market process under particular rules.

Change the rules, and the outcome may change.


12. Main Lesson of Lecture 4

Lecture 4 marks the beginning of actual agent-based modeling in this course.

We built a simple rental-market ABM and showed that it can reproduce the textbook supply-and-demand result.

But the deeper lesson is not simply that ABM can reproduce the textbook diagram.

The deeper lesson is that ABM reveals what the diagram hides.

To get the textbook equilibrium, we had to specify agents, information, matching, bargaining, contracts, public announcements, competition, and renegotiation. These assumptions are usually hidden inside or behind the diagram.

Agent-based modeling makes them explicit.

This gives us a more powerful way to understand markets.

We can now ask:

What happens if information is limited?
What happens if contracts are final?
What happens if renegotiation is costly?
What happens if search takes time?
What happens if agents make mistakes?
What happens if social norms prevent people from breaking agreements?

These are the kinds of questions we can study once we build markets from agents.

That is the promise of Agent Based Microeconomics.

Exercise Files
Lecture 4 Exercise Set.docx
Size: 22.50 KB
L4NS SD via ABM.pptx
Size: 117.77 KB
Lecture 4 Transcript.docx
Size: 23.90 KB