I am reading the code replicating Arellano (2008) (https://lectures.quantecon.org/py/arellano.html#Computation)
This code uses value function iteration. I feel confused where did they set the initial value for the value function. I could not see the initial guess around the for loop of iteration.
They only do some kinds of allocating memory for value functions. This is on the part of def init(self, …), at the beginning of the code.
So I wonder, whether this is indeed the initial guess for value functions?, which set all value functions are zeros matrix?
self.Vd = np.zeros(ny) self.Vc = np.zeros((ny, nB)) self.V = np.zeros((ny, nB)) self.Q = np.ones((ny, nB)) * .95 # Initial guess for prices self.default_prob = np.empty((ny, nB))
And if they are the inital guess, can I put them inside the loop, rather than in the def__init(…)
so that I do not need to put self. before Vd, Vc,…?