A Three-Country Macroeconomic Model for Portugal1
Author: Alex Pienkowski

Contributor Notes

Author’s E-Mail Address: apienkowski@imf.org

This paper outlines a simple three-country macroeconomic model designed to focus on the transmission of external shocks to Portugal. Building on the framework developed by Berg et al (2006), this model differentiates between shocks originating from both inside and outside the euro area, as well as domestic shocks, each of which have different implications for Portugal. This framework is also used to consider the dynamics of the Portuguese economy over recent decades. The model, which is designed to guide forecasts and undertake simulations, can easily be modified for use in other small euro area countries.


This paper outlines a simple three-country macroeconomic model designed to focus on the transmission of external shocks to Portugal. Building on the framework developed by Berg et al (2006), this model differentiates between shocks originating from both inside and outside the euro area, as well as domestic shocks, each of which have different implications for Portugal. This framework is also used to consider the dynamics of the Portuguese economy over recent decades. The model, which is designed to guide forecasts and undertake simulations, can easily be modified for use in other small euro area countries.

I. Introduction

This paper sets out a three-country macroeconomic model covering Portugal, the remaining euro area (REA) and the rest of the world (RoW). It is based on the canonical quarterly projection model (QPM) developed by Berg et al (2006), but extended to cover three, rather than two, countries. This extension is critical for modelling the dynamics of external shocks to Portugal – a small open-economy without an independent monetary policy. This paper shows the importance of identifying both the type and origin of shocks for understanding the economic impact to the Portuguese economy.

The paper does not claim to be at the frontier of the literature. It attempts, instead, to act as a workhorse tool that can easily be modified for different functions and be replicated by other users. It is primarily designed to help guide medium-term forecasts, run simulations and undertake policy analysis. This initiative is similar to Jakab et al (2015) which extends the Fund’s Global Projection Model (GPM) to include Germany, France, Italy, and Spain. But the model is simpler and more tractable; and is designed to be easily adapted for use in other small euro area economies, like Portugal. It cannot match the detail of models such as the Banco de Portugal’s PESSOA model (Almeida et al, 2013); but relative to this model, it does have a richer description of the external sector. The closest model to the one presented here is by Maria (2016). This is a two-country (Portugal and euro area) semi-structural model, with a similar construction to the one presented here, but with more focus on the relationship between output and unemployment (Okun’s Law). Many of the stylized facts presented here match those presented in Maria (2016).

The model is built around four main behavioral equations – i) an open-economy IS curve that governs output gap dynamics, and is unique to each of the three countries; ii) a Phillips Curve that drives inflation, and is also unique to each country; iii) a monetary policy reaction function that drives policy rates for the euro area and the RoW, and; iv) a single exchange rate equation linking the euro area to the RoW.

The next section explains in more detail the structure of the model, defining the equations and shocks, the input data, and the estimation procedure. This is followed by an exploration of the model’s properties – impulse response functions (IRFs), the latent variables in the model, a historical decomposition of shock to hit Portugal, some discussion on unconventional monetary policies (UMPs) and in-sample forecasting performance. Finally, a short conclusion includes possible avenues for future work.

II. Model Structure

Output and inflation for each country is driven by standard IS and Phillips curves. Monetary policy is determined at the euro area level, and there is only one exchange rate – that of the euro area vis-à-vis the RoW. Each of these equations are summarized in turn.

IS Curve

Output is determined by an open-economy IS curve. The output gap of country ‘i’ (yti) is the log difference between actual and potential real GDP, and is driven by its lag and several domestic and external real variables:



  • rti is the real interest rate 2 and rti* is the natural interest rate – the ‘gap’ between the two determining monetary conditions in the economy;

  • ytjandytk are the output gaps of the two other countries, j and k respectively – this captures the impact of external demand;

  • zti is the real exchange rate (a higher value is a more depreciated rate) and zti* is the equilibrium real exchange rate – the gap between the two capturing external price competitiveness;

  • pbt is the change in the structural primary balance, which captures the fiscal stance of the government, and;

  • fst is a financial stress index, which helps capture the impact of changing domestic lending conditions.

The latter two variables are only included in the IS curve for Portugal; and are exogenous and follow a first-order autoregressive process:


