Adding new decisions to LifeCycleModel35semiz

Yes, but it doesn’t let the value of solarpv evolve as I expected it to. I.e., solarpv for the given house starts to evolve at j==1, not at the purchase of the house.

After looking harder at LifeCycleModel41, I understand that experienceasset has an implicit age dimension (the prime in hprime is the +1 of j+1 after all), and that age dimension scales into h_accum from the start. Is there any way to get experienceasset to start ticking from an event rather than only from the start of time?

Perhaps when you suggested making solarpv an experience asset, it would be an asset with only a single value that did not evolve? That could still be useful, because houses with that asset would still have idiosyncratic evolution of assets and costs, just not in the dimension of solarpv itself.

I have sorted out what I was misunderstanding, and the model I’ve built is now working as expected with a experience asset. Yay!

It took me a while to realize that there’s not much to see in the Value function nor the policy when using the default indexes of 1 for assets (bankrupt), housing (homeless), and solarpv (choosing to not install). I actually took a mental note to fix that yesterday, but got lost chasing other things.

Now that I’m displaying richer parts of the policy (assets near 1.0 and housing at 1) we can see the action.

1 Like

An update. I spent a week with Gemini to make a few changes to the VFI Toolkit. I can now solve larger models more rapidly:


Here’s the code from the model that generates the ans answers below:

% V is now (a,z,j). This was already true, just that previously z was trivial (a single point) 
% Compare
size(V)
% with
[n_a,n_z,N_j]
% there are the same.
% Policy is
size(Policy)
% which is the same as
[length(n_d)+1,n_a,n_z,N_j]
% The n_a,n_z,N_j represent the state on which the decisions/policys
% depend, and there is one decision for each decision variable 'd' plus one
% more for the standard asset

Solve ValueFnIter
Unpacking Policy tensor to System RAM…
Elapsed time is 278.996892 seconds.

ans =

15     4     5     7     7    30     3     7    60

ans =

15     4     5     7    60

ans =

 4    15     4     5     7     7    30     3     7    60

ans =

 3    15     4     5     7    60

We can increase the size and complexity of the model by adding a 3-state energy shock and use Quasi-Hyperbolic discounting with Epstein-Zin preferences:

Solve ValueFnIter
Elapsed time is 826.439161 seconds.

ans =

15     4     5     7     7    30     3     7     3    60

ans =

15     4     5     7     3    60

ans =

 4    15     4     5     7     7    30     3     7     3    60

ans =

 3    15     4     5     7     3    60

Epstein-Zin agents are a jittery bunch (or so I am told)!


That is a big big model!

1 Like

It was only possible because of all the goodness that’s been built into the toolkit over the years.

2 Likes