Peru: Selected Issues Paper


Peru: Selected Issues Paper

Forecasting Peruvian Growth Using A DSGE Model1

A dynamic stochastic general equilibrium (DSGE) model was constructed based on the characteristics of the Peruvian economy. The model goes beyond the standard open economy construct by including a separate export sector and adding a channel for export demand to impact fixed investment, particularly in the mining sector. The model is then used to examine shocks that have impacted output and to forecast growth. The results suggest that shocks to total factor productivity in the export sector (TFP) and overall confidence were main drivers of real GDP fluctuations. Moreover, the forecasts are in line with other standard empirical models used by staff, offering additional support to the Fund’s baseline forecast. A key takeaway is that potential growth has declined with lower commodity prices and efforts to raise TFP should focus on increasing investment.

A. Introduction

1. Forecasting growth rates of emerging market commodity exporters like Peru can be a challenging exercise. These economies are heavily exposed to large external shocks and tend to have high and volatile growth rates related in part to volatile capital inflows. In addition, many have gone through substantial structural reforms and other economic improvements that have attracted sizeable amounts of foreign direct investment (FDI)—much of it in their commodity producing export sector. In addition, a large part of this investment is in infrastructure and capital goods, and is closely aligned with movements in commodity prices. Peru is precisely such an economy. Unfortunately, these factors can make it difficult to construct a well designed theoretical model that fully captures the main trade, investment, and output channels.

2. Various techniques have been used by staff to forecast Peru’s growth (see Box). They include (i) financial programming (staff’s baseline scenario),2 (ii) empirical forecasting methods, and (iii) theoretical model-based forecasting. In this paper, a theoretical DSGE model was applied to forecast growth and analyze the importance of the various shocks that drive real GDP movements in Peru. DSGE models use modern macroeconomic theory to explain and predict co-movements of aggregate time series over the business cycle and to perform policy analysis. The DSGE model complements existing methods by including all components of real GDP jointly and considering endogenous movements between variables. The model also takes into account the macroeconomic policy stance, such as changes in monetary policy rates and in public spending.

3. This chapter is organized as follows. Section B examines traditional growth channels for Peru. Section C describes the structure of the economy and theoretical framework. Section D describes and discusses briefly the results of the model for year 2015. The final section concludes. The Appendix presents a detailed description of the model.

Benchmarking Growth Forecasts

A variety of modeling devices are used to cross check baseline forecasts. A few are mentioned below:

The Global Projection Model (GPM) project has developed a series of multi-country models designed to generate coherent global forecasts and conduct policy analysis in a comprehensive manner. The underlying model-building strategy seeks to strike a balance between two popular approaches to macro modeling: highly structured DSGE models whose primary focus is theoretical consistency (often at the cost of empirical accuracy), and purely statistical models, whose primary focus is accuracy (often at the cost of theoretical consistency). The GPM modeling strategy features a core macro structure consisting of a few behavioral equations, based on conventional linkages familiar to most macro modelers and policy makers. This ensures some theoretical consistency and desirable model properties. The estimation/calibration methodology for the GPM’s parameters is implemented in a manner that ensures the simulation properties are sensible and broadly consistent with modelers’ priors and the data. This facilitates interpretation of forecasts and policy-analysis exercises.

STFS is the Short-Term Forecasting System, which is a suite of models focused on the first two monitoring quarters. The “headline” number is the inverse-MSE weighted sum of all STFS model estimates. The STFS growth number controls for the impact of model change. Thus, this number reflects the pure impact of new data on the monitoring.

Nowcasting produces forecasts that make use of high frequency indictors such as country level industrial production and PMIs. This improves the quality of the forecast by linking it directly to the latest economic indicators, and by making it consistent with country-level developments.

A Vector Error Correction Model (VECM) estimated staff forecasts growth conditioned only on external variables: a Peru-specific real commodity price index, an export-weighted GDP of main trading partners, and the U.S. real 10-year Treasury bond rate.

B. Growth Channels3