While the nominal interest and exchange rates are common to the euro area, the real interest and exchange rates gaps will be different for Portugal and the REA. This is because the rates of inflation may be different for each country, affecting rtiandzti and the equilibrium rates rti*andzti* – may also be different.

Phillips Curve

Inflation (log difference of the price level) for country i(πti) is based on expected and lagged inflation, and is influenced by a real marginal cost factor (RMCti):


The RMCti is determined by a weighted average of the output gap and exchange rate gap, both of which have a positive effect on prices. Stronger activity i.e. a positive output gap, will push up prices; while a depreciate exchange rate (positive exchange rate gap) will increase import prices and hence prices more generally.


Monetary Policy

Monetary policy has the following reaction function:


where Rti is the nominal interest rate and π1* is the inflation target for either the RoW or the euro area as a whole. For euro area, the natural interest rate (rti*), inflation (πti) and the output gap (yti) is the weighted average of those for Portugal (2 percent) and the REA (98 percent).

Exchange rate

There is one exchange rate in the model that links the euro area to the RoW. It is based on an uncovered interest parity condition, but with forward and backward-looking elements, which introduce some persistence in the evolution of the exchange rate:


where st is the log of the nominal effective exchange rate (NEER) of the euro vis-à-vis the RoW (a higher value indicates a more depreciated exchange rate). The real exchange rate is defined as:


where pti is the log of the price level for country i and ptfor is the traded-weighted log of the price level of the other two countries in the model. Even though there is one nominal exchange rate, each country will have a different domestic price level and different trading partners, which means that the real exchange rate is unique to each country.

Steady-state conditions

Potential growth (y¯ti), the natural interest rate (rti*) and the equilibrium exchange rate (zti*) are governed as follows:


Each can persistently deviate from their steady-state values – yssi,rssi,andzssi, respectively.


Quarterly data for real GDP and the core price level for Portugal and the euro area are taken from the IMF WEO database. Real GDP and the price level for the RoW is constructed using data from the IMF’s GPM database (Carabenciov et al, 2013), which covers 85 percent of global economic output. The NEER is taken from Eurostat’s estimate for 42 trading partners. The nominal interest rate for the euro area is the ECB’s Main Refinancing Operations (MRO) rate, and the nominal interest rate for the RoW is constructed from the GPM database. The change in the structural primary balance is calculated using elasticities and ‘one-offs’

estimated by the European Commission.3 And the financial stress index is taken from Pedro Braga et al (2014). In this model, potential output and therefore the output gap is treated as an ‘observed variable’ i.e. is not estimated within the model. In the case of Portugal and the REA, WEO estimates are used; while for the RoW, it is taken from the GPM database.


Given the substantial number of parameters in this model (53) and the relatively limited time-series (1999:Q1–2019:Q1), as well as structural breaks associated with the euro area membership and the euro area crisis, estimating the model parameters using standard maximum likelihood procedures is challenging. As such, the model is estimated using Bayesian techniques. For the REA and RoW, where possible the parameters are taken from the GPM, and are given tight priors to ensure that this model is broadly consistent with this framework. The majority of the parameters governing the dynamics of the Portuguese economy are estimated with fairly loose priors, with the data often providing important information in generating the posterior estimate. The parameter estimates are summarized in Table 1 and Figure 1.

Table 1.

Summary of Parameter Values

article image
Figure 1.
Figure 1.

Selected Prior and Posterior Distributions on Key Parameters

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

Consistent with the REA, the persistence of the output gap (β1) in Portugal is higher than that of the RoW, likely because of greater nominal rigidities in labor and product markets. To ensure model convergence, a tight prior is applied to parameter linking the interest rate gap to economic activity (β2), which is assumed to be close to that of the REA. Despite having broadly similar trade weights, Portugal is more sensitive changes in the output gap in in the REA (β3) than the RoW (β4), although this may be because the estimation is also picking up common shocks, especially during the euro area crisis. Inflation in Portugal is more backward looking (α1) than the RoW, although is less so than in the REA. The REER gap (1 – α3) plays an important role in driving inflation in Portugal. And the overall sensitivity of inflation to real marginal costs (α2) is also relatively high.

III. Model Properties

Impulse Response Functions

