1 Introduction

In poor countries, many studies have shown that poverty reduction is linked to the type of sectoral economic growth in the economy. In particular, when we focus on the agricultural sector, Thirtle et al. (2003) estimate that a 1% increase in crop productivity reduces the number of poor people by 0.72% in Africa and by 0.48% in Asia. In addition, studies that compare growth–poverty elasticities across sectors typically find much higher elasticities for agriculture than for non-agriculture (Christiaensen and Demery 2007). Although Sub-Saharan Africa (SSA) has experienced rapid economic growth since the mid-1990s, this region suffers still from an undernourishment problem in some countries (FAO 2015; GPAFSN 2016). This has been attributed, among other things, to low productivity of agricultural resources. In SSA the agricultural production structure is characterized by multitude of small-scale producers (family farming) with low yields, compared to similar agro-zones and best farmer practices (Jirström et al. 2011). As attempts to improve this situation, we can mention some interesting initiatives or real-life cases. In some of those cases, the adopted approach was to forge several ways of collaboration and coordination between private sector agents (donors, foundations, NGOs) and governments for boosting and bearing emerging relationships between agri-business investors and smallholder farmers. In the reports about Africa Agriculture Status, issues 5 and 6, by Alliance for a Green Revolution in Sub-Saharan Africa (AGRA 20172018), one can find some of those real-life-examples, on-the-ground cases. For example, two recent programs of this nature have been the Project Nurture (for Kenya and Uganda) and the SAGCOT (Southern Agricultural Growth Corridor of Tanzania) Soya Value Chain Partnership. There are also some other initiatives that deserve to be mentioned such as the GGC (Ghana Grains Council) that, through the design of a warehouse “Goods Receipt Note” (GRN), encouraged the participation of smallholder grain farmers in the warehouse receipt system (WRS), which is important both for increasing the tradability of agricultural output and for being used as collateral to access credit. On the other hand, in order to increase the productivity of smallholder farmers, some attempts have been made by organizations such as the interventions by the One Acre Fund (OAF) to provide credit directly as part of a comprehensive support including inputs, technical assistance and markets access (in Rwanda), and the World Food Programme (WFP) through which the farmers would benefit from reliable marketing opportunities and access to high quality inputs and extension services (Rwanda, Tanzania and Zambia). Finally, Adu-Baffour et al. (2019) analyze an initiative of the agricultural machinery manufacturer John Deere (with its dealership AFGRI, linked up with two NGOs, MUSIKA and CFU) for promoting smallholder mechanization in Zambia. The results of this initiative indicate, among other things, that farmers increase income, purchase more farm inputs, in particular, fertilizer, and the demand for hired labor increases.

A recent paper by Watts and Scales (2020) shows how financial investments made for generating both financial return and social benefit (social impact investment (SII)) influences recent developments in Sub-Saharan Africa agriculture. Although it seems to there be evidence that SII in the agricultural sector in SSA has grown rapidly over the last decade, it is necessary nevertheless further quantitative research yet to ascertain the amount of money of the flows, where they are coming from, and where they are being invested.

