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:
CalcInflationRate - Calculate inflation rate (configurable method)
AdjustMinimumWage - Update minimum wage based on inflation (periodic)
FirmsDecideWageOffer - Firms post wage offers with random markup
WorkersDecideFirmsToApply - Unemployed workers select firms to apply to
LaborMarketRound - Batch labor market matching (max_M times)
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_marketSystem function implementations
EmployerLabor hiring state
WorkerEmployment state
Event Classes#
Calculate and store the inflation rate for the current period. |
|
Periodically update the minimum wage based on realized inflation. |
|
Firms with vacancies post wage offers with random markup over previous offer. |
|
Unemployed workers choose up to max_M firms to apply to, sorted by wage. |
|
One round of batch labor market matching. |
|
Firms calculate total wage bill based on currently employed workers. |