With these parameter estimates, IRFs can be constructed to explore the dynamics of the model. To illustrate these properties, this section will focus on three scenarios, each involving a negative demand shock originating in one of the three countries and examining the impact on Portugal. The first shock involves a domestic demand shock (ϵti, in equation 1) i.e. the shock only hits Portugal. The results are illustrated in Figure 2. The first thing to note is that the nominal interest and exchange rates are essentially unchanged. These variables are influenced by changes to euro area aggregates (equations 5 and 6), and Portugal is too small to influence these significantly. All the adjustment, therefore, must come internally. As the output gap widens, inflation declines, which has the effect of initially raising the real interest rate, putting further downward pressure on demand. However, the fall in inflation improves price competitiveness and the real exchange rate initially depreciates, which acts to close the output gap. The absence of a monetary policy response means that of the three scenarios explored, this one exbibits the most persistent negative output gap, lasting 8 quarters. Weaker inflation is eventually followed by higher-than-trend inflation, as prices go back to their pre-shock levels i.e. the competitiveness gain is temporary. Given that inflation temporary runs higher (around 6-quarters after the shock), the interest rate gap becomes temporarily accommodative.

Figure 2.
Figure 2.

Domestic Demand Shock

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

Figure 3 shows the IRFs for a demand shock that hits the REA – an external shock to Portugal. The shock is calibrated such that the initial impact on output in Portugal is identical to the previous simulation. As such, the implied demand shock to the REA is around three times as large (the output gap in the REA peaks at 3 percent of potential output). In this scenario, monetary policy reacts, and the nominal and real interest rate fall, supporting demand. Compared to the previous scenario, output returns to potential two quarters sooner, and is followed by a positive output gap as the monetary stimulus from the euro area persists. Inflation remains persistently weak in both Portugal and the REA. The nominal exchange rate depreciates as the euro area nominal interest rate falls relative to the RoW, but given the forward-looking nature of the UIP condition, it more quickly returns to equilibrium. The impact on the real exchange rate is more persistent, however, as the price level in Portugal remains persistently high relative to the REA.

Figure 3.
Figure 3.

REA Demand Shock

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

The third scenario (Figure 4) considers a demand shock to the RoW. Again, this is calibrated such that the impact on Portugal is the same as the previous two scenarios (the output gap in the RoW peaks at nearly 5 percent). The first thing to note is the muted impact on the nominal exchange rate. This is because nominal interest rates fall by similar amounts in both the euro area and RoW, which may seem odd given that the shock occurs in the RoW. However, as the persistence of output and inflation in the RoW is less than euro area, the recovery is faster; this and the fact that the monetary policy reaction function in the RoW is calibrated to put less weight on fighting inflation, the fall in the nominal interest rate in the RoW roughly matches that of the euro area. The output gap closes within a similar timeframe to scenario 2 as a result to the accommodative monetary policy stance, and the inflation shock is less persistent.

Figure 4.
Figure 4.

RoW Demand Shock

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

Latent variables

There are three latent variables in this model -potential output (y¯ti), the natural interest rate (rti*) and the equilibrium exchange rate (zti*). As discussed above, potential output is assumed to be observed and is constructed using a multivariate filter approach (Blagrave et al, 2015). This shows that at the peak of the crisis, the output gap was -5.7 percent of GDP, but was close to balance as of early 2019. The other two variables – rti*andzti* – are estimated using a Kalman filter.


For Portugal, rti* remains largely stable over the pre-crisis period, varying between 0 and 0.5. But falls steeply from 2010 to around minus 1 in 2019. This is consistent with the view that the natural rate – the interest rate required to maintain a closed output gap and stable inflation – is pro-cyclical. During a downturn, when the economy weakened, a lower interest rate is needed to support economic activity. The steady-state value is assumed to be 0.5 percent, which is where the natural rate will converge to in equilibrium. However, the standard deviation of rti* estimated in the Bayesian framework is low (0.03), suggesting that it could remain subdued for many periods.


Real Interest Rate


Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

For Portugal, zti*, is estimated to have appreciated by around 20 percent in the years following euro area membership, likely driven structural reforms to improve competitiveness vis-à-vis the REA and RoW. Nevertheless, the actual rate was often below this equilibrium level, implying an ‘overvalued’ exchange rate. In 2009, for example, these estimates suggest that the real exchange rate was overvalued by nearly 10 percent. During the crisis period, the real rate depreciated, with the gap often showing signs of undervaluation i.e. providing a boost to demand.


