I’m new to Dynare and I’m encountering some problems with the replication of a deterministic model (Shimer 2012). In particular, from what I read on the user guide, I understand that only exogenous variables can be shocked. But the shock that I need in this case is a reduction in the capital stock (-10%), and clearly capital is not an exogenous variable. Is there any easy way to model this?

I tried to assume that capital depends on an exogenous variable, say gamma, and an endogenous one, e.g. ktilde:
k=gamma*ktilde.
But in this case, when I change the value of gamma from 1 to 0.9 in the "shocks"section, all that I get is an increase in ktilde, which leaves K (and all the other variables) unchanged. Is there a way to set ktilde unresponsive to the movement of gamma? I need K to bear all the adjustment.

I would really appreciate your help, and I am willing to provide any additional information in case you need it.

You are on the right track. The way you currently do it defines capital through the other equations of the model. The equation

k=gamma*ktilde

then just defines ktilde, given k. You need to change the timing considerably. Basically, the capital stock you now use is not really predetemined anymore. Thus, your production function is

y=k^alpha*l^alpha

instead of

y=k(-1)^alpha*l^alpha

Similarly for all other equations. At the same time, your law of motion for capital is the one that changes most. The capital stock at time t is now still determined by yesterday’s capital and yesterday’s investment (i.e. predetermined in terms of endogenous variables), but it is also affected by a time t exogenous shock: