Policy function calculation from value function iterations

 

Algorithm:

 

(1)   Set a grid consisting of k and k’ columnwise and rowwise respectively.

(2)   Calculate utility for consumption as U using the grid matrix above.

(3)   Starting from a certain v, update v1=U+beta*v’ so as to maximize v1.

(4)   Repeat (3) by setting v=v1 for many times or until some criterion is met.

(5)   Find the final corresponding value of k as k’ according to the maximum value.

 

To generalize the process and set U, we set c=fc(k,k’) and u=fu(c).

 

Today we consider the basic AK model and its Bellman equation:

 

   where  and

 

where u(x)=ln(x) as .

 

We set

 

   that is the same AK model as before

and

       that is CRRA utility function in general.

 

 

 

Behaviors of policy functions of k according to in CRRA utility function

 

When n=300 or more in normal version of GAUSS, they are smoothed out.

 

If we need more coverage from near origin, set a greater number to kpc.