I have created a Life-Cycle model based on LifeCycleModel35 (portfolio choice with housing). I’ve added solarpv as an ExperienceAsset, and I’ve modified my decision variable to choose between:
% buyhouse decisions
% 0=no house
% 1=buy house w/o pv this period
% 2=buy house w/ pv this period
% 3=keep house; no pv upgrade
% 4=keep house; pv upgrade (if possible)
And I’ve modified the return function to model costs of energy, pv electricity generation, and I’ve modified the aprime function to update the solarpv experience asset as houses are bought, kept, and pv installations are activated. It produces plots that comport with my expectations.
I then ported the salient features of the Life-Cycle problem that into the household part of OLGModel14 (households and firms), with households now being able to purchase houses and solarpv in addition to shares in firms.
What I’m seeing is that StationaryDist_FHorz_Iteration_e_raw evolves a Stationary Distribution that starts rich (at age jj=1 there are 45 nonzero terms, at age jj=2 there are 360 nonzero terms, and at age jj=3 there are 495 nonzero terms, and so on).
However, StationaryDist_FHorz_Iteration_nProbs_e_raw evolves a Stationary Distribution that only ever has 21 nonzero terms, and they are the 21 columns (7 z, 3 e) in the top row. We know that a Stationary Distribution that has values only in the top row is never going to mix.
I think it is as likely as not that my own code is the source of the problem, not the toolkit. The key iterative step in the toolkit begins with:
% First, get Gamma
Gammatranspose=sparse(Policy_aprimez(:,:,jj),II2,PolicyProbs(:,:,jj),N_a*N_z,N_a*N_z*N_e); % Note: sparse() will accumulate at repeated indices
My question is: how should I query Gammatranspose, Policy_aprimez, II2, and/or PolicyProbs to determine which one has been poisoned, and how I might trace that back to my model’s construction?