Negative numbers...

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Negative numbers...

Postby gmnavarro » Sun Jan 22, 2012 12:17 am

Hi,
I'm having the following problem.

I have a process as follows: lY = rho1*lY(-1) + rho2*lY(-2) + eps
and then compute Y = exp(lY)
I do it like this so that Y is always positive. However, in the simulations Y has negative numbers.

This only happens when I'm doing an approximation of order 1. Does anyone know what is going on??

Thanks a lot

Gaston
gmnavarro
 
Posts: 1
Joined: Sun Jan 22, 2012 12:12 am

Re: Negative numbers...

Postby jpfeifer » Sun Jan 22, 2012 10:50 am

That is because a first-order approximation approximates exp(x) with a linear function exp(x_ss)*(x-x_ss), where x_ss is the steady state. Of course, a linear function will always hit negative values with some probability (as long as its slope is not 0). Using a second-order approximation means fitting a parabola to exp(x), thus preserving some of the curvature. This may avoid having negative values if the vertex is above 0 (but for extreme shocks does not preserve monotonicity of exp(x)).

These problems are always associated with using approximations and are usually accepted. Negative values should be rare and should be thought of as approximation errors.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests