Supported implementation for risky assets,Epstein-Zin preferences and an absorbing retirement state?

Hi Robert and everyone,
I am building a finite-horizon household portfolio model to study China’s gradual retirement-age reform. The current exogenous-retirement model works with riskyasset = 1, Epstein–Zin preferences, persistent income risk z, and an i.i.d. income shock e. A possible extension is an irreversible pension-claiming decision, while keeping the asset state small.
The minimal economic specification has one liquid-wealth state, a binary claiming state, persistent and transitory income shocks, and controls for saving, the risky share, and claiming. Liquid wealth next period is a_next = s * ((1-alpha)Rf + alphaRs(u)). The claiming state follows r_next = max(r, claim). Retirement eligibility depends on age and cohort. I would handle pension schedules outside the solver initially, so this question does not require a full contribution-history state.
On my installed commit 6a02c1899028d9379d574b11192eaa0f3731945e (MATLAB R2024b, NVIDIA GPU), a small probe reaches the error:

riskyasset+semiz with e not yet implemented

I also found an explicit restriction on e in StationaryDist_FHorz_RiskyAssetSemiExo. In ValueFnIter_FHorz_EpsteinZin_RiskyAsset_semiz, the branch with N_a1 == 0 appears unfinished/commented out. Thus, combining the transitory shock with z may not by itself make the one-wealth-state specification available. I have not yet established a working alternative for the full combination.
Is the recommended current implementation to represent the absorbing claiming status as a small standard endogenous state, to use semiz, or to solve the claimed/unclaimed value functions separately? The claim control changes current income and the claiming transition, but does not directly enter the risky-wealth law of motion; guidance on the appropriate control grouping would be particularly helpful.
If this is a missing combination, the most useful addition for this application would be a minimal supported example for riskyasset + Epstein–Zin + an absorbing discrete state, ideally with one liquid-wealth state and i.i.d. income shocks, together with a matching distribution update. A documented work around would already be valuable. A capability table and explicit errors for unfinished branches would also help avoid configurations that appear available from file names alone.
For an unexpected reform, I plan to solve remaining lifetime policies by calendar time and propagate a common pre-reform distribution forward at exogenous prices. Is there an existing example or supported distribution interface for this combination that I should follow? I am not requesting a new general-equilibrium transition solver or CPU support in this example.
I can share the small probe and would be happy to help test a proposed implementation. Thank you for the toolkit and for any guidance.

3 Likes

some support material see

1 Like

If I understand, the model state space is:
(riskyasset,semiz,z,e)
and you have Epstein-Zin preferences, and some decision variables.

A week ago this would not have run (the commit you have is dated 20 days ago), but it should now run; lucky timing :grin:. I just pushed a big test bank for these:
riskyasset test bank
riskyasset with EZ preferences test bank

The test bank also covers the (a,riskyasset,z,e) and (a,riskyasset,semiz,z,e) cases, both with and without EZ preferences.

PS. Off-topic, Claude Opus is fine for coding standard preferences, but to do Epstein-Zin seems to require Claude Fable. [This is a comment on toolkit internals, not on what you can do as a user.]

Is the recommended current implementation to represent the absorbing claiming status as a small standard endogenous state, to use semiz, or to solve the claimed/unclaimed value functions separately?

I would have to see the exact equations to say which would be better between a small standard endogenous state or semiz (probably standard endo because the transitions are deterministic not probabilities; although you can use semiz with probabilities of 0/1), but you very likely do NOT want to solve the claimed/unclaimed value fns separately (because of how VFI Toolkit likes things to be set up; there is no toolkit concept of an ‘absorbing’ state, so the codes are unable to exploit this). Can you point me to them (or send as email).

For an unexpected reform, I plan to solve remaining lifetime policies by calendar time and propagate a common pre-reform distribution forward at exogenous prices. Is there an existing example or supported distribution interface for this combination that I should follow?

I think what you are asking here is a partial-eqm (all parameters are exogenous) transition path, but I’m not certain. Can you tell me exactly what the equations for this aspect are?

1 Like

Okay, then I would do retirement as an endogenous state, so (r,A,z, \epsilon; \kappa). This will be very marginally easier and better than setting up r as a semi-exogenous state. You can put “if r==1 && rprime==0 then F=-Inf” into the ReturnFn to enforce that it is an absorbing state.

StationaryDist_FHorz_Iteration_SemiExo_nProbs_e_raw, this should be using sparse CPU (rather than sparse GPU). Because both work on my computer (as I have Matlab R2025a or later) I don’t notice it. I will likely update this on Monday.

Currently the partial-eqm transition path for a model with riskyasset is not coded. It is on my to-do list at some stage and since you want to use it I will bump it up near the top of the list. Hopefully I will be back in 2-3 weeks to say that it is implemented :smiley:

Sounds like a nice model that you are putting together. I’m keen to implement anything else you need to get it all running so if you notice something else that you would like to do but the toolkit cannot yet handle let me know and I will take a look.

1 Like