@@ -527,8 +527,8 @@ def popu_dist(σ, household, Q):
527527528528 j_grid, a_grid, γ_grid, Π, β, init_μ, VJ = household
529529530- J = hh.j_grid.size
531- num_state = hh.a_grid.size * hh.γ_grid.size
530+ J = household.j_grid.size
531+ num_state = household.a_grid.size * household.γ_grid.size
532532533533 def update_popu_j(μ_j, j):
534534 "Update population distribution from age j to j+1"
@@ -629,7 +629,7 @@ def compute_aggregates(μ, household):
629629630630 J, a_size, γ_size = j_grid.size, a_grid.size, γ_grid.size
631631632- μ = μ.reshape((J, hh.a_grid.size, hh.γ_grid.size))
632+ μ = μ.reshape((J, household.a_grid.size, household.γ_grid.size))
633633634634 # Compute private savings
635635 a = a_grid.reshape((1, a_size, 1))
@@ -696,13 +696,13 @@ def find_ss(household, firm, pol_target, Q, tol=1e-6, verbose=False):
696696 r_old, w_old, τ_old = r, w, τ
697697698698 # Household optimal decisions and values
699- V, σ = backwards_opt([r, w], [τ, δ], hh, Q)
699+ V, σ = backwards_opt([r, w], [τ, δ], household, Q)
700700701701 # Compute the stationary distribution
702- μ = popu_dist(σ, hh, Q)
702+ μ = popu_dist(σ, household, Q)
703703704704 # Compute aggregates
705- A, L = compute_aggregates(μ, hh)
705+ A, L = compute_aggregates(μ, household)
706706 K = A - D
707707708708 # Update prices
@@ -863,8 +863,8 @@ def population_evolution(σt, μt, household, Q):
863863864864 j_grid, a_grid, γ_grid, Π, β, init_μ, VJ = household
865865866- J = hh.j_grid.size
867- num_state = hh.a_grid.size * hh.γ_grid.size
866+ J = household.j_grid.size
867+ num_state = household.a_grid.size * household.γ_grid.size
868868869869 def population_evolution_j(j):
870870@@ -1000,7 +1000,7 @@ def path_iteration(ss1, ss2, pol_target, household, firm, Q, tol=1e-4, verbose=F
1000100010011001 # Solve optimal policies backwards
10021002 V_seq, σ_seq = solve_backwards(
1003- V_ss2, σ_ss2, hh, firm, price_seq, pol_seq, Q)
1003+ V_ss2, σ_ss2, household, firm, price_seq, pol_seq, Q)
1004100410051005 # Compute population evolution forwards
10061006 μ_seq, K_seq, L_seq = simulate_forwards(