Julia code to solve generic HJBs & KFEs
Current code: deterministic, one state, one control, infinite horizon, time/state separable
Currently, the return function only depends on the control, not the state (as in durable goods etc)
Challenge: for true generality, need to solve non-linear system of n_c
focs, to get n_c
policy functions
(but the number of iterations w/ the implicit scheme is usually small so perhaps it's not too bad???)
Current examples:
- NGM: 1-state (k), 1-choice (c), return u(c), compare w/ closed form
- NGM (Convex-Concave tech): 1-state (k), 1-choice (c), return u(c), compare w/ Hamiltonian (multiple SS)
- CS: 1-state (a), 1-choice (c), return u(c), compare w/ closed form {To Do: extend to finite horizon}
- Investment: 1-state (k), 1-choice (i), return profit(k,i) {Not working well}
- Housing:
- Labor: non-stochastic
Next: human capital/deterministic labor supply/deterministic Lifecycle
Next: combine 2-state Poisson & Diffusion into a generic solver
Extensions:
endog := endogenous & exog := exogenous
- Multiple states (n_s):
- (a,z): wealth
a
endog, incomez
is exog 2-state Poisson, HJB_stateconstraint_implicit - (a,z): wealth
a
endog, incomez
exog diffusion, HJB_diffusion_implicit - (a,z,t): wealth
a
endog, incomez
exog diffusion, aget
exog, Lifecycle.pdf, lifecycle.m - (k,z): capital
k
endog, techz
exog diffusion, firm.pdf, firm.m
- (a,z): wealth
- Multiple controls (n_c):
- (a,z): wealth
a
endog, incomez
exog 2-state Poisson, choices (c,ℓ), labor_supply.pdf, HJB_labor_supply.m - (a,h): wealth
a
endog, human capitalh
endog, choices (c,s), human_capital.pdf, human_capital.m - (a,b,z): liquid assets
a
endog, illiquid assetsb
endog, incomez
exog Poiss, choices (c,d), two_asset_kinked.pdf, two_asset_kinked.m
- (a,z): wealth
- Stochastic: see above
Optimal stopping time (HJBVI, LCP)
Q: what about GE models w/ non-constant interest rates & paths of prices?