4. Growth in Peru is strongly affected by external factors. One of the main channels by which Peruvian activity is impacted is through trade given that the Peruvian economy is highly open, with exports ranging between 40-45 percent of GDP. The lion’s share of these exports is in metals, with machinery imports linked to their extraction. A second channel has been through marked increases in gross domestic income. Large and persistent positive terms of trade shocks have increased income and led to an increase in consumption. Another key growth channel has been investment, especially in the mining sector, which responds strongly to changes in external market conditions. Moreover, there are spillovers from mining investment to total investment.


Peru: Private Investment and Exports

(In percent, 12-months quarterly rolling growth rate)

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Sources: National authorities and Fund staff calculations.
Figure 1.
Figure 1.

Peru: Structure of Exports and Imports

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Source: The observatory of economic complexity.

5. Changes in import demand of large trading partners play a crucial role. Movements in the pace of growth in the Chinese economy have had an impact on growth in Peru and in the region. The figure shows the response of export prices and GDP of a large set of Latin American countries, including Peru, to changes in China’s GDP.4 With respect to the growth forecasts of two largest importers from Peru, the U.S. and China, while a solid recovery is expected to continue in the United States, growth forecasts for China point to a deceleration in the years ahead. This should create a more challenging environment for the Peruvian economy going forward. Finally, two other important growth drivers, supply and confidence shocks had a significant impact on growth in Peru in the past (see below).


Latin America: Impact from China 1/

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Source: Gruss, 2014.1/ Response of net commodity price indexes (NCPI) and GDP of Latin American countries to a 1 percent decrease in China’s GDP (relative to trend).

Real GDP growth for China and U.S.

(In percent)

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Source: World Economic Outlook.

C. The Model and Empirical Framework

6. The main objective of the DSGE theoretical modeling exercise was to capture and understand specific characteristics of the Peruvian economy (Appendix). The model features a separate commodity-exporting sector so that export prices may differ from domestic prices beyond mark-up shocks. The export sector produces its output with infrastructure, machines and equipment to capture the feedback effect from export demand and export prices to domestic investment. Machines and equipment are partly sourced from Peruvian producers, and partly imported from abroad, reflecting the dominance of imported capital goods versus domestically-produced capital goods.5 The incorporation of these characteristics is one of the main contributions of this chapter.

7. The DSGE model is relatively small utilizing only seven macroeconomic variables. Quarterly data from 1996Q1 to 2014Q4 are taken from the central bank database and are used to estimate the model. These variables include real GDP, real private consumption, and real total fixed investment, real exports, real imports, export prices, and import prices. The model also matches real government consumption, implicitly through the economy wide resource constraint.

8. The model included eight different shocks that allowed replicating the Peruvian data. The included shocks are shocks to the long-run TFP-growth rate, government consumption, confidence/uncertainty6, monetary policy, export and domestic sectors’ TFP, as well as export and import prices. Consequently, the shocks capture a variety of domestic and external influences that are important for the Peruvian economy.7

9. The model fit was optimized by estimating the shock variances with Bayesian estimation techniques. The performance of general equilibrium models is highly dependent on parameter values, in particular the magnitude of the various shocks. The variances of the eight shocks determine the shock magnitudes and are critical for the model’s fit. Bayesian estimation techniques were used to “let the data speak” in determining parameter estimates (the “posteriors”) that optimally fit the data, based on some initial values (the “priors”). As a starting point, standard advanced economy values were used as priors for the shock variances. Then, the Peruvian data set was applied to the model, and allowed to pin down posteriors for the shock variances that optimally fit the Peruvian data.8 The determined posteriors where then used for the real GDP variance decomposition and the forecasting exercise, which are the main outputs of the paper.

D. Results

10. The model is able to identify the main determinants to real GDP movements in Peru over the last 20 years. Seventy one percent of the variance in real GDP is explained by changes in total factor productivity (40 percent) and by changes in confidence (31 percent).9 The remaining 29 percent is explained by monetary policy, government consumption, export price, import price, and long-run growth shocks together.

RGDP Variance Decomposition

(In percent)

