# Steady state DSGE Model search and matching frictions

Hi everyone,

I’m writing my Master’s thesis wherein I try to to set up a DSGE model with search and matching frictions. Since my model contains non-linear equations with endogenous variables, I use Matlab’s fsolve to get the steady state values. My .mod file is running but I’m not content with it because I’d like to evaluate how the steady state values and the model dynamics react to changes in parameters. Therefore I want to incorporate my .m-file into the .mod file.

A steady state file is the solution but I have no idea how to transform my .m-file (“mysteady”) into a steady state file because I’m rather new to Matlab. I know that I have to use “function[ys,check]=NAME_OF_THE_MOD_FILE_steadystate(ys,…)”, where ys is a vector with the steady state values of my variables I want to use as initial values in Dynare, but I have problems to understand the examples presented in this forum because I don’t know how to use fsolve within the steady state file.

It would be really helpful if anyone has an idea how to solve my problem.

Here are my .m files and my .mod file. Note that “afa1” is a .m-file I employ in my .mod file to calculate an integral expression. The file “mysteady_sol” is used to solve the equation system presented in “mysteady”.

There are many examples in the forum. See for example here: [External function in dynare 4.2)

Hi,

I would like implement the following expression in Dynare 4:

int(epsilon*g(epsilon),v, +inf)

where epsilon is a random shock drawn from a random (let’s assume a normal) PDF g(epsilon); v is the lower integration bound and +inf is the upper bound.

Any suggestion or reference on how to do it?

Thank you,
F.

If you don’t have a recursive representation to get rid the integral by defining the whole thing as a variable, you can only try a external function.