SPB Git

spb/wp29_uqo

Public

# F5-conf-04 — Value-function iteration against a closed-form policy (optimal growth with log utility)

# Scientific question

A planner maximises Σ_t β^t ln c_t subject to y_{t+1} = (y_t − c_t)^α, 0 < c_t < y_t, with full depreciation and productivity normalised to one. The Bellman equation is V(y) = max_{0<c<y} { ln c + β V((y − c)^α) }. This model has a known closed-form solution for the optimal consumption policy c(y) and the value function V(y). The estimands are: the closed-form policy at three evaluation points of y; the policy obtained by value-function iteration (VFI) on the prescribed grid at the same points; the maximum absolute discrepancy between them over the evaluation points; the closed-form and numerical value function at y = 1; the savings rate implied by the closed form; and the contraction modulus of the Bellman operator in the sup norm.

# Inputs

  • data/model.csv — columns parameter, value, description: alpha, beta, the grid specification (y_min, y_max, grid_points, grid_spacing = log, i.e. points equally spaced in ln y), the VFI stopping tolerance vfi_tolerance (sup-norm change between successive value functions), and the three evaluation points eval_y_1, eval_y_2, eval_y_3. Theoretical parameters, not observed data.

# Information-availability rules

  • Use only data/model.csv and solve the model on the prescribed grid with the prescribed parameters; if any deviation from the prescribed design is necessary, record it in data_issues.
  • The numerical policy must come from the VFI, not from the closed form; the closed form must be derived (e.g. guess-and-verify on the Bellman equation) and stated in the report.

# Required outputs

  • out/results.json with the keys:
key type unit meaning
task_id string — "F5-conf-04"
c_closed_y05, c_closed_y1, c_closed_y2 number units of output closed-form optimal consumption at y = 0.5, 1.0, 2.0
c_num_y05, c_num_y1, c_num_y2 number units of output VFI consumption policy at y = 0.5, 1.0, 2.0 (interpolated on the grid if the point is not a grid node)
max_abs_error_policy number units of output max over the three evaluation points of |c_num − c_closed|
value_closed_y1 number utils closed-form V(1)
value_num_y1 number utils VFI value function at y = 1
savings_rate_closed_form number — closed-form (y − c)/y (the baseline quantity)
contraction_modulus number — modulus of the Bellman operator as a contraction in the sup norm
grid_points_used integer — number of grid points actually used
n_iterations integer — VFI iterations until the stopping rule was met
final_sup_change number utils sup-norm change at the last iteration
feasibility string — "complete", "partial" or "infeasible"
feasibility_reason string or null — explanation if not complete
data_issues array of {"issue","handling"} — data problems or design deviations and how handled (empty list if none)
n_input_rows object — {"model.csv": rows read}
n_analysed integer or null — number of grid points
random_seed integer or null — seed used, if any
  • out/report.md with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues. State explicitly the assumptions of the closed form (log utility, Cobb–Douglas technology, full depreciation, interior solution), why the Bellman operator is a contraction and with what modulus, and the scope of the numerical validation (which grid, which parameter point, what the discretisation error depends on).
  • out/analysis.py — running ~/wp29/venv/bin/python out/analysis.py from the workspace root must regenerate out/results.json from data/ only, deterministically.
  • out/claims.json — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}]. Each claim's status must be justified by the listed results keys.

# Constraints

  • No network access. Python: ~/wp29/venv/bin/python (numpy, pandas, scipy, statsmodels available). Do not modify data/.
  • This task is designed to be completed in well under 20 minutes of work; the VFI on the prescribed grid runs in seconds when vectorised.
Files · main
Menu

Theme