Stochastic dynamic programming with finitely many shocks #
The Bellman operator
T v s = sup { r (s, a) + β * ∑ z, p z (s, a) * v (g z (s, a)) | a ∈ Γ s }
where a shock z is drawn from a finite set with probabilities p z (s, a) and leads to
the state g z (s, a). This is the deterministic operator of
LeanEconomics.DynamicProgramming.Bellman with the successor state replaced by an
expectation over successors.
Why this is a new structure rather than a reuse #
The deterministic program's continuation is v evaluated at one point. Here it is a convex
combination of v at several points, which is not of that form, so the operator has to be
rebuilt. Everything above the operator is reused unchanged: the same Blackwell conditions
give the contraction, and the same Berge theorem gives continuity. Only the two facts about
the expectation are new, and they are exactly the two properties of a probability
distribution:
p ≥ 0gives monotonicity -- a larger continuation value cannot lower the average;∑ p = 1gives discounting -- adding a constant to the continuation value adds exactly that constant to the average, not more.
Shock probabilities may depend on the state and the action, which covers a Markov chain on a component of the state as the special case where they depend on that component alone.
Main results #
LeanEconomics.StochasticDynamicProgram.blackwell: the operator is a contraction.LeanEconomics.StochasticDynamicProgram.exists_optimal_policy: the value function satisfies the stochastic Bellman equation, and the maximum is attained.
A stochastic dynamic program with finitely many shocks.
- feasible : S → Set A
The actions available at each state.
- upperHemicontinuous_feasible : UpperHemicontinuous self.feasible
- lowerHemicontinuous_feasible : LowerHemicontinuous self.feasible
- reward : BoundedContinuousFunction (S × A) ℝ
The one-period reward.
The state reached when shock
zoccurs.The probability that shock
zoccurs.- discount : NNReal
The factor applied to next-period value.
Instances For
The expected continuation value of v after choosing a at s.
Equations
- D.expectation v p = ∑ z : Z, (D.prob z) p * v ((D.transition z) p)
Instances For
Current reward plus the discounted expected continuation value.
Instances For
An average of values of v is no larger than the size of v. This is where p ≥ 0
and ∑ p = 1 first do their work.
The Bellman operator as a bare function.
Equations
- D.bellmanFn v s = LeanEconomics.maxValue (D.objective v) D.feasible s
Instances For
The stochastic Bellman operator on bounded continuous functions.
Equations
Instances For
Blackwell's conditions hold. Monotonicity is prob_nonneg: averaging with
nonnegative weights preserves order. Discounting is prob_sum: the weights sum to one, so
raising the continuation value by c raises the average by exactly c, and the objective
by β * c.
The supremum is attained: an optimal action exists at every state.
The value function of the stochastic program.
Equations
- D.valueFunction = ⋯.valueFunction ⋯
Instances For
The stochastic Bellman equation. At every state there is an optimal action, and the value is the reward it earns plus the discounted expected value of the successor state.