by

### Ömer Özak

#### Abstract

I study how boundedly rational agents can learn a ``good" solution to an infinite horizon optimal consumption problem under uncertainty and liquidity constraints. Using an empirically plausible theory of learning I propose a class of adaptive learning algorithms that agents might use to choose a consumption rule. I show that the algorithm always has a globally asymptotically stable consumption rule, which is optimal. Additionally, I present extensions of the model to finite horizon settings, where agents have finite lives and life-cycle income patterns. This provides a simple and parsimonious model of consumption for large agent based models.

The paper is available at http://dx.doi.org/10.1016/j.jedc.2013.12.007

The working paper version is available at http://ssrn.com/abstract=2060620

Here you can find the Python scripts used to generate the simulations in my paper. They can be modified to generate the simulations of my paper with Peter Howitt "Adaptive Consumption Behavior" http://dx.doi.org/10.1016/j.jedc.2013.11.003 or to simulate consumption behavior in large scale Agent-Based Macroeconomics models.

Scripts are included in the scripts directory. In order to generate the graphs you need to run:

- OptConsHO.py
- OptConsIID.py
- LearnHO.py
- LearnHOT.py
- LearnIID.py
- LearnIIDT.py

The data.zip file contains all the generated data and figures in case you want to check them out.