In the field of public policy, according to some data, Sub-Saharan African governments have more than doubled their budgets for agriculture between 2010 and 2014 (the Regional Strategic Analysis and Knowledge Support System (ReSAKSS 2017). The problem is that many countries spent a considerable share of their agricultural budget on subsidies, rather than on investments in agricultural research and development and other public goods, which may yield higher returns.

In this sense, Pardey et al. (2016) summarize and reassess published studies on the issue of agricultural R&D in SSA. Based on a large sample of studies published between 1975 and 2014 spanning 25 countries, the reported estimated returns (internal rates of return) to food and agricultural research for sub-Saharan Africa averaged 42.3% per year. However, the wide dispersion of the reported returns makes it difficult to discern meaningful patterns in the evidence. In this context, the median is a more informative measure of central tendency than the mean. Hurley et al. (2016) reported a worldwide median return to research of 35% per year compared with 38% per year for the concordant rest-of-world.

Hence, it seems clear that agriculture emerges as strategic sector on SSA’s development agenda. In this paper we tackle this issue through a macroeconomic approach where we study the impact of productivity increases both in the agricultural sector and in other non-agricultural sectors on overall welfare. We use a dynamic stochastic general equilibrium (DSGE) model in which we incorporate structural characteristics in the economy of SSA. For our aim, the main advantage of the DSGE modelling is that its dynamic utility-theoretic approach allows us a rigorous evaluation of the overall welfare effects coming from productivity shocks in both the agricultural and non-agricultural sectors.

The background of DSGE modelling in an open economy is mainly the work by Obstfeld and Rogoff (1995), which provides a solid microeconomic foundation in an intertemporal framework for macroeconomic variables in an open economy (the “New Open Economy Macroeconomy”). Later, among authors who developed the DSGE models, we can mention, for instance, Smets and Wouters (2003).

Our model allows us to study the economic dynamics brought about by sectoral productivity shocks under a broadly scaled smallholder farmers with (imported) modern agricultural inputs (such as fertilizer and variety seeds, machinery, etc.). We highlight that real exchange rate dynamics and overall welfare effects are sensitive to the sectoral location of productivity shocks. Our main finding is that each increase in productivity in the agricultural sector (with the structural characteristics of the SSA), compared to similar increases in other sectors, contributes to a greater extent to the increase in the overall welfare.

This has implications for a number of economic policies. In particular, when we consider the case in which investment resources are scarce and can only be allocated to a limited number of projects in the sectors of the economy. According to the welfare analysis of our model, in SSA countries, greater weight should be given to investments that increase productivity in the agricultural sector. These countries could focus on improving agricultural productivity to increase overall economic growth and welfare.

The structure of the paper is as follows: in Sect. 2, we set out the theoretical model that underpins subsequent analysis. In Sect. 3, we use the model to analyze the impact of changes in sectoral productivities on the dynamics of key macroeconomic variables (including consumption and output), and, ultimately, on overall welfare. The last section, Sect. 4, summarizes the main finding and conclusion.

2 The model

2.1 Description of the model

The dynamic (stochastic) general equilibrium (DSGE) model presented in this paper is that of a small open economy whose key characteristics are aligned with the SSA region.

Firstly, we adopt a two-sector approach distinguishing between tradable agricultural sector and non-traded sector (all other sectors) because of manufacturing plays a minor role for most African countries.

According to recent literature, the pattern of economic growth in SSA is characterized by “urbanization without industrialization”, where many countries seem to be transitioning directly from agriculture to nontradable services with little or no industrialization (Busse et al. 2019; Rodrik 2016; Gollin et al. 2016). This growth-promoting structural change has been significant in the recent experience of low-income countries such as Ethiopia, Malawi, Senegal, and Tanzania (AGRA 2018). Labor has been moving from agricultural activities to other activities, but the latter are mostly services rather than manufacturing.

Hence, beside a traded agricultural goods sector, in the model we assume other sector of non-traded goods, composed mainly by services (rural and urban services) and other goods (non-traded agricultural goods such as staple foods).

In economic modeling, a category of non-traded agricultural goods has already been used extensively in the literature for the case of SSA (e.g. Thurlow and van Seventer 2002; Pauw and Thurlow 2011; Dorosh and Thurlow 2012). More recently, McArthur and Sachs (2019), also in the context of SSA, assume staple goods as non-traded goods due to the reality of subsistence food economies with low private and public capital stocks. Thus, domestic transport costs and minimum subsistence consumption requirements, among other things, justify assuming some agricultural goods in SSA as non-tradable. We take into account here that, according to several reports, for instance AGRA (2018), more than 60 percent of the population of Sub-Saharan Africa is smallholder farmers, and about 23 percent in Sub-Saharan Africa’s GDP comes from agriculture. However, SSA’s small farms are diverse and face varying livelihood prospects depending on their circumstances as well as their country context. A variety of farm typologies have already been shown in some literature. For instance, Hazell and Rahman (2014) and Hazell et al. (2017) proposed the following classification: commercial smallholder farms (defined as selling 50% or more of their production), small farms in transition (defined as selling 5–50% of their production), and subsistence-oriented small farms (defined as selling less than 5%). Although there is little empirical research about how important are currently in Sub-Saharan Africa each of these small farm groups, in this and other typologies, Hazell et al. (2017) show that for countries such as Ghana, Ethiopia and Tanzania, subsistence farmers are a relatively small group (less than 10 percent in Tanzania and Ghana, and 17 percent in Ethiopia). Interestingly, between 30 and 40 percent of small farms (even smaller than 4 ha.) in Ghana and Tanzania can be classified as commercial.

Some significant quantity in SSA agricultural output turns out therefore to be non-tradable. Farmers do have here neither incentives nor knowledge to use improved inputs, fertilizers, etc. that allow them to focus on growing higher-value, nonfood crops versus crops for their own subsistence.

In sum, in the model we consider an economy with two sectors: tradable agricultural sector, and a nontraded sector with services and staple foods.

Secondly, we consider SSA as a small open economy in the worldwide economy. So the foreign prices are assumed to be given, and we normalize them to one. Since we define the nominal exchange rate, St, as the price of one unit of the foreign currency (US dollar) expressed in units of domestic currency, and by holding the law of one price for tradable agricultural goods, the real exchange rate, qt, is the ratio of S (or the domestic price of the traded agricultural goods PT) and the domestic price index P is qt = PTt /Pt.

In this framework, in the model we incorporate the feature, empirically confirmed in Gopinath et al. (2020), that the vast majority of trade (both in imports and exports) is invoiced in a dominant currency (US dollar). This implies high exchange rate pass-through into home currency prices and insensitivity of the terms-of-trade to exchange rate fluctuations.

Thirdly, in any model, one must somehow handle the problem of market structure. In this case, as regards the market competitiveness in the traded agricultural goods sector, there is a paucity of empirical evidence on this issue notwithstanding (which hinders the ability to draw strong conclusions), the evidence that does exist is broadly supportive of the notion that crop markets are competitive (Dillon and Dambro 2017). So we will consider in the model that the tradable agricultural sector is competitive and produces, instead of a single type of homogeneous product (which is empirically unsatisfactory), traded differentiated agricultural products (different crops). In addition, we assume that, as small countries, producers are price takers in world markets.

On the other hand, we also assume that the non-traded sector, monopolistic competitive, provides a large variety of non-traded differentiated goods; the another sector’s defining characteristic is that it is the “residual”, imperfectly competitive sector that is the counterpart to the action taking place in the perfectly competitive, traded agricultural goods sector. We imagine that there are a very large number of potential non-traded goods (services, nontraded agricultural goods), so many that the product space can be represented as continuous, enabling us to sidestep integer constraints on the number of goods. So households and producers extend on the interval [0,1]. The recognition of the household’s joint role as a producer and consumer is not important when modeling the impacts of productivity shocks on production, assuming that the markets for output and household labor function seamlessly. Under these circumstances, production and consumption decisions are in effect separable.

Fourthly, in order to get a transition for competing successfully in markets and modern value chains, all those small farms in the traded agricultural goods sector need improved technologies, NRM (natural resource management) practices, knowledge, and modern inputs (like seeds, fertilizers and machinery). Contrary to the common perception of stagnant African small farms, external input use has grown rapidly over last few years (Haggblade et al. 2017; Liverpool-Tasie et al. 2017; Minten et al. 2017; Sheahan and Barrett 2017). This particularly has been the case for fertilizers and herbicides. Fertilizers have more frequently been promoted by public subsidies, while herbicides use has been largely driven by private sector (Jayne and Rashid 2013; Haggblade et al. 2017; Sheahan and Barrett 2017). Specifically, regarding the data, fertilizers and herbicides/insecticides accounted for 2.6 percent of imported manufactured goods (UNCTADstat 2018). In addition, it is interesting to note that agricultural machinery accounted for almost 1 percent of imported manufactured goods, with an increase in the period 2000–2018 of 508.7 percent.

In coherence with this point, in our model we will introduce an agricultural production function with this kind of (imported) inputs. One immediate consequence of this view of the nature of the agricultural production function is that macroeconomic conditions (such as productivity shocks) that affect exchange rates can exert some influence on agricultural costs and profitability and could generate welfare effects.

Fifthly, it is a stylized fact that SSA imports are largely composed of manufactured goods. In fact, according to recent data (UNCTADstat 2018), manufactured goods accounted for above 66 percent of total imports. Between the top 15 import products, for instance, we find motor vehicles for the transport of persons, medicaments (incl. veterinary medicaments), and clothing and footwear, accounting for 5.2, 4, and 2.1 percent, respectively, of imported manufactured goods.

And sixth, labor is capable of moving between the two sectors in response to changing economic incentives (relative real incomes). In particular, the special important point here is the ability for labor to shift easily between non-tradable (staple foods) and tradable (cash crop) sectors while remaining on farm.

2.2 Producer behavior

In the traded agricultural sector, producers (commercial smallholder farms and small farms in transition), with the implicit fixed factor land, use home labor, \({L}_{TA}\), and imported inputs (fertilizers, new varieties of seeds, etc.), \(I\), to produce each variety v of traded agricultural output, YTA, through CES production functions:

$${Y}_{TA}(v)={\alpha }_{TA}{\left[\delta {L}_{TA}{(v)}^{\frac{\sigma -1}{\sigma }}+(1-\delta )I{(v)}^{\frac{\sigma -1}{\sigma }}\right]}^{\frac{\beta \sigma }{\sigma -1}}$$
(1)

where \({\alpha }_{TA}\) is a scale parameter, summarizing total factor productivity (TFP) in this sectorFootnote 1; \(\delta\) and \(1-\delta\) are, respectively, the share of home labor and imported inputs, with elasticity of substitution between them given by \(\sigma\) (> 0), and \(\beta\) (< 1) being the corresponding parameter of returns to scale.Footnote 2

In (1), since we assume that labor is only supplied by domestic households (we hence rule out international migrations of workers in the model), \({L}_{TA}\) is given by

$${L}_{TA}(v)=\int _{0}^{1}{L}_{TA}(i,v)di={L}_{TA}(i,v)={L}_{TA}(i)$$
(2)

where i, \(i\in \left[\mathrm{0,1}\right]\), is the domestic household i.

Hence, the cost function for each producer in the traded agricultural sector is given by

$$TC=W{L}_{TA}(v)+{P}_{I}I(v)$$
(3)

where \({P}_{I}\) is the home price of imported inputs whose prices are set in world markets, and W is the nominal wage which is the same for both sectors because we assume perfect mobility of labor between them.

Producers (mainly smallholder farms) are price-takers. They take world market prices for agricultural products and choose the output (and implied allocations of labor and imported inputs) that maximize profits and hence income.

The first-order condition for the optimization problem, which is derived by minimization of (3) subject to (1), yields:

$$\frac{W}{{P}_{I}}=\frac{\delta {L}_{TA}{}^{-\frac{1}{\sigma }}}{\left(1-\delta \right){I}^{-\frac{1}{\sigma }}}$$
(4)
$${Y}_{TA}={\alpha }_{TA}^{1/(1-\beta )}{(\beta {P}_{TA})}^{\beta /(1-\beta )}{\left[{\delta }^{\sigma }{W}^{1-\sigma }+{(1-\delta )}^{\sigma }{P}_{I}^{1-\sigma }\right]}^{\beta /(1-\beta )(\sigma -1)}$$
(5)

In the non-tradable sector, domestic labor,\({L}_{N}\), is the only production factor to produce every z variety of product:

$${Y}_{N}(z)={\alpha }_{N}{L}_{N}(z)$$
(6)

where \({\alpha }_{N}\) is a sector-specific labor productivity innovation that is common to all sector producers, and

$${L}_{N}(z)=\int _{0}^{1}{L}_{N}(i,z)di={L}_{N}(i,z)=\int _{0}^{1}{L}_{N}(i,z)dz={L}_{N}(i)$$
(7)

The representative producer faces the demand function of product z given by

$${y}_{N}^{d}(z)={\left[\frac{{P}_{N}(z)}{{P}_{N}}\right]}^{-\theta }{C}_{N}$$
(8)

where \({C}_{N}\) and \({P}_{N}\) are, respectively, consumption and prices indices given by

$${C}_{N}={\left[\int _{0}^{1}{C}_{N}{(i,z)}^{\frac{\theta -1}{\theta }}dz\right]}^{\frac{\theta }{\theta -1}}$$
(9)
$${P}_{N}={\left[\int _{0}^{1}{P}_{N}{(z)}^{1-\theta }dz\right]}^{\frac{1}{1-\theta }}$$
(10)

with \(\theta , \theta >1\), being the price elasticity of demand faced by each producer.

Hence, the profit function is

$${\pi }_{N}(z)={P}_{N}(z){Y}_{N}(z)-W{L}_{N}(z)$$
(11)

By maximizing (11) subject to (6) and (8), we obtain the prices set by producers:

$${P}_{N}(z)=(\frac{\theta }{\theta -1})\frac{W}{{\alpha }_{N}}$$
(12)

In (12), the term \(\theta {(\theta -1)}^{-1}\) describes the producers’ monopolistic price mark-up over the unit production cost \((W/{\alpha }_{N})\). Note that productivity gains (higher \({\alpha }_{N}\)) means lower marginal costs so reduce product prices proportionally.

Therefore, a key element in the productive structure is the limited demand for non-agricultural goods (mainly services). Instead, traded agricultural goods face a flat demand curve: domestic producers can sell as much production as they wish without moving the price against them. By contrast, producers of services face a downward sloping demand curve, so added production moves the price against them for a given demand curve.

2.3 Consumer behavior

As was stated previously, the economy includes a continuum of households, consumers, indexed by \(i\in \left[\mathrm{0,1}\right]\), each of which supplies labor to producers. The utility of every consumer is a positive function of both Consumption (C) and real-money balances (M/P), and a negative function of labor effort (L). So the utility function can be written as

$${U}_{t}={E}_{t}\left\{\sum_{s=t}^{\infty }{\upsilon }^{s-t}\left[\mathrm{log}{C}_{s}+\chi \mathrm{lg}\left(\frac{{M}_{s}}{{P}_{s}}\right)-\frac{k}{\varepsilon +1}L{(i)}_{s}^{\varepsilon +1}\right]\right\}$$
(13)

where \(0<\upsilon <1\), \(\varepsilon \ge 0\), \(\chi >0\), \(k>0\). \(\upsilon\) is a preference parameter, which is known as the subjective discount or time-preference factor, and k is the marginal disutility of work with a degree of convexity of effort cost given by \(\varepsilon\). Et is the expectation operator.

In Eq. (13) Ct represents a composite index of the consumption of final traded and nontraded goods, CTt and CNt, respectively (the subscripts T, N, and t represent traded goods, non-tradable goods and time, respectively). We assume that consumption and price indexes, Ct and Pt, defined in a Cobb–Douglas structure, are given by the below Eqs. (14) and (15):

$${C}_{t}={C}_{Tt}^{\gamma }{C}_{Nt}^{1-\gamma }$$
(14)
$${P}_{t}=\frac{{P}_{Tt}^{\gamma }{P}_{Nt}^{1-\gamma }}{{\gamma }^{\gamma }{(1-\gamma )}^{1-\gamma }}$$
(15)

In (14), CTt is, in turn, a composite index of consumption of both traded agricultural goods, CTA, and imported manufactured final goods, CTM: \({C}_{Tt}={C}_{TAt}^{a}{C}_{TMt}^{1-a}\) with

$${C}_{TAt}={\left[\underset{0}{\overset{1}{\int }}{C}_{TA}{(i,v)}^{\frac{\phi -1}{\phi }}dv\right]}^{\frac{\phi }{\phi -1}}$$
(16)
$${C}_{TMt}={\left[\underset{0}{\overset{1}{\int }}{C}_{TM}{(i,v)}^{\frac{\phi -1}{\phi }}dv\right]}^{\frac{\phi }{\phi -1}}$$
(17)

where \({C}_{TA}(i,v)\) and \({C}_{TM}(i,v)\) denote the consumption of household i of each available variety v of traded agricultural goods and imported manufactured final goods, and \(\phi\) represents the intensity of the preference for variety. When \(\phi\) is close to 1, differentiated goods are nearly perfect substitutes for each other; as \(\phi\) decreases toward 0, the desire to consume a greater variety of goods increases. \(1/(1-\phi )\) represents the elasticity of substitution between any two varieties.

Likewise, in (15), PTA and PTM denote the domestic price indices for traded agricultural goods and for imported manufactured final goods, respectively, given by

$${P}_{TAt}={\left[\underset{0}{\overset{1}{\int }}{P}_{TA}{(v)}^{1-\phi }dv\right]}^{\frac{1}{1-\phi }}$$
(18)
$${P}_{TMt}={\left[\underset{0}{\overset{1}{\int }}{P}_{TM}{(v)}^{1-\phi }dv\right]}^{\frac{1}{1-\phi }}$$
(19)

On the other hand, using (14) and taking into account that \({P}_{t}{C}_{t}={P}_{Tt}{C}_{Tt}+{P}_{Nt}{C}_{Nt}\) we derive

$${C}_{Tt}=\gamma \frac{{P}_{t}{C}_{t}}{{P}_{Tt}}$$
(20)
$${C}_{Nt}=(1-\gamma )\frac{{P}_{t}{C}_{t}}{{P}_{{N}_{t}}}$$
(21)

From (20) and (21) we derive that

$$\frac{{C}_{Tt}}{{C}_{Nt}}=\frac{\gamma }{1-\gamma }\left(\frac{{P}_{Nt}}{{P}_{Tt}}\right)$$
(22)

Equation (22) relates the consumption of traded and non-traded goods.

In turn, taking into account that PTCT = PTACTA + PTMCTM, individual demand functions are given by.

\({C}_{TAt}=a\frac{{P}_{Tt}{C}_{Tt}}{{P}_{TAt}}\) and \({C}_{TMt}=(1-a)\frac{{P}_{Tt}{C}_{Tt}}{{P}_{TMt}}\)and we can derive that

$$\frac{{C}_{TAt}}{{C}_{TMt}}=\frac{a}{1-a}\left(\frac{{P}_{TMt}}{{P}_{TAt}}\right)$$
(23)

The intertemporal budget constraint in the maximization of (13), expressed in nominal terms, is the following:

$${P}_{t}{C}_{t}+{M}_{t}+{P}_{T,t}{B}_{t}+{T}_{t}={W}_{t}{L}_{TA,t}+{W}_{t}{L}_{N,t}+{\pi }_{TA,t}+{\pi }_{N,t}+{M}_{t-1}+{P}_{T,t}(1+r){B}_{t-1}$$
(24)

where B is the number of an international real bond (denominated in terms of the traded goods index), with the number depending on current account surpluses, and whose return is given by the real world interest rate r (also expressed in terms of the traded goods price index). On the other hand, in (24) T are taxes, and \(\pi_{TA}\) and \(\pi_N\) are the residual benefits that households receive in the two sectors.

The first-order conditions for the maximization of (13) subject to (24) are given by (25)-(27):

$${E}_{t}(\frac{{C}_{t+1}}{{C}_{t}})=\upsilon (1+r){E}_{t}(\frac{{P}_{t}/{P}_{Tt}}{{P}_{t+1}/{P}_{Tt+1}})$$
(25)
$$\frac{{M}_{t}}{{P}_{t}}=\chi {C}_{t}{E}_{t}(\frac{(1+r){P}_{Tt+1}}{(1+r){P}_{Tt+1}-{P}_{Tt}})$$
(26)
$$\frac{{W}_{t}}{{P}_{t}{C}_{t}}=kL{(i)}_{t}^{\varepsilon }$$
(27)

Equation (25) reflects the Euler equation that governs the dynamic evolution of aggregate consumption. Given the interest rate, if the aggregate price level relative to the price of traded goods is currently low relative to its future value, present consumption is encouraged over future consumption.

Equation (26) explains mainly that the real money demand depends positively on consumption. Finally, the term on the right-hand side in Eq. (27) denotes the marginal disutility of additional labor supply, and the left-hand side of that equation gives the marginal utility of the consumption bought with a real wage. Hence, households supply labor to firms up to the point where the marginal disutility of effort equals the marginal utility of consumption bought at real wage.

3 The impact of productivity shocks

3.1 The model dynamics: the short run and long run

We assume that the economy can potentially be affected by an increase in total-factor productivity (TFP) in one of the two sectors. Let’s denote by \({\widehat{\alpha }}_{TA}>0\) and \({\widehat{\alpha }}_{N}>0\) the increase in TFP in the traded agricultural sector and in the non-traded sector, respectively. We want to assess its inter-temporal implications on output, consumption and current account, and, ultimately, on overall welfare, through the impact on the households’ utility function.

As is standard, in the model we start from an initial deterministic steady state (which appear in Appendix A). Variables in the initial steady state are denoted with subscript 0. From this initial steady state we assume that \({\widehat{\alpha }}_{TA}>0\) and \({\widehat{\alpha }}_{N}>0\) In order to study the impact of \({\widehat{\alpha }}_{TA}>0\) and \({\widehat{\alpha }}_{N}>0\), we take the log-linearization in all equations around the initial deterministic steady state (in Appendix B are written these equations). In the study, we distinguish two intertemporal horizons: short-run and long-run. The period t, where the economy has nominal rigidities, such as wage rigidity (Calvo (1983) and Hau (2000)), is the so-called short-run horizon. Deviations from the initial steady state (what is called the short-run) are denoted with a “hat” over the variable. Thus, for any variable X, \(\widehat{X}=dX/{\overline{X} }_{0}\). The only exception is bond holdings, which is given by \(\widehat{B}=dB/{\overline{C} }_{T0}\).

The other intertemporal horizon is from period t + 1 onwards, where the nominal rigidities vanish (wages and prices can be fully adjusted), the economy reaches a new steady state, which we refer to as the long-run horizon. These later deviations from the initial steady state are denoted by “hats” on overbars. Thus \(\widehat{\overline{X} }\) is such that \(\widehat{\overline{X} }=d\overline{X }/{\overline{X} }_{0}\).

As said before, we take the log-linearization in all equations around the deterministic steady state. The only exception is the current account equation whose linearization is given by the expression:

$$\frac{d{B}_{t}}{{\overline{P} }_{0}{\overline{C} }_{0}}=\frac{1}{\upsilon }\frac{d{B}_{t-1}}{{\overline{P} }_{0}{\overline{C} }_{0}}+\frac{\gamma }{1-{\overline{S} }_{0}}\left(\frac{d{Y}_{TAt}}{{\overline{Y} }_{TA0}}-{\overline{S} }_{0}\frac{d{I}_{t}}{{\overline{I} }_{0}}\right)-\gamma \frac{d{C}_{Tt}}{{\overline{C} }_{0}}$$
(28)

Equation (28) shows the interplay between the change in net foreign assets and the dynamics of both consumption and the exchange rate. A conceptual difference between the short-run and long-run is that during the period when a shock takes place, the country’s income does not need to equal expenditure, unlike in the long-run. Thus, while over the long-run the current accounts must be balanced, over the short-run the economies can run current-account imbalances, translating into changes in net foreign assets.

In addition, in this framework, we will next highlight the following relevant aspects:

First, we capture the dynamic from the short to the long run through the staggered wage setting mechanism introduced by Calvo (1983), where in the short run only a portion of households can reset their nominal wages with a probability 1-λ:

$$\frac{d{W}_{t}}{{\overline{W} }_{0}}=\lambda \frac{d{W}_{t-1}}{{\overline{W} }_{0}}+\left(1-\lambda \right)\left(\frac{d{C}_{t}}{{\overline{C} }_{0}}+\frac{d{P}_{t}}{{\overline{P} }_{0}}\right)$$
(29)

Second, as we know from Schmitt-Grohe and Uribe (2003), the standard models of NOEM in the small open economy with incomplete asset markets (assumption in our model) present the characteristic of a steady state that depends on initial conditions and equilibrium dynamics with a random walk component. That random walk property of the dynamics implies that the unconditional variance of variables as assets holding and consumption is infinite. This induces a nonstationary path and, as a consequence, computational difficulties. To resolve this problem, we formulate the Uncovered Interest Parity (UIP), introducing, as in Schmitt-Grohe and Uribe (2003), and Bergin (2006), the following:

$$\frac{d{i}_{t}}{{\overline{i} }_{0}}=\frac{1}{\left(1-\upsilon \right)}\left({E}_{t}\left(\frac{d{S}_{t+1}}{{\overline{S} }_{0}}\right)-\frac{d{S}_{t}}{{\overline{S} }_{0}}\right)-{\psi }_{B}\frac{d{B}_{t}}{{\overline{P} }_{0}{\overline{C} }_{0}}$$
(30)

where i is the nominal interest rate faced by domestic agents, B now represents the value of nominal bonds denominated in domestic currency, and the term \({\psi }_{B}\frac{d{B}_{t}}{{\overline{P} }_{0}{\overline{C} }_{0}}\) captures a “risk premium” as a function of the debt of a country. This can be interpreted in the sense of lenders demanding a higher rate of return on a country with a large debt to compensate for perceived default risk. That formulation of the UIP forces wealth allocations in the long run to return to their initial distribution.

Third, another interesting point deserving mention concerns the relative dynamics of consumption in the short-run and long-run:

$${\widehat{C}}_{t}-{E}_{t}({\widehat{C}}_{t+1})={E}_{t}({\widehat{P}}_{t+1})-{\widehat{P}}_{t}-\left[{E}_{t}({\widehat{S}}_{t+1})-{\widehat{S}}_{t}\right]+\frac{{\psi }_{B}}{(1-\nu )}{\widehat{B}}_{t}$$
(31)

That is, a shock that increases nominal wages and prices in the long-run also leads to greater effects on short-run consumption due to the sluggish adjustment of the index prices in the short run.

Fourth, since in the model we assume that both imports and exports are invoiced in a foreign dominant currency (US dollar), changes in the domestic prices of traded agricultural goods (and also those of imported inputs), for given prices in the worldwide market, are determined by nominal exchange rates movements (\(\widehat{S}\)):

$${\widehat{P}}_{It}={\widehat{P}}_{Tt}={\widehat{P}}_{TAt}={\widehat{P}}_{TMt}={\widehat{S}}_{t}$$
(32)

Equation (32) reveals high and persistent pass-through into export and import prices, so the terms of trade are stable playing little to no role in expenditure switching.

Fifth, as regards productivity shocks, we will assume that changes in TFP follow an autoregressive process such as:

$$\frac{d{\alpha }_{TAt}}{{\alpha }_{TA0}}=\rho \frac{d{\alpha }_{TAt-1}}{{\alpha }_{TA0}}+{\varepsilon }_{\alpha t}$$
(33)
$$\frac{d{\alpha }_{Nt}}{{\alpha }_{N0}}=\rho \frac{d{\alpha }_{Nt-1}}{{\alpha }_{N0}}+{\varepsilon }_{\alpha t}$$
(34)

where we assume that \(\rho <1\) (by reasons of stationary of the process), and \({\varepsilon }_{\alpha t}\) is a normally distributed random variable of zero mean and constant standard deviation \(\varphi\), \({\varepsilon }_{\alpha t}\to N(0,{\varphi }^{2})\).

Sixth, finally, another implication of sectoral productivity shocks that we can assess is their impact on welfare. In our model, such an impact can be evaluated using the utility function (13). In that function, as is standard in these models, we omit the liquidity factor because, as was demonstrated, the magnitude of this effect on utility is small. Hence, in that utility function, we are going to consider the effects stemming from changes in consumption and effort (employment). Furthermore, in order to simplify algebra into the derivative of the utility function (13), we assume that \(\varepsilon =0\) (that is, we assume that the disutility of effort is linear). So, we have:

$$dU={\widehat{C}}_{t}-k({\overline{L} }_{N0}{\widehat{L}}_{Nt}+{\overline{L} }_{TA0}{\widehat{L}}_{TAt})+\frac{1}{\overline{r} }\left[{E}_{t}({\widehat{C}}_{t+1})-k({\overline{L} }_{N0}{E}_{t}({\widehat{L}}_{Nt+1})+{\overline{L} }_{TA0}{E}_{t}({\widehat{L}}_{TAt+1}))\right]$$
(35)

From (35), we can understand where the welfare changes come from after a positive sectoral productivity shock, if we look at overall consumption (which is beneficial) and employment or work effort (which reduces welfare).

3.2 Estimation

The macroeconomic model raised in the previous sections incorporates key assumptions that are intended to reflect structural characteristics of the economy in Sub-Saharan African. But how does the model fit the data?

In this subsection, we will check this point. To do it, first, we estimate some structural parameters. Among the estimation methods, we choose Bayesian techniques (consult e.g. Herbst and Schorfheide (2015) for an exhaustive introduction on these topics) because it has several advantages in our analysis. The two main ones, compared to the classic estimation, are: firstly, it allows us to introduce information about the parameters (a priori distribution). The consequence is that the precision of the estimate improves in a context of uncertainty. And, secondly, it also improves the estimation when limited/spaced data are entered.

Next our model is estimated using annual data from World Bank for the Sub-Saharan Africa (developing only), specifically, from statistics of the WDI. The sample period is 1995–2013, measuring the observable variables (agricultural output and imported agricultural raw materials) in current US$ (additional details are given in Appendix C). We use the Dynare software (Juillard, 2004) for programming the Bayesian estimation procedures.Footnote 3

The discount factor parameter, \(\upsilon\), will not be estimated because it is not well-identified from the cyclical dynamic of the data. Following the literature (Berg et al. 2015), we set its value in 0.98 which is consistent with an annual real interest rate of 8 percent. This value, relatively higher than that for advanced economies, is justified because it tries to reflect that the institutional uncertainty in SSA lowers future expectancies.

The estimation results of other structural parameters are given in Table 1:

Table 1 Prior and posterior distribution of structural parameters

Once the estimation has been made, we will now address the empirical relevance of introducing (imported) agricultural inputs in the production function of the tradable agricultural sector. This a key assumption in our model for obtaining the impact on the overall welfare of sectoral increases in productivity. With this aim, we consider two specifications of the model: specification 1, M1, where \(\delta <1\), and the other, specification 2, M2, with \(\delta =1\). The only difference between them is that while in M1 there is a share of imported agricultural inputs, in M2 we assume an agricultural production function with labor as the only production factor. In this context, Bayesian estimation of DSGE models is performed assuming the prior distribution of the parameters in each specification M1 and M2 as follows: 1) independence between differentiated priors, and 2) maintaining the same priors in the two specifications M1 and M2, except the one (s) that determines them.

