Calculation of the expected value of deviation from SS in Mo


I’m trying to figure out the optimal monetary policy under DSGE model with various shocks.

I wrote down the model in “.mod” file using eqm. equation without any (log) linearization. So I can calculate the expected value of endogenous values such as C(t), N(t),Y(t) …

But I’d like to calculate the expected value and s.d of the “relative deviation from SS” of these values.(Cdeviation(t) = C(t)/Css -1)

In mod file, we can give number for initial value of these variables and found these initial value are the SS values. But SS value can be calculated after running “model” part in the mod file.

So I wonder how I can calculate the moments of these relative deviation of endogenous variables while without introducing log-linearzing in mod.

Can I just define new variables Cdev(t)=(C(t)-2.2)/2.2 in the “model” part? Here ‘2.2’ is steady-state value I checked in the “lgr” result file after running this mod file and which was the same as the number given as the initial value.
I’m wondering if I can use “the value” which I can get only after running the mod file in the model part.

Please give me some tips.
Thank you all.

If I understand well, you want to linearize the model in the original variables, but you want the moments of the relative deviation from SS.

If that is all, you can just use standard formulas:

if Y = (X-a)/a, then
E(Y) = (E(X)-a)/a
SD(Y) = SD(X)/a

you will find mean and variance of endogenous variables in oo_