Problems with finding the steady state in energy modeling

Hi all,
My model is a standard DGSE with a C-D production function including an energy input and a standard households’ utility function. Energy prices are stochastic. I am trying to work out the steady state of my model and it keeps returning all sorts of errors (the equations’ residual error, the NaN or Inf. error…). Please, find attached the code.

I have done some research and I keep finding that it is due to wrongly-calculated initial values. For that, I tried to analytically solve the model but I can only get the “r” and the “h”, the rest I can only get the ratios (i.e., k/y , w/y, i/y).

I do not know how to proceed and I am feeling very stuck. Could someone give me a hand, please ?

Thanks,

Álvaro. cd.mod (2.7 KB)

p_g = xi     + p_g(-1)                    + e_g;

implies that no steady state exists.

Thanks professor Pfeifer !!!

So a price trends that follows a random walk with drift is incompatible with having a steady state in a DGSE model ?

I have then tried to set a standard AR(1) process and I now get a “(the sum of square residuals of the static equations is 0.0000)” error. Most of my static equations show 0 residuals, only three don’t and present very low residual levels. I know that can be used as a hint of the equations where something is not working. However, I do not get what I have wrong.

  1. Yes, the drift means that the variable will grow without bounds.
  2. Please provide the most recent version.

Please, find attached the most recent version. In the initval block, the first 7 variables’ initial values are taken from the steady state values of the reduced (no energy) version of the model.

Could the problem be in the fact that I have specified 5 exogenous variables and, hence, 5 shocks ?

cd.mod (3.0 KB)

Your steady state is right at the numerical boundary for accepting it. Use

steady(maxit=5000);

Thank you Professor Pfeifer ! I am now able to get the steady state results. If I may ask some follow-up questions :
1.- I would like to do stochastic simulations on the model. I have specified several shock sources (one for each energy price). When running the stoch_simul command, am I actually hitting the economy with all shocks at the same time ? Is there a way to only activate one shock ?
2.- Would you recommend me to use (order = 1) or (order = 2) ?
3.- Using stoch_simul(order =1 , irf=50), I get the following error: "One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 0.0000! If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold. ". First, I am not sure how can I solve the eigenvalue problem. Why is there a problem with such an Eigenvalue if the steady state has been calculated with no error ? I though once you got the steady state up and running, the stochastic simulation would work naturally. Second, how can I modify the “qz_zero_threshold.” ?

Thanks a lot in advance.

cd.mod (3.1 KB)

  1. What are you trying to do? IRFs or moments?
  2. That depends on your goal.
  3. There seems to be a singularity in your model. Are you sure that e.g. the size of each of the elements of
E =  E_o^kappa_o *  E_c^kappa_c * E_n^kappa_n * E_u^kappa_u * E_g^kappa_g; %4

is uniquely determined? Or could I multiply everything by a constant factor?

Hi again. The problems were finally solved. I now have a quick technical questions. As mentioned before, my model contains 5 different price shocks. In the model block, I type :
shocks;
var e_o = sigma2_o ;
var e_c = sigma2_c ;
var e_n = sigma2_n ;
var e_u = sigma2_u ;
var e_g = sigma2_g ;
end;
When I run the IRFs, I note that each shock impacts its own price differently. In other words the shock for oil price makes the price of oil go up around 4.5 deviations from the steady state. However, the coal price shocks makes the price of coal go up around 2.5 deviations.

This is problematic to me. I want to make comparisons regarding how much each price shock impacts the economy’s variables. But, I each shock has a different magnitude, does it make it not comparable ? (Question 1)

I have read that I can “rescale the impulse responses” by typing the following:
shocks;
var e_o ; stderr 0.01 ;
var e_c ; stderr 0.01 ;
var e_n ; stderr 0.01 ;
var e_u ; stderr 0.01 ;
var e_g ; stderr 0.01 ;
end;

But with this specification, am I not omitting the variance of each price shock ? (Question 2)

Is there another way to somehow equalize the shocks to make them comparable ? (Question 3)

cd.mod (3.6 KB)

It depends on what you are trying to do. If you are solving your model at first order, then you have certainty equivalence and the shock variances do not matter. In that case, you can scale arbitrarily due to linearity of the model.

I am solving the model at first order, yes.

I have retrieved the different variance from the data. I want to prove that a production function that is oil intensive (uses the oil input in a high percentage) brings more volatility to the economy when there is an oil price shock. I want to do that by comparing other shocks (like a nuclear energy price shock, which has a lower variance) and illustrate that the variables are less impacted. Does that make sense ?

Therefore, if the variance of the shocks do not matter, the whole point of my research vanishes, right ? How can I sort this out ?

You need to ask yourself what you are trying to do.The shock variances are relevant for e.g. variance decompositions to find out what the contribution of typical shocks are.
But you can also investigate the amplification to shocks of a similar fixed size, e.g. 1 percent as opposed to 1 standard deviation. That answers a different question.

Right, I see. I think my intention aligns more with your second proposition. Because I know how volatile oil prices are compared, for example, to coal or natural gas; I want to see how differently those price shocks impact the economy, provided a shock a similar fixed size.

My question is where do I model the variance (which is crucial to illustrate price volatility.) of the shocks ?

Is there a way to put the variances in the shock block and still fix the size of the size of the shock to, say, 1% ?