Real Exchange Rate


Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

Historical Shock Decomposition

The Kalman filter can also be used to decompose changes in historical data into the shocks defined in the model. Economic activity in the REA is a key driver of the output gap in Portugal. Prior to the crisis it seems to have played an important role in pushing the output gap into positive territory, consistent with Almeida et al (2009). And the subsequent collapse in demand in 2009, and then again in 2012, weighed heavily on Portuguese output. Economic activity in the RoW seems to have been important in 2009, but then played less of a role subsequently.


Shocks to the Ouptut Gap

(Percent of GDP)

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

In terms of fiscal policy, the stimulus in 2009–10 seemed to have played an important role in offsetting the negative external shocks emanating from the global financial crisis. But this reversed from 2011 – over the subsequent 4 years the structural balance improved by 7.7 percent of potential GDP, weighing significantly on growth.


Fiscal Impact

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

1/ Contribution to output gap, percent of potential GDP

Whilst the policy rate in the euro area fell from above 4 percent in 2008 to 0 from 2016, the interest rate gap does not seem to have played an important role in boosting demand during the crisis period (see below for further discussion on UMPs). This is attributed to two main factors – i) as discussed above, rti* declined over this period, implying that policy rates would have needed to fall just to maintain a neutral monetary policy stance; and, ii) inflation (and hence inflation expectations in this model) declined, meaning that the real interest rate did not fall as much as the nominal rate. Of course, if the policy rate had not been lowered, monetary conditions would have tightened considerably, further dragging down on demand. The exchange rate gap, in contrast, did seem to play a more important role in boosting demand. As inflation in Portugal fell (relative to REA and RoW), the REER depreciated by nearly 20 percent over 2009–15. This ‘internal devaluation’ helped to somewhat stabilize economic activity in the absence of a nominal exchange rate adjustment.


Monetary Stimulus

(Impact on the output gap, percent of GDP)

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

Unconventional Monetary Policy

The model is set up in such a way that the monetary reaction function (equation 5) is unconstrained by the effective lower bound (ELB), and so could in theory, deliver negative interest rates of any level, if required. This set-up implicitly assumes that the ECB could deliver the monetary stimulus required to meet the policy reaction function using UMPs, such as asset purchases and forward guidance. The historical decomposition described above, however, does not factor in UMPs, potentially downplaying the monetary stimulus provided by the ECB. It is beyond the scope of this model to directly introduce UMP tools into the framework. However, it is possible to use a measure of the ‘shadow interest rate’ developed by Krippner (2015). This technique seeks to represent the monetary stimulus generated by UMPs in the form of an equivalent interest rate. Such shadow rates can therefore be highly negative, as they are not constrained by the ELB. Using the shadow rate instead of the ECB’s MRO in the model (with no re-estimation of parameters), the implied monetary stimulus is significantly higher, providing a peak monetary impulse of 1.5 percent of GDP. Based on this estimate, the absence of UMPs would have led to a much deeper and prolonged recession in Portugal during the crisis.


Policy Interest Rate


Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

In-Sample Forecast Accuracy

This model is not designed to replace near-term forecasting tools, which tend to incorporate many high-frequency variables. Instead, it can be used to guide medium-term forecasts, especially the transition to the steady-state assumptions on growth and inflation. The model performs reasonably well at forecasting the output gap. The median ‘error’4 after four quarters is around 0.4 percent of GDP, similar to the average historical revision of WEO estimate after 1 year for the euro area (Kangur et al, 2019). The root-mean-square error (RMSE) is 1 percent of GDP. The model performs less well at forecasting inflation, with a median error of 1.3 percent after 1-year (and a RMSE of 1.5 percent). However, this inflation forecast error also seems consistent with the difficulties within the wider economic profession in terms of pinning down the changing dynamics of the Phillips Curve (for Portugal, see Serra, 2018). An area of extension to this model would be to better capture the various components of inflation – for example, core, energy and food – and include factors such as global oil and food prices into the model.


Output Gap

(Percent of potential GDP)

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001



(Percent change qoq, annualized)

Citation: IMF Working Papers 2019, 281; 10.5089/9781513519241.001.A001

IV. Conclusions

