# Stochastic simulations

**URL:** https://forum.dynare.org/c/stochasticsimulations/16.md?page=1

[Latest](https://forum.dynare.org/latest.md) · [Categories](https://forum.dynare.org/categories.md)

**Page:** 2

---

## [How to get the conditional variance of variable in var\_model](https://forum.dynare.org/t/how-to-get-the-conditional-variance-of-variable-in-var-model/28132)

<div class="topic-metadata">

**Author:** [@kurama](https://forum.dynare.org/u/kurama)\
**Replies:** 1\
**Last updated:** [17 December 2025 08:06 UTC](https://forum.dynare.org/t/how-to-get-the-conditional-variance-of-variable-in-var-model/28132 "2025-12-17T08:06:00Z")

</div>

Hi, let’s say I have a standard VAR, where one of the variables is household disposable income. In my SSM I would like to use conditional variance of household disposable income as a factor in consumption target equat…

---

## [Interpreting Second Order IRFs](https://forum.dynare.org/t/interpreting-second-order-irfs/28128)

<div class="topic-metadata">

**Author:** [@nvaughan75](https://forum.dynare.org/u/nvaughan75)\
**Replies:** 1\
**Last updated:** [15 December 2025 10:47 UTC](https://forum.dynare.org/t/interpreting-second-order-irfs/28128 "2025-12-15T10:47:01Z")

</div>

Hello all! How does one interpret second order impulse response functions? I allow shocks to the risk aversion parameter and then compare the second order IRFs, but I’m not certain how to interpret them. Thanks!

---

## [Question about Shock Sizes](https://forum.dynare.org/t/question-about-shock-sizes/28106)

<div class="topic-metadata">

**Author:** [@nvaughan75](https://forum.dynare.org/u/nvaughan75)\
**Replies:** 1\
**Last updated:** [24 November 2025 12:28 UTC](https://forum.dynare.org/t/question-about-shock-sizes/28106 "2025-11-24T12:28:25Z")

</div>

Hello all! I recently estimated my first DSGE with dynare and am very excited about it. It’s just the basic new Keynesian from Galí chapter 3 but it is so cool looking at the posteriors/etc. I have a question about the…

---

## [Stochstically simulated endogenous data linearly dependent.](https://forum.dynare.org/t/stochstically-simulated-endogenous-data-linearly-dependent/28105)

<div class="topic-metadata">

**Author:** [@Avocado](https://forum.dynare.org/u/Avocado)\
**Replies:** 2\
**Last updated:** [24 November 2025 11:11 UTC](https://forum.dynare.org/t/stochstically-simulated-endogenous-data-linearly-dependent/28105 "2025-11-24T11:11:14Z")

</div>

Dear Dynare Community, I am trying to use dynare’s stoch\_simul command with the periods option set to a positive value to simulate time-series data to be used in another project. Specifically, I am using Dr. Pfeiffer’s…

---

## [Timing notation of model-local variables for portfolio choice](https://forum.dynare.org/t/timing-notation-of-model-local-variables-for-portfolio-choice/28091)

<div class="topic-metadata">

**Author:** [@vanbasten](https://forum.dynare.org/u/vanbasten)\
**Replies:** 3\
**Last updated:** [17 November 2025 21:18 UTC](https://forum.dynare.org/t/timing-notation-of-model-local-variables-for-portfolio-choice/28091 "2025-11-17T21:18:57Z")

</div>

Hello, I am a bit confused about the timing and expectation operator in dynare and how it is related to model local variables,. Suppose I have the following utility function u\\left(c\_{t}\\right)=\\frac{\\left(c\_{t}-hc\_{t-1}…

---

## [A DSGE Model with a financial rigidity](https://forum.dynare.org/t/a-dsge-model-with-a-financial-rigidity/28062)

<div class="topic-metadata">

**Author:** [@Fernando1](https://forum.dynare.org/u/Fernando1)\
**Replies:** 7\
**Last updated:** [3 November 2025 16:25 UTC](https://forum.dynare.org/t/a-dsge-model-with-a-financial-rigidity/28062 "2025-11-03T16:25:34Z")

</div>

I have tried to solve my model in dynare and apparently i have found the steady state of the model, but the problem is that there are 6 eginvalues larger than 1 in modulus for 7 forward-looking variables. The Blanchard &…

---

## [Combining IRFs derived under different parameter values on a single plot](https://forum.dynare.org/t/combining-irfs-derived-under-different-parameter-values-on-a-single-plot/21953)

<div class="topic-metadata">

**Author:** [@Julie](https://forum.dynare.org/u/Julie)\
**Replies:** 14\
**Last updated:** [30 October 2025 00:12 UTC](https://forum.dynare.org/t/combining-irfs-derived-under-different-parameter-values-on-a-single-plot/21953 "2025-10-30T00:12:39Z")

</div>

Hi Professor, I am wondering is there any quicker way to combine IRFs derived under different sets of parameter values on a single plot? I experimented a bit myself using the “set\_param\_value” function, starting from …

---

## [Variables in RBC](https://forum.dynare.org/t/variables-in-rbc/28063)

<div class="topic-metadata">

**Author:** [@Badras](https://forum.dynare.org/u/Badras)\
**Replies:** 4\
**Last updated:** [27 October 2025 15:40 UTC](https://forum.dynare.org/t/variables-in-rbc/28063 "2025-10-27T15:40:16Z")

</div>

Hello Prof, In order to solve for Steady State values in RBC models, King and Rebello (1999) which you have replicate it on GitHub, transformed the variables by dividing by X ( deterministic component of productivity wh…

---

## [Stochastic simulation outside Dynare](https://forum.dynare.org/t/stochastic-simulation-outside-dynare/28042)

<div class="topic-metadata">

**Author:** [@cpo](https://forum.dynare.org/u/cpo)\
**Replies:** 2\
**Last updated:** [22 October 2025 09:20 UTC](https://forum.dynare.org/t/stochastic-simulation-outside-dynare/28042 "2025-10-22T09:20:53Z")

</div>

Dear all, I have a question regarding the stoch\_simul command outside Dynare with order 3 simulation. Here is the command: \[info, oo\_, options\_, M\_\] = stoch\_simul(M\_, options\_, oo\_, var\_list\_); that I can use outside …

---

## [NEWS shocks in Dynare](https://forum.dynare.org/t/news-shocks-in-dynare/2477)

<div class="topic-metadata">

**Author:** [@rteconomics](https://forum.dynare.org/u/rteconomics)\
**Replies:** 14\
**Last updated:** [20 October 2025 10:09 UTC](https://forum.dynare.org/t/news-shocks-in-dynare/2477 "2025-10-20T10:09:18Z")

</div>

Hi guys, I’m working on an RBC model with news (anticipated) shocks. Apparently it quite easy to model them in Dynare. For instance I’ve found this post: Modelling anticipated shocks The same approach can be found her…

---

## [Conditional variance](https://forum.dynare.org/t/conditional-variance/3297)

<div class="topic-metadata">

**Author:** [@YiJohn](https://forum.dynare.org/u/YiJohn)\
**Replies:** 7\
**Last updated:** [16 October 2025 15:44 UTC](https://forum.dynare.org/t/conditional-variance/3297 "2025-10-16T15:44:19Z")

</div>

I was solving a standard DSGE model, and I was looking for conditional variance of endogenous variables, like var(y\_{t+k}|t) with respect to different horizon k. Is there an option or command that reports this condition…

---

## [Second order approximation and Shock sizes](https://forum.dynare.org/t/second-order-approximation-and-shock-sizes/28024)

<div class="topic-metadata">

**Author:** [@lovefukanglin](https://forum.dynare.org/u/lovefukanglin)\
**Replies:** 3\
**Last updated:** [15 October 2025 14:27 UTC](https://forum.dynare.org/t/second-order-approximation-and-shock-sizes/28024 "2025-10-15T14:27:50Z")

</div>

Dear, professor jpfeifer, I simulate my model at first order, everything goes right and I get the corresponding IRFs. The problem is the second order approximation for welfare analysis. I find the means of variables a…

---

## [Error: DsgeSmoother - Switching to univariate filter. This may be a sign of stochastic singularity](https://forum.dynare.org/t/error-dsgesmoother-switching-to-univariate-filter-this-may-be-a-sign-of-stochastic-singularity/27976)

<div class="topic-metadata">

**Author:** [@Maxx](https://forum.dynare.org/u/Maxx)\
**Replies:** 8\
**Last updated:** [15 October 2025 07:55 UTC](https://forum.dynare.org/t/error-dsgesmoother-switching-to-univariate-filter-this-may-be-a-sign-of-stochastic-singularity/27976 "2025-10-15T07:55:01Z")

</div>

I have developed a DSGE model consisting of six main files. Before running the simulations, the Blanchard-Kahn conditions were satisfied, and no issues were identified with the model. However, after initiating the simul…

---

## [Price dispersion in TANK](https://forum.dynare.org/t/price-dispersion-in-tank/28019)

<div class="topic-metadata">

**Author:** [@Samvel](https://forum.dynare.org/u/Samvel)\
**Replies:** 2\
**Last updated:** [9 October 2025 08:00 UTC](https://forum.dynare.org/t/price-dispersion-in-tank/28019 "2025-10-09T08:00:15Z")

</div>

Hi everyone I am working with a TANK model and want to implement the non-linear equations in Dynare to perform welfare analysis. I need to incorporate sectoral price dispersion (I have two sectors, so j = 2). May I kind…

---

## [The difference between first-order and second-order](https://forum.dynare.org/t/the-difference-between-first-order-and-second-order/27995)

<div class="topic-metadata">

**Author:** [@tuoer](https://forum.dynare.org/u/tuoer)\
**Replies:** 3\
**Last updated:** [29 September 2025 11:31 UTC](https://forum.dynare.org/t/the-difference-between-first-order-and-second-order/27995 "2025-09-29T11:31:27Z")

</div>

I currently have impulse response diagrams for first-order Taylor expansion and second-order Taylor expansion. But the variable L that I am most concerned about has a shape similar to П under first-order conditions, whi…

---

## [How is the labor supply shock manifested?](https://forum.dynare.org/t/how-is-the-labor-supply-shock-manifested/27975)

<div class="topic-metadata">

**Author:** [@zhanglei](https://forum.dynare.org/u/zhanglei)\
**Replies:** 4\
**Last updated:** [26 September 2025 09:02 UTC](https://forum.dynare.org/t/how-is-the-labor-supply-shock-manifested/27975 "2025-09-26T09:02:44Z")

</div>

Dear everyone, I’d like to add a labor supply shock to my model. This shock variable is placed in the utility function, as shown in the figure. Does an increase in the shock variable l\_t represent a positive or negative…

---

## [Issue with Collinearity in a simple Nonlinear NK Model Implementation](https://forum.dynare.org/t/issue-with-collinearity-in-a-simple-nonlinear-nk-model-implementation/27979)

<div class="topic-metadata">

**Author:** [@camonzon](https://forum.dynare.org/u/camonzon)\
**Replies:** 1\
**Last updated:** [19 September 2025 07:51 UTC](https://forum.dynare.org/t/issue-with-collinearity-in-a-simple-nonlinear-nk-model-implementation/27979 "2025-09-19T07:51:56Z")

</div>

Hello everyone, I’m implementing the nonlinear version of the Chapter 3 New Keynesian model from Understanding DSGE Models by Celso José Costa Junior. I entered the model in its fully nonlinear form and also included a …

---

## [Help with multi-sector DSGE code (new user, possible mistakes)](https://forum.dynare.org/t/help-with-multi-sector-dsge-code-new-user-possible-mistakes/27953)

<div class="topic-metadata">

**Author:** [@tuhin](https://forum.dynare.org/u/tuhin)\
**Replies:** 4\
**Last updated:** [10 September 2025 22:19 UTC](https://forum.dynare.org/t/help-with-multi-sector-dsge-code-new-user-possible-mistakes/27953 "2025-09-10T22:19:31Z")

</div>

Dear Professor Pfeifer I am new to Dynare and I am trying to build a three-sector DSGE model with agriculture, industry, and services, including broad money and credit dynamics. I attempted to implement this in Dynare, …

---

## [Determinacy in SAM + NK models](https://forum.dynare.org/t/determinacy-in-sam-nk-models/27963)

<div class="topic-metadata">

**Author:** [@HenriGraul](https://forum.dynare.org/u/HenriGraul)\
**Replies:** 1\
**Last updated:** [10 September 2025 11:17 UTC](https://forum.dynare.org/t/determinacy-in-sam-nk-models/27963 "2025-09-10T11:17:20Z")

</div>

Hello guys! I am trying to run an extended version of a New Keynesian model with search and matching frictions - featuring incomplete markets (Tractable HANK, i.e., degenerate distribution across types). I cannot unders…

---

## [Parameter loop in Dynare 5.x](https://forum.dynare.org/t/parameter-loop-in-dynare-5-x/20293)

<div class="topic-metadata">

**Author:** [@Robert](https://forum.dynare.org/u/Robert)\
**Replies:** 5\
**Last updated:** [9 September 2025 18:24 UTC](https://forum.dynare.org/t/parameter-loop-in-dynare-5-x/20293 "2025-09-09T18:24:22Z")

</div>

Hi everyone, Quick question, I am using the following adjusted code from above: OMEGARS = 1:1:5; %specifies the different values I want to loop over first\_time = 1; for i = 1:length(OMEGARS) if first\_time …

---

## [BK condition are not satisfied: indeterminacy](https://forum.dynare.org/t/bk-condition-are-not-satisfied-indeterminacy/27955)

<div class="topic-metadata">

**Author:** [@auserpallas](https://forum.dynare.org/u/auserpallas)\
**Replies:** 1\
**Last updated:** [8 September 2025 15:54 UTC](https://forum.dynare.org/t/bk-condition-are-not-satisfied-indeterminacy/27955 "2025-09-08T15:54:29Z")

</div>

Dear all I have problem: Blanchard & Kahn conditions are not satisfied: indeterminacy. with my code. ss\_MP.m (2.5 KB) param\_MP.m (883 Bytes) np\_steadystate.m (2.3 KB) np.mod (5.6 KB)

---

## [Dynare code for DSGE-model news shock](https://forum.dynare.org/t/dynare-code-for-dsge-model-news-shock/11863)

<div class="topic-metadata">

**Author:** [@thax](https://forum.dynare.org/u/thax)\
**Replies:** 13\
**Last updated:** [31 August 2025 16:29 UTC](https://forum.dynare.org/t/dynare-code-for-dsge-model-news-shock/11863 "2025-08-31T16:29:01Z")

</div>

Dear community, I am new to dynare and therefore my question may be to straightforward: I want to simulate a negative technology news shock in the classical DSGE-model which happens after 4 periods. I belive, this shoc…

---

## [Blanchard & Kahn conditions problem](https://forum.dynare.org/t/blanchard-kahn-conditions-problem/27900)

<div class="topic-metadata">

**Author:** [@zhanglei](https://forum.dynare.org/u/zhanglei)\
**Replies:** 1\
**Last updated:** [21 August 2025 09:25 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-problem/27900 "2025-08-21T09:25:45Z")

</div>

Hello everyone. I’m building a model that includes agricultural artificial intelligence. K represents traditional capital and Z represents intelligent capital. The agricultural sector is divided into green agriculture a…

---

## [Blanchard & Kahn conditions are not satisfied: indeterminacy](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-indeterminacy/15670)

<div class="topic-metadata">

**Author:** [@dawn](https://forum.dynare.org/u/dawn)\
**Replies:** 15\
**Last updated:** [21 August 2025 09:06 UTC](https://forum.dynare.org/t/blanchard-kahn-conditions-are-not-satisfied-indeterminacy/15670 "2025-08-21T09:06:10Z")

</div>

dear professor： I’m new in dynare and recently I want to build a model.But when I run the model, it can’t work. The message is " Blanchard & Kahn conditions are not satisfied: indeterminacy." I have tried my best for mo…

---

## [Changing the steady state volatility when simulating risk shocks](https://forum.dynare.org/t/changing-the-steady-state-volatility-when-simulating-risk-shocks/27892)

<div class="topic-metadata">

**Author:** [@Emil\_Karlsen](https://forum.dynare.org/u/Emil_Karlsen)\
**Replies:** 3\
**Last updated:** [20 August 2025 15:14 UTC](https://forum.dynare.org/t/changing-the-steady-state-volatility-when-simulating-risk-shocks/27892 "2025-08-20T15:14:58Z")

</div>

Hi all, I am modelling stochastic volatility as in Born and Pfeifer (2014), using their functional form for the stochastic driving process, of the type: log(z\_t) = (1-\\rho^z)\\bar{z} + \\rho^z z\_{t-1} + e^{\\sigma\_t^z} \\v…

---

## [The impulse response graph suddenly jumps in the second period](https://forum.dynare.org/t/the-impulse-response-graph-suddenly-jumps-in-the-second-period/27903)

<div class="topic-metadata">

**Author:** [@JimsVims](https://forum.dynare.org/u/JimsVims)\
**Replies:** 3\
**Last updated:** [20 August 2025 11:27 UTC](https://forum.dynare.org/t/the-impulse-response-graph-suddenly-jumps-in-the-second-period/27903 "2025-08-20T11:27:29Z")

</div>

Hi everyone, I would like to ask why my impulse response graphs look strange. Almost every graph has a jump in the second period. Thanks！

---

## [Inconsistent IRFs: Mixing log() and Level Equations in Dynare Model Block?](https://forum.dynare.org/t/inconsistent-irfs-mixing-log-and-level-equations-in-dynare-model-block/27857)

<div class="topic-metadata">

**Author:** [@taherfahmi](https://forum.dynare.org/u/taherfahmi)\
**Replies:** 3\
**Last updated:** [11 August 2025 14:25 UTC](https://forum.dynare.org/t/inconsistent-irfs-mixing-log-and-level-equations-in-dynare-model-block/27857 "2025-08-11T14:25:56Z")

</div>

Hi all, I’m running into weird IRFs in my closed-economy NK DSGE (Rotemberg prices, indexation, Taylor rule with smoothing, capital, AR(1) log-shocks, etc.). My impulses to a 25 bp rate hike are too sharp, interest rate…

---

## [Weird Impulse Response Function](https://forum.dynare.org/t/weird-impulse-response-function/11957)

<div class="topic-metadata">

**Author:** [@C.H.Chen](https://forum.dynare.org/u/C.H.Chen)\
**Replies:** 6\
**Last updated:** [11 August 2025 14:24 UTC](https://forum.dynare.org/t/weird-impulse-response-function/11957 "2025-08-11T14:24:37Z")

</div>

I constructed a model based on Iacoviello(2010) Housing market spillover … , and have some modification. I exclude monetary sector so all variable presents in real term. I alter patient agent’s housing consumption that…

---

## [Piecewise function not holding when estimating IRF](https://forum.dynare.org/t/piecewise-function-not-holding-when-estimating-irf/27863)

<div class="topic-metadata">

**Author:** [@Henry.Austin](https://forum.dynare.org/u/Henry.Austin)\
**Replies:** 1\
**Last updated:** [11 August 2025 14:13 UTC](https://forum.dynare.org/t/piecewise-function-not-holding-when-estimating-irf/27863 "2025-08-11T14:13:26Z")

</div>

Hello there, I’m estimating a model with a government policy rule in which the government intervenes with a wage subsidy. The rule states the government will spend Gt = max(0, C\_bar - Ct). However, when I estimate the…

---

## [Uncertain monetary-policy transmission lag to inflation in NK model with non-linear Rotemberg pricing](https://forum.dynare.org/t/uncertain-monetary-policy-transmission-lag-to-inflation-in-nk-model-with-non-linear-rotemberg-pricing/27854)

<div class="topic-metadata">

**Author:** [@taherfahmi](https://forum.dynare.org/u/taherfahmi)\
**Replies:** 4\
**Last updated:** [7 August 2025 18:50 UTC](https://forum.dynare.org/t/uncertain-monetary-policy-transmission-lag-to-inflation-in-nk-model-with-non-linear-rotemberg-pricing/27854 "2025-08-07T18:50:00Z")

</div>

Hello Dynare community, I’m trying to estimate a closed-economy New-Keynesian DSGE with: Fully non-linear Rotemberg price adjustment costs and partial indexation (γ=0.5) in the NKPC, An Taylor rule with intercept and …

[Previous page](https://forum.dynare.org/c/stochasticsimulations/16.md)

[Next page](https://forum.dynare.org/c/stochasticsimulations/16.md?page=2)