article image
Source: Fund staff calculations.
  • Variance in TFP: Thirty eight percent of the variance in GDP is explained by supply shocks in the exporting industry. Only 2 percent of GDP movements are explained by shocks to firms that produce domestically consumed consumption and capital goods. An examination of the supply side shows that export production has not been growing in line with export demand; neither did export growth catch up with growth in export prices. At the same time, investment has been growing in line with export prices, especially in mining. This suggests there is untapped growth potential once supply shocks unwind and export production reaches its potential. In 2014, there was a one–off shock to production due to maintenance work at the largest mine and start-up operating difficulties at a new mine, which are expected to dissipate in the short term. The large capital investment that took place over the past decade is expected to pay off over the medium term (which is accounted for in staff’s medium-term baseline scenario).

  • Confidence shocks: Confidence shocks explain almost one third of GDP variation alone. While confidence is a significant driver in general, it has also played an important role more recently. Business confidence in Peru was weak due to several factors in 2014. The election of new local governments and legal proceedings against some local officials led to contracting uncertainty among businesses that were involved in local public projects. Simultaneously, the elections led to turnover of some local civil servants and local temporary hiring freezes until the new local governments take office and start executing public spending. Moreover, lower job creation rates reduced private consumption spending, weighing further on confidence. The presidential elections in 2016 bring some uncertainly to the outlook and some businesses are in a wait and see mode.


Peru: Market Sentiment

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Sources: National Authorities and Fund staff calculations.

11. For 2015, the DSGE model predicts GDP growth close to the staff baseline. Financial programming forecasts by staff, which factors in policy stimulus, places GDP growth at 3.8 percent. Taking changes in the external environment as well as domestic supply and confidence shocks into account, the DSGE model predicts GDP growth slightly lower, at 3.7 percent in 2015, and somewhat above the recent GPM and STSF estimates. “Nowcasting,” which does not capture planned fiscal stimulus, places growth closer to 3 percent. Accounting solely for exogenous external factors, the VECM forecast is 2.6 percent.

Peru: Growth Forecasts

article image
Source: IMF staff calculations.

IMF Research department.

12. The projected path of the other macro variables included in the model also follow baseline forecasts. Figure 2 shows quarter on quarter percentage growth rates of seven selected variables: real GDP, total fixed investment, private consumption, exports, imports, export price inflation, and import price inflation. Results for exports and export price inflation demonstrate that recent declines in exports prices are likely to trigger a slow-down in exports at the beginning of 2015, which in turn negatively affects output. As exports recover and negative supply shocks phase out, the economy is expected to recover throughout the second to the fourth quarter of 2015. Over the medium-term, the DSGE model also suggests a moderation of potential growth, in line with expected lower export prices and investment in the staff’s baseline scenario.

Figure 2.
Figure 2.

Peru: Forecasts 1/

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Source: Fund staff calculations.1/ Forecasts for 21 quarters; the zero point refers to 2014Q4.

E. Conclusions

13. The preliminary results from the estimated DSGE model of the Peruvian economy were in line with staff’s benchmark models. The model provided interesting insights into the main growth drivers and its forecasts fit well with staff’s projections from other methodologies. The forecasted trajectory of key variables also followed plausible paths. Most importantly, the model served to motivate discussions on the interactions between export production and demand, commodity prices, and fixed investment.

14. Policy advice from the exercise centers on raising total factor productivity through accelerating investment, reducing red tape, and improving infrastructure. The model clearly indicates that lower commodity prices and a less favorable external environment will have a negative impact on growth. Thus efforts should be redoubled to implement planned infrastructure projects, structural reforms, and a variety of measures announced in 2014 to accelerate investment by reducing bureaucratic procedures. These efforts should boost productivity and growth, as well as the economy’s long-term potential output.

15. Focus should also be on working with local governments to restore local public investment spending and strengthening overall confidence through social inclusion. The “Public Works in Lieu of Taxes” projects, where a private entity constructs a public project in a local region in lieu of paying taxes, offers a pragmatic solution to local infrastructure gaps, but needs to be monitored closely and follow appropriate safeguards. The initiatives to promote social inclusion, poverty reduction, and financial deepening should also continue help reduce inequality and contribute to social stability.

Appendix. Dynamic Stochastic General Equilibrium Model1

Model Setup

