Greenwood, Hercowitz and Huffman paper

Hey guys,
I have to replicate the paper Investment, Capacity Utilization, and the Real Business Cycle by Greenwood, Hercowitz and Huffman.
jstor.org/discover/10.2307/1 … 2565330227
There are two Problems:

First:
I’m looking for some code. Did anybody do this or has any help for me?

Second:
I have to change the Marcov- Process to an AR(1)-Process. Does anyone know how that works?

Thanks in advance!

Regarding the second part: the autocorrelation and standard deviation of the AR1 process implied by the Markov process are explicitly stated in the paper.