A request for help running a semi-structural model

Hello, everyone.

I have been trying to replicate a semi-structural model in Dynare for some time now (a few months). The model is described in the report available at this link: https://www.bcb.gov.br/content/ri/relatorioinflacao/202406/ri202406b12p.pdf. It is a model from the Central Bank of Brazil. Since the document is in Portuguese, I have summarized the equations and the explanation of the variables in a pdf file attached to this message.

I am really lost. Initially, I thought some equations were missing and tried to complete them based on autoregressive processes (like IMF) and/or random walks (Laubach Williams et al.). I made various combinations, but after running them, I cannot replicate the impulse response curves and conditional forecasts. The results are very disparate and sometimes counterintuitive.

Reading more on the subject, I found FRB-type models and then saw other types. I realized that I actually know very little about this.

Therefore, I would like to ask for help. Should I run this model as a VAR? Or in the same way as I run a DSGE model? Do I need to find other eqautions to the exceeding variables? How can I construct graphs similar to those in the report?

Given all that I am going through, I am willing to pay someone to help me if there are people available. I am not sure if I need to use different software. I really don’t know.

Perhaps to start, I need help running the calibrated model along with conditional forecasts and impulse response functions. The coefficient values for the equations are in the bank’s report.

Before suggesting it, I have contacted the Central Bank of Brazil for information about the model, but any information not in the report is confidential.

Thank you.

Semistructural model.pdf (229.8 KB)

1 Like

Have you tried implementing the model based on the coefficients in Table 1? It seems to me the main issue is distinguishing endogenous from exogenous variables. That may explain why you have fewer variables than equations.

Looking at the Google translated paper, it seems you are essentially dealing with a (potentially restricted) VARX. I am not sure Dynare is able to handle that type of model due to the presence of observed exogenous variables.

Many thanks for your reply.

Yes, I calibrated the model using the coefficientes in Table 1. Results are terrible…

The variables that I believe to be exogenous are indicated in the PDF file below.
For each exogenous variable, I included an autoregressive equation or a random walk.
For example, for the exogenous variable \hat{rp}_{t}, I inserted the following equation:
\hat{rp}_{t}=\rho\cdot \hat{rp}_{t-1} + \varepsilon_t
where \rho is a parameter and \varepsilon_t is an error term.

There are several reasons why I believe that some equations are missing from the Central Bank of Brazil’s report:

Reason 1) On the left side of the Phillips curve, there is the inflation of free prices (not controlled by the government), and on the right side, there is a variable representing the total inflation (IPCA). I imagine there is a missing equation that connects these two variables. The IPCA comprises free price inflation and inflation of prices of goods regulated by the government, which represents, on average, 25% of the total IPCA. This equation is missing, along with the variable for government-regulated prices.

Reason 2) The Central Bank report I presented here (written in June 2024) is an update of the model, which has been developed over several years. In 2021, a report was published presenting one of the model versions in which the equation for one of the IS curve variables (neutral real interest rate) was not expressed. However, in the 2024 report, when mentioning updates to this variable, it states that this variable was considered a random walk in 2021. I highlight that in 2021, the dynamics of this variable were not informed, but in 2024, the report states what the variable’s dynamics were in 2021.

Reason 3) The inflation expectation in the last equation shown in the PDF below or equation 5 of the report (Inflation expectations) is not well described. It is unclear whether it is the expectation of the IPCA or the inflation of free prices, and it is unclear whether they are rational expectations or another form of representation.

Reason 4) Why is there an equation about the formation of inflation expectations based on the information provided by economic agents to the Central Bank (equation 5 in the Central Bank’s report), but there is no equation for the expectations of interest rates equally informed by economic agents? Such an equation existed in the 2021 model, but apparently, there is no equation for it in the 2024 model.

Link to the BCB (Central bank of Brazil) report of 2021

bcb.gov.br/content/ri/relatorioinflacao/202112/ri202112b7p.pdf

I think I am trying to swim in deep waters without sufficient training…
But I need to solve this.
Thank you for your patience.

Semistructural model_1.pdf (234.0 KB)

Hi,
Replicating models from research papers can be challenging, especially when some equations or details are missing.
Based on your description, it seems like you may need to approach this as a VAR or DSGE model, depending on the structure.

I specialize in building and analyzing complex macroeconomic models, including DSGE and semi-structural models using Dynare and other econometric software. I can help you replicate existing models, conduct simulations, and generate publication-quality graphs and reports

You can reach out to me on my email here

Colin

I can get good stedy states values of the model, but I am struggling with the IRFs.
In fact, you have listed very good reasons for why we cannot get the same results, although I think we can get very close for some shocks (ie, the interest rate or demand shock). The exchange rate shock is a bit more demanding as the text states the majority of the inflation will come from monitored prices, maily from gas.

The neutral interest rate is present in both versions of the IS curve. In the 2024 version, however, it is different from the one entering the Taylor rule (although their variances and dynamics were calibrated to be similar to the same benchmark).

I would guess that Inflation expectations is of the expectations of the headline IPCA, for a few reasons. The used notation, the historical use of this variable by the BCB in other publications and because it observed values come from the Focus, for which free prices projections are available for shorter period than the span of the estimation period.

For the interest rate expectation I would guess it is a simple model consistent moving average with standard weights. In the 2021 version it had tweaked weights.