For my thesis I need to perform some volatility analysis for a couple of different models. My goal is to obtain a graph similar to this one:
To do so, I have understood that I need to perform a simulation by randomly picking values of the shocks’ errors, using the
randn() function to define a series
x = stdev(of the error)*randn(). When I have this series, from the matrix of policy and transition functions I obtain after running stoch_simul, I can retrieve the magnitude of the effect through which x affects the variable for which I want to simulate a time series, for example output or consumption.
My problem is that the models that I need to compare are medium sized, so, endogenous variables are influenced by both exogenous and endogenous variables. With exogenous variables I can easily create the simulated series, because I know their distribution, but I cannot do the same with endogenous variables. To make an example:
Output depends on the shocks and on other variables, such, for example, consumption, so that the series is defined as:
Yt = aCt + bCt-1 + cDt + … + zZt
With a, b, c, …, z parameters from the policy and transitions functions’ matrix, Ct, Ct-1 endogenous variables and Zt the exogenous variable.
Is there an easier way in which I can obtain the simulated series for the endogenous variables of interest? And, if not, how can I overcome the problem created by the dependence of endogenous variables one on another?
I hope I made myself clear enough and that someone can help me solve this problem. Thank you.