1. The DSGE model of the Peruvian economy is based on the structure of exports and imports. A large part of Peru’s exports are commodities, such as copper ore, gold and refined copper (Figure 1). Accordingly, there are two sectors in the model, an exporting sector and a domestic sector, which produces domestic consumption and capital goods. In the following equation, the subscript “X” refers to the exporting sector, the subscript “D” refers to the domestic good producing sector. The production functions of both sectors are of the standard Cobb Douglas forms, where et denotes exports and yD,t denotes output of domestically produced consumption and capital goods:


Exporting and domestic firms hire workers (lX,t and lD,t) and rent capital (kX,t and kD,t) for production, until marginal costs of labor (wages wX,t and wD,t) and capital (capital rental rates rX,t and rD,t) reach marginal products. The shocks zX,t and zD,t denote temporary TFP shocks, while Zt captures stochastic long-run growth. The steady state value of zX,t in comparison to zD,t is calibrated such that the export share in total GDP fits the Peruvian data.

2. Around eighty percent of invested capital goods are imported in Peru. As can been seen from the complexity map, a large part of these imports are machines and transportation vehicles (Figure 1), of which a significant part is devoted to commodity extraction. Accordingly, in the model, investment in both sectors is a composite of domestically produced capital goods and imported capital goods:


The parameter ηi denotes the elasticity of substitution between domestically produced and imported investment goods, and the parameters vd and vm denote the relative bias between goods. Investment also comprises infrastructure investment. Taking capital goods and infrastructure together, we set vd = 0.65 and vm = 0.35 to match the Peruvian characteristics. Investment and capital are related through standard capital accumulation equations, where the function S(.) introduces capital adjustment costs that smooth the response of investment and capital.


3. There is a representative household that maximizes lifetime utility:


In the utility function, ct denotes the household’s level of consumption, Lt total labor, and zβ,t a shock to the discount factor, such that γt+1=zβ,t+1zβ,t resembles a risk shock. In Peru, the majority of consumption goods are produced in Peru, with the rest being imported. To capture this fact, consumption is a composite of domestically produced and imported consumption goods:


The parameter ηc denotes the elasticity of substitution between domestically produced and imported consumption goods, and the parameters vcd and vcm denote the relative bias between goods. To match the Peruvian characteristics, we set vcd = 0.7 and vcm = 0.3. With respect to labor, the members of the household work either in the commodity exporting sector or in the domestic sector. Accordingly, total labor, is a composite of labor in both sectors:


The household maximizes utility, subject to a budget constraint; expenses cannot exceed the household’s income. Expenses are equal to:


In addition to consuming and investing, the household can also invest in domestic bonds bt and foreign bonds bt*, where ∈t denotes the nominal exchange rate. Its income comprises returns on invested capital, labor, bonds holdings and firms’ profits. The foreign interest rate also depends positively on foreign bonds holdings. The household’s income is equal to:


4. In addition to exporters, domestics firms, and households, there is a continuum of intermediate goods producers, who purchase goods from the domestic firms, and sell them to a final good producer2, conscious of its demand function. As a result of the maximization problem of intermediate goods producers, inflation πt=ptpt1 results as a mark-up over marginal costs pD,t, an equation commonly referred to as the New Keynesian Phillips Curve: πt = (1 + X(.)) pD,t.

5. Government spending is assumed to be exogenous, and follows a stochastic autoregressive progress. The government finances government spending through lump-sum taxation. The monetary authority sets interest rates according to a Taylor rule.

6. Demand for the final good is equal to production of the final good producer:


The final good producer makes zero profits:


The production function of the final good producer follows Dixit and Stiglitz (1997), where ∈ is the elasticity of substitution between intermediate goods.


Net exports are equal to:


Finally, GDP is equal to:


This gives us the standard accounting identity:


Time Series and Forecasting

7. The model is estimated with Bayesian estimation techniques as in Ann and Schorfheide (2007). The estimation is based on seven data series, as shown in Figure 1. The observation equations, which link the stationary model to the data are:

Figure 1.
Figure 1.

Peru: Time Series for Bayesian Estimation (1996Q1–2014Q4)

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Source: National Authorities.