We address which specification, M1 or M2, best describes the data by looking at the relative fit of each specification, measured by the likelihood or log data density. The marginal likelihood is the probability assigned to each specification, M1 and M2, of fitting the observed data.

Table 2 below reports the log data density for M1 (with \(\delta <1\)) and M2 (with \(\delta =1\)).

Table 2 Log data densities

As can be seen in Table 2, the log data density improves from 85.07 in M2 with \(\delta =1\) (no share of imported agricultural inputs) to 340.08 in M1 (when we consider imported agricultural inputs). This means that a larger fitting is obtained when we assumed imported inputs in the tradable agricultural sector. This fact translates into a numerical Bayes factor of \({e}^{255}\) (see e.g. Berger and Pericchi (1996)). In terms of the scale given by Kass and Raftery (1995), the evidence against specification M2 (with \(\delta =1)\) is strong and decisive.Footnote 4 Hence, the previous analysis reveals the greater plausibility of the M1 specification.

On the other hand, we can see that, in the estimation of the parameter \(\beta\), the mean of the posterior density is significantly lower than the prior mean. This suggests that the data show strong decreasing returns to scale. As regards the estimation of the parameter \(\gamma\), we obtain a posterior mean of 0.77 from a prior mean of 0.60. This result indicates that, on the one hand, the parameter is well identified by the data, and that there is empirical support to the assumption of high share of traded goods in the consumption basket, on the other.

