Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Model vocabulary

A pylcm model is a collection of regimes observed over a finite age grid. Each regime describes one decision problem:

Economic objectpylcm declarationExample
Predetermined informationstateswealth, health, employment status
Choices made nowactionsconsumption, work, next durable stock
Flow payoffs and intermediate quantitiesfunctionsutility, resources, taxes
Feasible choicesconstraintsborrowing or time constraints
Laws of motionstate_transitionsnext wealth, health probabilities
Movement between decision problemstransitionwork → retirement → death
Numerical methodsolvergrid search or an EGM-family solver

Functions form a dependency graph through their argument names. If utility takes consumption and leisure, pylcm supplies those names from actions, states, other functions, or parameters. Parameters are the names that remain after the graph is assembled.

Regimes are economic states, not code branches

A regime is useful when the available states, actions, equations, or transition laws change qualitatively: employment versus retirement, single versus married, alive versus dead. The regime’s name is the key in Model(regimes=...); its transition says which regime can follow.

Grids and transition laws answer different questions

A grid states which values a variable may take. A transition law states how its next value is produced. Deterministic laws are ordinary callables; stochastic laws use MarkovTransition, a stochastic process, or JointTransition when several outcomes must share one draw.

Solvers constrain how the economics is declared

GridSearch evaluates complete state-action candidates and therefore accepts the broadest model vocabulary. EGM-family solvers gain speed by using particular economic roles: liquid resources, consumption, savings, and sometimes an outer durable or illiquid margin. Those roles live on specialized regime classes rather than in the solver configuration.

Read Choose your starting declaration before writing a larger model. The User Guide then develops each object, while the Reference states the exact contracts.