Aiyagari_lossaversion.zip (147.4 KB)
I am modifying Aiyagari model by implementing loss aversion into the uility function, taking the past consumption as the reference point.
I’ve got Aiyagari code and it has aiyagari_obj where it just stands out for utility function to maximise, whereas dynamic programming is done in the separate m.file, so, I don’t know how to hold c_(t-1) and input it into the utility function so that the reference point is updated before the next iteration.
I really look forward to help on it…!!