Buera and Shin (2013)

I would like to build upon the setup of Buera and Shin (2013), see here, to develop a model to explain cross-country differences in TFP.
So my question is whether it is possible to replicate (and hopefully extend) Buera and Shin (2013) in the toolkit. I looked into the example of Aiayagari in the toolkit and I understand how to set the aprime,a,z variables. In my case z is entrepreneurial ability and a is of course assets. I don’t fully understand if I should add a d variable for the choice of working as a paid employeed or as an entrepreneur. Any guidance would mean a lot

1 Like

Flick me an email and I will send you an implementation of the model of Kitao (2008), which is also one of these entrepreneur-worker lucas-span-of-control setups. The toolkit solves the stationary eqm nicely, but the solution of the transition paths is a bit slow (it works, just slow). Hence why it is not yet public (in a few years with a new GPU it likely will be). That will likely give you an idea how to implement this model of Buera & Shin (2013), although as mentioned the transition paths will be a bit slow. Feel free to ask questions as you go (I have not read closely enough to know exactly what is different in the two setups).

The worker-entrepreneur is handled as a two-valued endogenous state, and the contents of the return function then just involves a big ‘if’ statement depending on which of the two the agent currently is.

[There is a computational trick that I can use on the stationary model, but which doesn’t work in transition, and is nice for this kind of model. Hence the difference (called ‘refine’ by the toolkit, it is on by default)]

1 Like

Hi @javier_fernan, great question. I think I have some old files where I attempted a replication of this paper (back then I did not know how to implement this model using VFI toolkit). Now, thanks to Robert’s very nice explanation, I know how and I might do it in the future when I find a bit of time.

One suggestion besides what Robert wrote: You can easily compute k, \ell (the demand for capital and labor by entrepreneurs) and the profit \pi analytically and write the equations in the ReturnFn. This should speed up the code a lot and even allow for the transition. Of course if you want to extend the model, these closed form results may not be available anymore :frowning:

1 Like

Cool! If the closed forms work then the toolkit should easily handle what is left as it will just be a single endogenous state.

I went and actually read the paper last night. Turns out Buera & Shin (2013) at a strictly computational level is a transition path in a model with one endogenous state and two exogenous states. So I spent the morning implementing it and here it is (code and a pdf; runs on my desktop GPU with 8gb GDDR):

Key to all of this is that the firm problem is static, and so is the entrepreneur/worker decision problem. (Unlike what my above post was guessing would be the case).

A few comments:
(i) I call entrepreneurial ability z (BS2013 call it e)
(ii) I had to use three exogenous states (z,tau,psi_v). The reason is that tau transitions iff z transitions, and to impose this I needed to add in psi_v (psi_v is essentially just reflecting the probability psi). BS2013 would not have needed this because they could have just hardcoded the ‘iff’.
(iii) I had to change the value of beta (BS2013 use 0.904, but this gave me a negative interest rate, so I change it arbitrarily to 0.8) [to know why would require the codes of BS2013, if I planned a full replication I would ask them for the codes, but I don’t presently plan to complete a replication]
(iv) I have not checked how many asset grid points are appropriate, I may have too many (which slows code down) or I may have too few (which would be inaccurate). I am probably ballpark okay but really you should run it a few times with different number of points and find a good speed/accuracy balance.

Lastly, Javier, since you wanted to get into this model, I would be very grateful if you can please double check my algebra in the pdf (replacing the firm profit maximization problem with analytical values for k, l and pi). There were a lot of exponents flying around so it is totally plausible I made a typo error.

[I will likely update the code in the next few days to add a few graphs of the transition path results]
[As ever, a caveat that writing code dedicated to this model would give faster runtimes]

1 Like

Just to mention the transitions are not actually working yet (it is the code, not just you :wink: )

I think I have an idea what I got wrong, but don’t have time to try fix it right now, hopefully next week.

(code is fine for stationary eqm, is just the transition path that is not yet smooth)