Hello there! Are there any instructions for setting up Phi_aprime in ValueFnIter_Case2_FHorz? I have tried to understand the “CastanedaDiazGimenezRiosRull2003_PhiaprimeMatrix” function in the repliacation code of Castaneda, Diaz-Gimenez, and Rios-Rull (2003), but it looks very compliated to me. Any suggestions? Thank you!
Do you have a specific setting in mind? (in Castaneda, Diaz-Gimenez & Rios-Rull aprime is a function of (a,z,zprime), but if your setting is different then the setup is different)
If you describe how your aprime is determined then I can explain how to set this up based on your setting.
[if you have written out model equations you can send them to me by email and I will take a look]
This model basically takes from Cocco et al.(2005) and I modify it to be close to the basic setting in VFI toolkit. It is about lifetime consumption and portfolio choice.
It is possible to solve this by VFI toolkit? If not, could you please give me some advice? It means a lot to me. Thank you very much!!!
Reference:
Cocco J F, Gomes F J, Maenhout P J. Consumption and portfolio choice over the life cycle[J]. The Review of Financial Studies, 2005, 18(2): 491-533.
Hi,
as far as I remember the model of Cocco et al. is a lifecycle model with a portfolio choice where agents choose
- consumption and savings
- how much wealth to allocate in a risk-free vs risky asset (portfolio choice)
In Cocco et al the shock z (i.e. permanent income) follows a random walk. This means you can normalize cash on hand x and consumption c by z and eliminate one state variable, as long as the utility function is isoelastic. In your setup, however, z follows a AR(1) process, so you can’t do this trick.
Another observation: it seems to be (but I might be wrong) that the way you set up the problem requires interpolation of the value function in the right-hand-side of the Bellman equation with respect to cash on hand x. This is because your choice variables are c and alpha, which together with the shocks will give you next-period cash x’, which does not necessarily lie on the grid.
There is actually a not-yet-public new feature in VFI Toolkit, called Case3, for handling exactly this kind of model: specifically, dealing nicely with the fact that aprime(d,u) where aprime is next period endogenous state, d is this period decision, and u is an iid shock that occurs between this period and next period. This feature was specifically developed with portfolio-choice models in mind. I expect to make it public around end of July (just smoothing it out now
)
I also created an example based on a slightly modified version of CGM2005. Specifically the modification is that CGM2005 use permanent shocks (unit root) while I instead use persistent shocks (AR(1), which is discretized to markov). The example also handles Epstein-Zin preferences which is important for portfolio-choice decisions as it separates risk aversion from intertemporal elasticity of substitution. This will become public at the same time.
In the CGM2005 example aprime(d,u) is that next period assets (aprime) is determined by decisions on savings and share-of-savings-in-risky-asset (two d’s) and the risky asset return (u).
Your example does add one thing to CGM2005 that VFI Toolkit will not be able to handle, namely you add a correlation between eta and upsilon (your notation, your eqn 6). Nor is this a feature I am likely to add because doing so would be complicated; not impossible, but from perspective of VFI Toolkit one of these is a z variable and the other a u variable so making them correlated is awkward. [For what it is worth, Table 3 of CGM2005 finds the correlation to be statistically insignificant in PSID data anyway.]
Alessandro is right that CGM2005 uses permanent (unit root) shocks, which acts like a renormalization (and a stochastic discount factor). It saves CGM2005 from having the permanent shocks as a state of the model. In my example will use persistent markov shocks that are handled as an exogenous state. Frankly the evidence since 2005 has come down clearly on the persistent rather than permanent shocks side in any case (Gomes, 2022 by my reading agrees that permanent was a reasonable idea in 2005 but that nowadays we know would be better as persistent)
Alessandro is also correct that VFI Toolkit requires thinking about CGM2005 slightly differently to how you have written it out (same problem, just viewed from a different perspective). Specifically, you use cash-on-hand as the endogenous state variable. Whereas VFI Toolkit needs you to use assets as the endogenous state variable.
Anyway, this should all become a bit clearer once I release that material, hopefully around end of July.
This example will be the first to use a new bit of notation: in addition to using z to denote markov shocks, and e to denote iid shocks, I have introduced u to denote iid shocks that occur between now and next period. So e is a state, and decisions/policies can be based on it, whereas u is not a state and decisions/policies cannot be based on it.
[P.S. I edited the topic name to better reflect what this thread is now about. Hopefully makes it easier for people to find what they are looking for. qianp, I hope you don’t mind.]
Looking forward to this new feature! By the way, in some models of portfolio choice there is also a 0-1 participation decision on whether to participate in the stock market or not. If you participate you have to pay a fixed cost. This is done to rationalize the well-known puzzle that stock market participation is too low in the data compared to what a standard model would predict. Will the toolkit be able to handle this discrete choice? I think at least in principle it could, because discrete VFI is well-suited to handle problems with non-convexities
A fixed cost of stock market participation would be a trivial extension of the model in VFI Toolkit.
The codes work by having you choose savings, and the share of savings to invest in the risky asset (the share being from 0 to 1).
To get the fixed cost of stock market participation you just use the decision ‘riskyshare’, which is the share of your savings invested in the risky (versus the safe) asset. You would then just add a term like
fc*(riskyshare>0)
into the return function; where fc is the fixed cost. Done ![]()
Portfolio-Choice. Less than one month after the promised end-of-July ![]()
If anything is unclear please ask, given this is new it is likely not yet smooth so any questions will help me smooth it out.