This semi-structural model seeks a balance between realism and tractability. It provides enough detail to adequately capture the dynamics of the Portuguese economy, without being unwieldy or overly complex. It is designed in such a way that it can be easily replicable to other countries in a currency union (or currency board), where the origin of the shocks -domestic, external (within the union), external (outside the union) – can matter as much as the type of the shocks. Accordingly, all codes and data are available upon request. There are numerous ways to extend this model. First, inflation dynamics could be better modeled by separating core, imported and administrative price changes; this, amongst other things, would improve the inflation forecasting ability of the model. Second, the properties of the equilibrium interest rate (rti*) and exchange rate (zti*), including what cyclical and structural factors might influence them could be an interesting extension, especially linking to the ongoing debate on secular stagnation. Finally, a deeper understanding of the role of financial markets both in terms of the direct impact on economic activity and how it might influence the monetary policy transmission mechanism (captured by the (β2 parameter) would be particularly interesting in the Portuguese context.

V. References

  • Almeida, V., Castro, G., and Felix, R. M., 2009, “The Portuguese economy in the European context: structure, shocks and policy”, The Portuguese Economy in the Context of Economic, Financial and Monetary Integration”, Banco de Portugal.

    • Search Google Scholar
    • Export Citation
  • Almeida, V., Castro, G., Felix, R. M., Julio, P. and Maria, J. R., 2013, “Inside PESSOA – A Detailed Description of the Model”, Banco de Portugal Working Paper 16/2013.

    • Search Google Scholar
    • Export Citation
  • Blagrave, P., Garcia-Saltos, R., Laxton, D., and Zhang, F., 2015, A Simple Multivariate Filter for Estimating Potential Output, IMF Working Paper WP/15/79

    • Search Google Scholar
    • Export Citation
  • Berg, A., Karam, P. D., and Laxton D., 2006, “A Practical Model-Based Approach to Monetary Policy Analysis – Overview,” IMF Working Papers 06/80, International Monetary Fund.

    • Search Google Scholar
    • Export Citation
  • Carabenciov, I., Freedman, C., Garcia-Saltos, R., Laxton, D., Kamenik, O., and Manchev, P., 2013, “GPM6 – The Global Projection Model with 6 Regions”, IMF Working Paper WP/13/87.

    • Search Google Scholar
    • Export Citation
  • International Monetary Fund, 2018, Portugal – Article IV Consultation

  • Jakab, Z., Lukyantsau, P., and Wang, S., 2015, “A Global Projection Model for Euro Area Large Economies”, IMF Working Paper WP/15/50.

  • Kangur, A., Kirabaeva, K., Natal, J-M., and Voigts, S., 2019, “How Informative Are Real Time Output Gap Estimates in Europe?”, IMF Working Paper

    • Search Google Scholar
    • Export Citation
  • Krippner, L., 2015, “Zero Lower Bound Term Structure Modeling: A Practitioner’s Guide”, Palgrave-Macmillan

  • Maria, J. R., 2016, “Output and Unemployment, Portugal, 2008–2012”, Banco de Portugal Working Paper

  • Mourre, G., Astarita, C., and Princen, S., 2014, “Adjusting the Budget Balance for the Business Cycle: the EU Methodology”, European Commission, Economic Papers 536.

    • Search Google Scholar
    • Export Citation
  • Pedro Braga, J., Pereira, I., and Balcão Reis, T., 2014, “Composite Indicator of Financial Stress for Portugal,” Economic Bulletin and Financial Stability Report Articles and Banco de Portugal Economic Studies, Banco de Portugal.

    • Search Google Scholar
    • Export Citation
  • Serra, S., 2018, “Is the Phillips Curve Dead? Results for Portugal”, Banco de Portugal, Journal of Economic Studies.


I would like to thank Alfredo Cuevas, Claudia Duante and José R. Maria for their very helpful comments on this paper. A special thank you also to Kadir Tanyeri for his help with the model coding.


Nominal interest rate minus one-period ahead inflation expectations


Quarterly data on government revenue, expenditure and interest is seasonally adjusted and then cyclically adjusted using elasticities from Mourre et al (2014). ‘One-off expenditures and revenues are taken from various European Commission country reports.


In reality, the output gap is unobservable, so here ‘error’ means the difference with the current WEO estimate.

A Three-Country Macroeconomic Model for Portugal
Author: Alex Pienkowski