3.3 Model dynamics

With the formulation in a dynamic stochastic general equilibrium (DSGE) framework, the model does not admit a closed-form for their equilibrium dynamics that we can derive with “paper and pencil”. Instead, we have to resort to numerical and computational methods (with Dynare) to find approximated solutions with their dynamic properties.

We will proceed with the DSGE model in two steps. In the first one, we set values of structural parameters, in some cases following the standard values of the literature (because most of these parameters are weakly identified by the variables we use as observables), and, in others, according to our parameter estimation seen in the previous subsection. Secondly, by deriving the impulse-response functions, we study the dynamic effects of sectoral productivity shocks on the variables that have a more direct impact on welfare, which is explicitly assessed in a final subsection.

3.3.1 Model parameterization

In the context of the first step, we set the values of parameters as follows: \(\nu =0.98\) ((Berg et al. 2015); \(\sigma =0.3\) (McCallum and Nelson (2000)); \({\psi }_{B}=0.0107\) (Lane and Milesi-Ferretti (2002), Senhadji (2003)); \(\lambda =0.75\) (Dickens et al. (2007)); in addition, from De Hoyos and Lessem (2008) and our estimate, we set \(\gamma =0.7\). As regards the parameter of returns to scale in the traded agricultural sector, from Basu and Fernald (1997) and our estimate, we tentatively assume decreasing returns to scale, and set β = 0.5; on the other hand, because we are analyzing a permanent shock, we choose a value for \(\rho\) close to 1, \(\rho =0.9\), and finally from Garcia-Verdu et al. (2019), Bangara (2019), the database of the World Bank WDI, and our estimate, we set δ = 0.9.Footnote 5

3.3.2 - Simulation results: impulse response functions

In this subsection, we numerically solve the model and simulate it to obtain impulse response functions to an (unit) expanded sectoral TFPs. Figures 1 and 2 show the response of the economy to these shocks. In order to assess its impact on welfare (as indicated previously), we are going to focus on consumption, sectoral output (employment), current account and nominal exchange rates. Specifically, Figs. 1 and 2 show, respectively, the response of the economy to a (unit) productivity increase in the tradable agricultural sector and in the non-traded sector.

Fig. 1
figure 1

Impulse response to a unit tradable agricultural productivity shock

Fig. 2
figure 2

Impulse response to a unit non-traded sector productivity shock

The impulse response functions confirm the stationarity of the stochastic model. An increase in the TFPs raises outputs and consumption (in addition, in the case of the increase in traded agricultural productivity, domestic currency appreciates and agents accumulate net foreign assets). Over time, however, all these series return to their steady-state values. This can be observed in Figs. 1 and 2.

As can also be seen from the impulse response functions in Figs. 1 and 2, the impacts of productivity shocks are sensitive to the sectoral location of productivity shocks. Figure 1 displays the response of the economy to an increase in productivity in the tradable agricultural sector. In face of this disturbance, the nominal exchange rate appreciates and the shock leads to a strong initial expansion of the tradable agricultural output, which is followed by a contraction and slow and gradual adjustment over time. Meanwhile, the domestic price of imported inputs decreases (thus also marginal costs), which, on the supply side, encourages agricultural producers to increase their intensity per unit of output. The magnitude of this intensity depends on the elasticity of substitution between labor and imported inputs in the production technology of the agricultural sector. On the demand side, the aggregate demand shifts from non-traded goods to tradable agricultural goods, increasing its relative consumption. At the aggregate level, consumption increases and then gradually adjusts.

Finally, the current account is also affected by the productivity shock in the tradable agricultural sector. As the domestic currency appreciates and the marginal cost of agricultural firms falls, it boosts output in the traded sector, which tends to improve the current account. At the same time, the appreciation of the domestic currency makes imports of agricultural inputs cheaper, which also contributes to the current account surplus. All this, together with the increase in real wages (driven by a fall in domestic inflation), has a positive effect on domestic consumption.

In the non-traded sector, the impulse response functions to a similar increase in productivity, shown in Fig. 2, suggest a smaller effect on the economy. Specifically, visually, the effect on consumption seems smaller over time. In fact, the only variables affected by such a productivity shift are non-agricultural output, prices (not shown), and consumption.

The intuition is as follows. A rise in \({\alpha }_{N}\) (\({\widehat{\overline{\alpha }}}_{N}>0\)) decreases the marginal cost of producing non-agricultural goods and so \({P}_{N}\) falls relative to \({P}_{T}\). Because we assume (according to Eq. (14)) a Cobb–Douglas case, where the total spending is unchanged, the fall in \({P}_{N}\) is offset by a commensurate rise in \({C}_{N}\) (and \({Y}_{N}\)), so that \({C}_{N}{P}_{N}\) remains unchanged, and, accordingly, \({C}_{T}{P}_{T}\) must also be unchanged. Hence, \({C}_{T}\) is unchanged. On the other hand, the profitability effect of the productivity increase is exactly outweighed, with regard to non-traded goods sector profitability, by the fall in \({P}_{N}\), and there is therefore no reallocation across labor sectors; that is, \({\widehat{L}}_{TA}={\widehat{L}}_{N}=0\). Therefore, the adjustment in the money market as a result of greater consumption,\(\widehat{C}=(1-\gamma ){\widehat{\alpha }}_{N}\), (which leads to a greater demand for money) hinges exclusively on lower prices, \(\widehat{P}=-(1-\gamma ){\widehat{\alpha }}_{N}\), (which raises the real money balances) without any adjustment in the nominal exchange rate, \(\widehat{S}=0\).

3.3.3 Welfare evaluation

In this subsection we explicitly simulate the welfare implications derived from the two previous productivity shocks. To do this, we follow Schmitt-Grohé and Uribe (2004) in measuring conditional welfare associated with each productivity shock ɑ (ɑ = T, N), \({W}_{0}^{a}\), as the conditional expectation of lifetime utility at t = 0. This conditional welfare can be written as:

$${W}_{0}^{a}={E}_{0}\sum_{t=0}^{\infty }{\upsilon }^{t}U({C}_{t}^{a},{L}_{t}^{a})$$

It is assumed that at t = 0, all state variables of the economy are at their respective steady state values. Then because it is assumed that the starting deterministic steady state is the same for the productivity shock of each sector, computing expected conditional welfare on this initial steady state, we obtain comparable welfare changes coming from sectoral productivity shocks. We implement this in Dynare writing the welfare function (with a second-order approximation), W, recursively as \({W}_{t}={U}_{t}+\upsilon {W}_{t+1}\), being Ut the utility of period t.

Table 3 reports the simulated welfare results of the economy under positive productivity shock in both the tradable agricultural and non-traded sectors. The simulated conditional welfare is reported as value of 104.

Table 3 Simulated conditional welfare with different values of δ

The results show that the positive productivity shock in the tradable agricultural sector has the highest welfare: at 0.432, 0.529, and 0.696, respectively, for the value of 1-δ of 0.1, 0.4, and 0.7. Hence, we can also note that this higher welfare is greater, the bigger the share of imported inputs in tradable agricultural production.

This finding is qualitatively similar to that by Ivanic and Martin (2018). They find that, in poor countries, increases in agricultural productivity generally have larger poverty-reduction effect than increases in other sectors. Specifically, they found that a 1 percent increase in agricultural TFP leads to a reduction in the share of the poorest population, on average, in a 1 percent, which doubles the magnitude of the effect of a comparable increase in productivity in other sectors (industry o services).

Hence, the evidence shows up that, in SSA, improvements in agricultural productivity are essential both to reduce the poverty level/welfare increase and to favor a structural economic transformation and a smooth transition towards more urbanized economies.

Therefore, investments of governments/donors (through public infrastructures, energy and water supplies, etc.) in SSA countries should focus on improving tradable agricultural productivity to increase economic growth and welfare. In addition, this could facilitate a structural transformation where smallholders have stronger incentives to use modern inputs (like seeds, fertilizers, agricultural machines…), increasing their productivity, and to link their production with value chains.

4 Conclusions

This paper uses the DSGE modelling approach to study the contribution of total TFP growth in both traded (tradable agriculture) and non-traded sectors to welfare and to other relevant economic variables in a small open economy, studying the particular case of the SSA. Specifically, regarding the welfare implications, from a DSGE model, we reach the conclusion that an increase in productivity in both the agricultural (tradable) sector and non-agricultural (non-traded) sectors increases welfare. Nevertheless, compared to the non-traded sector case, a positive productivity shock in the tradable agricultural sector leads to more welfare. This greater welfare is greater the bigger the share of imported inputs in tradable agricultural inputs. This finding has implication for a number of economic policies in poor countries.