labor_market#

Labor market events for wage setting, applications, and hiring.

This module defines the labor market phase events that execute after planning. Firms post wage offers, unemployed workers apply to firms, and firms hire workers through a batch matching process.

Event Sequence#

The labor market events execute in this order:

  1. CalcInflationRate - Calculate inflation rate (configurable method)

  2. AdjustMinimumWage - Update minimum wage based on inflation (periodic)

  3. FirmsDecideWageOffer - Firms post wage offers with random markup

  4. WorkersDecideFirmsToApply - Unemployed workers select firms to apply to

  5. LaborMarketRound - Batch labor market matching (max_M times)

  6. FirmsCalcWageBill - Calculate total wage bill from employed workers

Design Notes#

  • Events operate on employer and worker roles (Employer, Worker)

  • Economy-level state (min_wage, inflation) updated by CalcInflationRate/AdjustMinimumWage

  • Loyalty rule: workers whose contracts expired (not fired) apply to previous employer first

  • Wage offers constrained by minimum wage floor

  • Contract duration: θ + Poisson(λ=10) periods

  • Batch matching: all unemployed applicants simultaneously send their next application, conflicts are resolved randomly (up to n_vacancies per firm), and accepted workers are batch-hired

Examples

Execute labor market events:

>>> import bamengine as be
>>> sim = be.Simulation.init(n_firms=100, n_households=500, seed=42)
>>> # Labor market events run as part of default pipeline
>>> sim.step()

Execute individual labor market event:

>>> event = sim.get_event("firms_decide_wage_offer")
>>> event.execute(sim)
>>> sim.emp.wage_offer.mean()
1.15

Check unemployment after hiring:

>>> employed_count = sim.wrk.employed.sum()
>>> unemployment_rate = 1.0 - (employed_count / 500)
>>> unemployment_rate
0.04

See also

bamengine.events._internal.labor_market

System function implementations

Employer

Labor hiring state

Worker

Employment state

Event Classes#

CalcInflationRate

Calculate and store the inflation rate for the current period.

AdjustMinimumWage

Periodically update the minimum wage based on realized inflation.

FirmsDecideWageOffer

Firms with vacancies post wage offers with random markup over previous offer.

WorkersDecideFirmsToApply

Unemployed workers choose up to max_M firms to apply to, sorted by wage.

LaborMarketRound

One round of batch labor market matching.

FirmsCalcWageBill

Firms calculate total wage bill based on currently employed workers.