# Question about theoretical moment after implementing ramsey\_policy

**URL:** <https://forum.dynare.org/t/question-about-theoretical-moment-after-implementing-ramsey-policy/10681>\
**Category:** Optimal Policy\
**Created:** [2 September 2017 20:02 UTC](https://forum.dynare.org/t/question-about-theoretical-moment-after-implementing-ramsey-policy/10681 "2017-09-02T20:02:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [3 September 2017 10:57 UTC](https://forum.dynare.org/t/question-about-theoretical-moment-after-implementing-ramsey-policy/10681/2 "2017-09-03T10:57:31Z")

</div>

1. After setting up the first order conditions of the planners problem, Dynare conducts a first order approximation. This results in a linear state-space system representing the solution. See

> [@What are "theoretical moments" referring to?](https://forum.dynare.org/t/what-are-theoretical-moments-referring-to/4735):
>
> Hi, I apologize if this questions has been asked before or if it is trivial. I do not understand what the “THEORETICAL MOMENTS” produced by stoch\_simul are. For reference, I am trying to understand Sims’ tutorial [here](http://www3.nd.edu/~esims1/using_dynare.pdf). I’ve attached the code. Are the “theoretical moments” the moments from a simulation? If so, how do I access (e.g. plot) this simulation? (Is it the same simulation Sims references?) Are they the moments of the series under the impulse response? Perhaps this is the essence of m…

Yes, they are related to IRFs in the sense that in each period shocks realize that trigger IRFs. The sum of the respective IRFs at each point in time causes the variables to move. The moments are then computed on these variables (although only conceptually if you consider theoretical moments)

1. Your code loads a `lump_noS_params_nw.mat`, but you only provided a `lump_noS_params.mat`. Unit roots are not a problem, if they come from economic features of the model as opposed to coding errors. Of course, the unconditional second moments of the unit root variables do not exist as they are infinite.

2. The Dynare manual describes which optimizer is used. `opt_algo=1` triggers Matlab’s `fmincon`. See the section “Algorithm” at [Find minimum of constrained nonlinear multivariable function - MATLAB fmincon - MathWorks Deutschland](https://de.mathworks.com/help/optim/ug/fmincon.html)

---

_[View the full topic](https://forum.dynare.org/t/question-about-theoretical-moment-after-implementing-ramsey-policy/10681)._