The forecasts of the model are obtained by iterating forward on the state-space system, which is obtained as a solution of the first-order condition of the agents’ maximization.

Long-run growth is stochastic, and follows the following process:


The quarterly growth Λz is set to 1.01, matching the quarterly average growth of GDP during the sample period (1996Q1–2014Q4).

Estimation Results

8. Figure 2 shows the prior and the posterior distributions for the shock variances of the eight shocks.3 The divergence between the prior and posterior distributions is not surprising, given that priors were based on low values common for the US economy. Encouragingly, the data appears to be very informative in pinning down distinct posterior distributions that optimally fit the data.

Figure 2.
Figure 2.

Peru: Prior and Posterior Distributions of Bayesian Estimation

Citation: IMF Staff Country Reports 2015, 134; 10.5089/9781513560410.002.A002

Source: Fund staff estimates.


  • An, Sungbae, and Frank Schorfheide, 2007, “Bayesian Analysis of DSGE Models,” Econometric Reviews, Taylor and Francis Journals, Vol. 26, No. 2–4, pp. 11372.

    • Search Google Scholar
    • Export Citation
  • Dib, Ali, 2008, “Welfare Effects of Commodity Price and Exchange Rate Volatilities in a Multi-Sector Small Open Economy Model,” Bank of Canada Working Paper, No. 2008–8.

    • Search Google Scholar
    • Export Citation
  • Gruss, Bertrand, 2014, “After the Boom—Commodity Prices and Economic Growth in Latin American and the Caribbean,” IMF Working Paper 14/154 (Washington: International Monetary Fund).

    • Search Google Scholar
    • Export Citation
  • Han, Fei and Juan Alonso Peschiera-Salmon, 2014, “China’s Spillovers to Peru: Insights from a Macroeconomic Model for a Small Open and Partially Dollarized Economy,” in Peru—Selected Issues, IMF Country Report No. 14/22 (Washington: International Monetary Fund).

    • Search Google Scholar
    • Export Citation
  • Ross, Kevin, and Juan Alonso Peschiera-Salmon, 2015, “Explaining the Peruvian Growth Miracle,” IMF publication, forthcoming.

  • Vukotic, Marija, 2007, “Exchange Rate Dynamics in an Estimated Small Open Economy DSGE Model,” Working Paper, unpublished.


Prepared by F. Lipinsky and S. Vtyurina.


This is arguably the most common technique used by Fund teams and central banks to forecast GDP growth.


Peru sold 17 percent of its total exports to China in 2012 (about 4 percent of GDP), of which 81 percent are metals (Han and Peschiera-Salmon, 2014).


Around 80 percent of Peru’s capital goods are imported and a large part of imports are machines and transportation vehicles used in the mining industry.


The confidence shock is conducted by perturbing the discount factor within the household utility function.


An interesting extension of the model would be to include financial frictions and additional shocks in the model.


Another interesting extension would be to compare in greater detail the model’s forecasts with empirical forecasts of vector autoregression models.


The variance of the different macro economic variables is attributed to the various exogenous shocks that govern the dynamics of the model. Estimation results in general are very sensitive to changes in parameters and assumptions, but provide a good approximation of the neighborhood, in which the true values reside. The percentages of the GDP variance decomposition can be viewed as mean estimates.


For a detailed derivation see Vukotic (2007) and Dib (2008). Vukotic (2007) explains in detail the derivation of a New Keynesian Small Open Economy model. Dib (2008) adds an exporting commodity sector but doesn’t estimate the model. The incorporation of financial frictions in the model may further improve the forecasting results and is left for future work. However, financial shocks are absorbed in the model by the seven existing shocks. Finally, there is a large body of literature, which compares the forecasting accuracy of DSGE models versus empirical models. This paper offers a theoretical model; it would be interesting to perform a horse race between the two types of models and to compare for example the root mean squared errors (RMSEs).


Output of the final good producer is denoted with yF,t.


The acceptance rate of the Metropolis Hastings algorithm is 0.21, which is close to the “optimal” rate of 0.234 that is cited in the literature.

Peru: Selected Issues
Author: International Monetary Fund. Western Hemisphere Dept.