Consumption Smoothing and Shock Persistence: Optimal Simple Fiscal Rules for Commodity Exporters

A common criticism of balanced budget fiscal rules is that they increase the consumption volatility of financially constrained households who are unable to smooth consumption. This paper evaluates the welfare consequences of simple fiscal rules in a model of a small commodity-exporting country with a share of financially constrained households, where fiscal policy takes the form of transfers. A main finding is that balanced budget rules for commodity revenues often outperform more sophisticated fiscal rules where commodity revenues are saved in a Sovereign Wealth Fund (SWF). Because commodity price shocks are typically highly persistent, the households' current income is close to their permanent income, making balanced budget rules close to optimal. For commodities like oil, where price shocks are highly persistent, it is optimal to spend more than two-thirds of windfall revenues in times of high prices, and in some cases even spend the entire windfall. But for commodities where price shocks are less persistent, like bananas or sugar, the optimal rule involves spending less than half of above-average commodity revenues (with the rest saved in a SWF). It is also best to respond counter-cyclically to non-resource GDP shocks, because those shocks are less persistent (and also affect households other income). The government does not have the ability to perfectly smooth constrained households? consumption without adversely affecting unconstrained households.


Introduction
Commodity-exporting economies are often characterized as having needlessly pro-cyclical fiscal policy: spending when commodity prices are high, and then cutting back when commodity prices fall (i.e. a balanced budget rule, BBR). One of the purposes of Sovereign Wealth Funds (SWFs), combined with structural surplus fiscal rules (SSRs), is to smooth out government expenditure over time: to save when commodity prices are high and build up a buffer which can be drawn upon in times of lower prices. 2 Two widely admired countries in this literature are Norway and Chile. Norway's fiscal rule involves storing its oil revenue in a SWF, and withdrawing around 4% (the long run rate of return) per year to fund expenditure (Gonzalez et al 2013). Pieschacon (2012) finds that if Mexico had adopted Norway's fiscal rule, it would have been better off by around 7.5% of steady state consumption. Chile's celebrated structural surplus rule (SSR) involves saving copper revenues that are above their perceived long-run level and drawing upon these savings when copper prices are low. 3 Based on a small open economy New Keynesian model calibrated to Chile, Kumhof and Laxton (2013) find that the welfare gains from adopting a SSR, relative to a BBR, are around 5 times the gains from adopting optimal monetary policy. 4 The welfare gains are even larger when Chilean government expenditure responds counter-cyclically to non-resource tax revenues. The authors argue that the reason for these large gains is that the "key task of fiscal policy 1 Mendes: PUC-Rio (Email: agalegomendes@gmail.com). Pennings (corresponding author): Development Research Group, The World Bank (Email: spennings@worldbank.org or steven.pennings@nyu.edu) We would like to thank Luis Serven, Maya Eden, Damiano Sandri, Fernando Blanco, Fritzi Kohler, Daniel Lederman and seminar participants at the World Bank and the ERF. Mendes thanks the ERF and the World Bank for financial support. JEL: E62, O11, E21, E32. Keywords: commodity prices, consumption smoothing, fiscal rules, Sovereign Wealth Funds (SWFs) 2 Of course SWFs also have other functions, such as intergenerational equity, but in this paper we focus on their role in smoothing macroeconomic shocks. 3 The current formulation of Chile's fiscal rule is based on the deviation of the current copper price from a long-run "reference" price formed by a committee of experts, rather than on the deviation from the long-run average price (Fornero and Kirchner 2014). An important difference is that the reference price of copper can (and does) change, as it did over 2005-13 when it tripled in USD terms (Fornero and Kirchner 2014 Figure 7). This means that in practice the Chilean fiscal rule is more pro-cyclical over the medium term than it is characterized in the literature, and our critique is more based on this characterization than the operation of the rule in practice. 4 The gain is around 0.13% of steady state consumption, which is relatively large given then well-known low welfare costs of business cycles. For example, with log utility, consumers in the US are only willing to spend 0.05% of steady state consumption to avoid all business cycle fluctuations (according to Lucas's formula). 5 One reason for this is that as shocks become persistent, shock variances increase which creates computational problems. 6 There is a vast literature testing whether commodity prices follow a random walk (which generally cannot be rejected), and trying to estimate more sophisticated models with temporary variations and structural breaks. In Appendix A we compare our estimates of commodity price persistence for different commodities to those in Cashin et al (2000) (who use a median-unbiased estimator) and find similar results. From a policy perspective, we argue the break down into permanent vs temporary components to be unhelpful for most countries. Identifying permanent vs temporary changes is difficult enough in hindsight, even harder in real time (when fiscal decisions must be made), and often can be counterproductive. For example, Basch and Engel (1993) argue that in the 1970s and 1980s, Latin American countries generally considered positive shocks to be permanent, and negative shocks to be temporary, when in fact the opposite was true. Moreover, the welfare losses from over-reacting to a temporary shocks are much lower than under-reacting to a permanent one. See Fornero and Kirchner (2014) for a model where agents learn about the true persistence of commodity prices. While the optimal rule is pro-cyclical with respect to highly persistent commodity revenues, it is strongly countercyclical with respect to non-resource shocks, which are much less persistent (and affect households' other income). In our main results, we find that the optimal simple rule insures hand-to-mouth (HtM) households from the vast majority of variation in non-resource income by increasing (decreasing) transfers when non-resource income falls (rises).
Optimal rules by commodity. Although many commodity prices are quite persistent, there is substantial variation across individual commodities and the optimal fiscal rule is sensitive to this variation. For example, while around three-quarters of windfall oil revenues should be spent, only half of above-average gas revenues should be spent, and around a quarter of sugar revenues (see Appendix Table 7 for a full list). As such, superficially similar commodity exporting countries can have very different optimal rules. The reason is that the optimal degree of pro-cyclicality increases non-linearly with the persistence of commodity price shocks.
Debt-elastic interest rates and precautionary savings. In our quantitative model we follow Schmitt-Grohe and Uribe (2003) and others in assuming that as a country's assets become larger (smaller) the country's interest rate premium declines (increases), reflecting a lack of investment opportunities on the upside, and greater financial risks on the downside. This variation in interest rates makes large variation in the size of the SWF very costly to households in terms of interest income. We find that there is a positive relation between the debt-elastic interest spread of the country and the optimal speed of convergence of the SWF towards its target size. In our baseline calibration, the optimal rule is for governments to spend around 10% of the deviation of the value of the SWF from its target size each year, which is well above the real rate of return of the SWF (around 4% per year, as with Norway's SWF).
A real world concern for optimal fiscal rules is that countries face a borrowing limit which inhibits the ability of the government to smooth spending after a long period of low commodity prices. Jeanne and Sandri (2016) (henceforth JS2016) model an economy with non-linear constraints like this, and derive optimal precautionary holdings of reserves (equivalent to an SWF). Since our main results rely on a linear model, it is natural to ask if we are overestimating the pro-cyclicality of optimal fiscal rules because we abstract from non-linear constraints. In fact, JS2016 find that an optimal simple linear rule similar to the one used in this paper is able to deliver the vast majority of the welfare gains from optimal non-linear reserve management. It turns out that our simple linear model is able to capture much of the dynamics of precautionary savings in JS2016 when we increase the debt-elastic interest spread. When we choose the debt-elastic interest spread to match the autocorrelation of net assets/reserves in JS2016 (with their calibration) we find almost exactly the same degree of pro-cyclicality of the fiscal rule -as well as the first-order autocorrelation of the trade balance-to-output ratio observed in the data -even though neither of these were calibration targets. When we use that debt-elasticity with our default calibration, we find that it actually increases the fraction of above-average commodity revenues that are spent. These results suggest that (i) our simple linear model with a reduced form financial friction is able to capture much of the dynamics of more complicated non-linear models, and (ii) if anything our simple linear model understates the pro-cyclicality of optimal fiscal rules.
Commodity price spillovers and endogenous GDP Another real-world concern is that in commodity intensive economies, shocks to commodity prices spill over into the non-resource economy, potentially complicating the optimal simple rule and motivating greater smoothing of commodity price shocks. In two extensions, first with exogenous spillovers and second in a real business cycle (RBC) model, we show that actually spillovers make the variation in the non-resource economy more persistent, which increases the pro-cyclicality of the optimal fiscal rule with respect to commodity revenues. In these economies, the optimal rule involves spending all of commodity revenues -as these are the ultimate cause of the increase in persistence in non-resource GDPbut still responding counter-cyclically to temporary non-resource GDP shocks as before.
Government objectives, untargeted transfers and an irrelevance result As there are two types of households, the government might care more about some households than others. For example, the government might care more about the welfare of HtM HHs because they are poorer. 7 In the extreme case that the government only cares about HtM HHs, it possible to completely insure HtM HHs from all risk, though this results in large welfare losses for the Ricardian (unconstrained) HH, and so some risk sharing across households is generally optimal if the government cares about the welfare of both households.
Although the government might be able to target transfers to particular groups, it is unlikely that they would be able to do so perfectly. Practically, this is not a huge problem, because Ricardian households are indifferent to changes in the timing of transfers, so long as their present value remains the same. In the paper, we show that under some conditions, the fiscal rule followed will be irrelevant for Ricardian HH consumption and welfare. Even if those strict conditions are not met, Ricardian HHs welfare is fairly insensitive to many changes in fiscal rules, which means that government can choose the untargeted fiscal rule to be fairly similar to the rule they would like to target at the HtM HHs. This rule is similar to the one that maximizes HtM HH welfare, conditional on transfers being untargeted.
Relation to literature As discussed above, most recent quantitative models of fiscal rules for commodity exporters have argued that commodity revenues should be saved, and balanced budget rules are suboptimal. To our knowledge, there are no recent papers that challenge that view. While it has been known for some time that (i) commodity prices are close to a random walk, and (ii) permanent changes in income should be spent (for example, see Basch and Engel 1993), researchers have generally avoided incorporating highly persistent shocks into quantitative models of optimal fiscal rules. This has led to the current consensus in favor of saving commodity revenues. 8 Our results are related to several papers which treat commodity price shocks as highly persistent, though none of these papers calculate optimal fiscal rules. First, our findings are consistent with the policy discussion in Cashin et al (2000), who argue that highly persistent commodity price shocks are likely to undermine commodity price stabilization schemes. Cashin et al (2000) focus on estimating the persistence of commodity prices and make their policy argument descriptively, rather than calculating the welfare consequences of different rules as we do here. Second, our results are related to JS2016. Although our results are consistent with theirs (suitably modified to a consistent framework as discussed above and in Section 5), JS2016 evaluate optimal reserve management rather than optimal fiscal rules and do not include Hand-to-Mouth (liquidity constrained) households. Finally, Fornero and Kirchner (2014) decompose copper prices into temporary and persistent components and find that the latter is highly persistent. They build a New Keynesian model where agents learn about the true persistence of commodity prices, and show impulse responses to persistent commodity price shocks under different fiscal rules -although they don't calculate the welfare consequences of those different rules.
Naturally, there are a number of important real world issues we have abstracted from -such as irreversible public investment and political constraints -which are discussed in the conclusion. Nonetheless, our paper does clarify that if a structural surplus rule is optimal, it should be justified along those lines, rather than in order to smooth consumption of constrained households.
Structure of the paper Our paper is organized as follows. In Section 2, we solve for the optimal simple rule analytically in a model with only hand-to-mouth (liquidity constrained) households. In Section 3 we present our main quantitative model, which includes two types of households but where output and commodity prices are exogenous. In Section 4 we present the main numerical results in terms of the welfare loss under different popular fiscal rules, and also the optimal fiscal rule. We then present three extensions to the baseline model. In Section 5 we show that the linear model of Section 4 comes close to replicating the optimal policy in the non-linear model of precautionary savings used by Jeanne and Sandri (2016) with a higher debt-elastic interest spread. In Section 6, we generalize the results of the model by allowing commodity price shocks to spill over to non-resource GDP, which generally makes the response to commodity price shocks even more procyclical. In Section 7, we endogenize output in a Real Business Cycle (RBC) model which generally yields similar results (RBC model details in the Appendix). Section 8 concludes.

Analytical Model
A common justification for saving commodity windfalls in sovereign wealth funds is a desire to smooth consumption. The idea is that households are risk averse, and so prefer a steady stream of consumption to a volatile one. If households are not able to borrow or lend for themselves -for example due to credit constraints, a lack of savings instruments or behavioral factors -then the government has a role to smooth commodity revenues on their behalf. In this section we focus on this mechanism in a model simple enough to solve analytically.
In order to do that, we assume that the only agent is a household who consumes his income hand-to-mouth each period, and that utility is quadratic (in the rest of the paper we assume more standard constant relative risk aversion (CRRA) utility). 9 The government taxes non-resource output τ Y Y t , can save in or spend from a sovereign wealth fund A t (if A t < 0 then this is government debt) and receives a fraction τ p of commodity revenues QP t (for the rest of the paper we assume that τ p = 1 so the government receives all commodity revenues, as is standard in the literature). Commodity output is fixed at Q, but commodity prices P t vary. The household's income each period consists of transfers, before tax non-resource GDP (1 − τ Y )Y t and a fraction (1 − τ p ) of commodity revenues (1 − τ p = 0 in the rest of the paper). The government then chooses a transfer policy (equivalent to choosing consumption) to maximize the household's utility. More formally, the problem is: where u(c t ) = −(c t − γ) 2 and β = (1 + r) −1 . The Euler equation implies c t = E t c t+1 , and combined with the transversality condition, and some algebra yields the consumption function for households. This can be rearranged to give the government transfer rule where transfers respond (i) the deviation of the sovereign wealth fund from its long run level (A t−1 −A), (ii) the deviation of commodity prices from their long run level (P t − P ) and (iii) the deviation of non-resource output from potential Y t − Y . In the analytical model (with only HtM HHs) the Optimal Simple Rule (OSR) is: Each of the fiscal rule coefficients θ P and θ Y in Equation 2.3 has two components: (i) how the government spends above-average revenues (τ p Q(P t − P ) for commodities or τ y (Y t − Y ) for non-resource GDP), and (ii) the countercyclical transfers the government provides to smooth nontransfer income on behalf of the household For commodity revenues: If oil shocks are transitory, ρ P = 0, the optimal rule involves only spending r/(1 + r) ≈ 4% of any increase in oil revenues above trend. In contrast, as ρ P → 1, the government should transfer all of the above average oil revenues to households. With ρ P = 0.96 and r = 0.04, as is close to the data (for oil), r/(1 + r − ρ P ) = 0.5, so one should spend around half of excess oil revenues each period. This is (roughly) similar to the Optimal Simple Rule in Section 4, where around 70% of commodity revenues should be spent. With ρ P = 0.94 , around 40% of excess oil revenues should be spent. If τ p < 1, the government also wants to provide countercyclical transfers to help the HtM HH smooth their 1 − τ p share of non-commodity income. We remove that channel by assuming τ p = 1 (as is common in the literature), such that θ p = r/(1 + r − ρ p ).
For output, we calibrate ρ Y = 0 and τ y = 0.15, which (with r = 4%) imply θ Y ≈ −0.8 (similar to numerical results in Section 4). This suggests that the government should increase transfers by 80% of any fall in GDP during a recession, a strongly countercyclical response. One can decompose this into the two components above. r/(1 + r − ρ Y ) ≈ 0.04 so the government should save almost all above-average non-commodity revenues. However 1 − r/(1 + r − ρ Y ) ≈ 0.96 which means that the government should respond counter-cyclically to non-resource GDP shocks to help the HtM HH smooth its own income, which is the main reason for the counter-cyclical fiscal response with respect to non-resource GDP.
Finally, the government should only spend the interest on any extra assets in the sovereign wealth fund (above the target level of the SWFĀ). This is quite different from the rule in the quantitative model in the next section, where the optimal rule requires spending more than r = 4% of the SWF value for stability. With θ A = r, the value of the sovereign wealth fund exhibits almost a unit root. Not only does this mean that value of the SWF will eventually be exhausted (something we ignore here without government borrowing constraints), it also means consumption will exhibit a unit root and its variance will become very large. We revisit these issues in the next section.

Model (Description and Calibration)
In this section we build a simple exogenous-income model, which can be used to evaluate the quantitative welfare losses of alternative popular fiscal rules (e.g. balanced budget rule, structural surplus rules), and to calculate the optimal simple rule. Relative to the analytical model, we now include Ricardian households (who can borrow and save), change the utility function to the constant relative risk aversion (CRRA) class common in the literature, and add a debt-elastic interest spread. The results are robust to endogenizing output in a Real Business Cycle model, discussed in Section 7, as well as other extensions.

Model Overview.
Consider a small open economy disaggregated into resource and nonresource sectors. The sectoral decomposition is a key feature of the model because it allows us to account for the characteristics of the business cycle that are particular to each sector. For simplicity, we assume that production in each sector is exogenous. Each period the resource sector produces Q units of a commodity good that is not consumed domestically and only provides an additional source of income from export sales that accrues entirely to the government. The international price of the commodity follows an auto-regressive process in logs with persistence ρ p and error standard deviation σ p . 10 Production in the non-resource sector follows an auto-regressive process with persistence ρ y and error standard deviation σ y and can be either consumed domestically or traded internationally at constant price of one dollar. For now, commodity prices and output are independent, but we relax this assumption in Section 6. Time is measured in years.
Another key feature of this economy is that it is populated by two types of households. Ricardian households have full access to an international bond market, while liquidity-constrained (Handto-Mouth) households consume their after-tax income each period. The Ricardian/non-Ricardian framework generates a non-trivial role for fiscal policy and introduces household heterogeneity that will allow welfare evaluation from the perspective of two different households. In the calibration we assume that population, income and social welfare function weights of each household type ω are one-half.
3.1.1. Households. The fraction ω of Hand-to-Mouth households are denoted by the upper index ( ) and the fraction 1 − ω of Ricardian households is denoted by ( ). They value consumption paths according to Equation (3.1). There is no labor, leisure or public goods.
where C i t is per household consumption in period t, β is the inter-temporal discount factor and σ is the coefficient of risk aversion. Because the Ricardian household has access to the international bond market, it chooses consumption and bond holdings to maximize Equation (3.1) subject to the budget constraint: 10 The standard deviation of log commodity prices is σ P / 1 − ρ 2 where B t is the stock of international bonds held by the Ricardian household (private assets) at the end of period t, R t is the domestic gross rate of return, T r t are government transfers per Ricardian household, Y t is the exogenous non-resource income and τ is the income tax rate. Utility maximization yields the following first-order condition for the Ricardian HH: Since the HtM household does not participate in the international bond market, per HtM household consumption in period t is restricted to the share ω y of the after-tax non-resource income, (1 − τ )Y t , plus per HtM household transfers from the government, T r t , The government receives exogenous resource income, P t Q (Q is the quantity of resource exports, which we assume are constant), collect taxes, participates in the international bond market and makes transfers to both households. The government's budget constraint is: where A t is the stock of international bonds held by the government (public assets) in period t + 1 and P t is the exogenous commodity price. 11 3.1.3. Debt-Elastic Interest Rate Spread. Following Schmitt-Grohe and Uribe (2003), we induce stationarity in the model by assuming that the interest rate faced by domestic agents increases with the public + private level of debt in the economy (decreases with public + private assets) where B ss and A ss are steady state private and public assets, R is the constant world interest rate, and ψ is the debt-elasticity of the interest-rate spread. 12 Although we introduce this feature to the model for mostly technical reasons, the debt elastic interest rate can be viewed as a reduced form way of introducing financial frictions in the model (see Section 5).

Exogenous Process.
Resource prices and non-resource endowments follow an autoregressive process of the form Assume the government assigns weight ω U to the HtM and 1−ω U to the Ricardian HH so that different paths of consumption are ranked by the government according to the following social welfare function: Up to a second order, the problem of maximizing Equation (3.9) is equivalent to minimizing Equation (3.10), whereĉ t andĉ t denote the proportional deviation of Ricardian and HtM consumption from their steady state values: One can interpret Equation 3.10 as the share of steady-state consumption that the household is willing to give up each period to eliminate the variance of consumption over the business cycle. In a world with complete markets, the household could sign a state-contingent contract with foreign investors so that equilibrium consumption is constant and welfare loss is zero. However, due to the less sophisticated financial structure assumed in this model, income shocks will lead to consumption volatility and welfare losses. The higher the variance of consumption, the greater the welfare loss. 13 3.1.6. Fiscal Rules. The simple fiscal rule dictates how transfers to each type of household change in response to observable economic variables. In particular, we allow transfers to respond to deviations of public assets A t , non-resource income Y t and the international commodity price P t from their respective long-term (steady state) levels. Note that transfers are written in per capita terms, so the total proportion of assets transferred (for example) is We consider seven types of fiscal rule, which are listed below. Countercyclical Rules (CCY) are where the government tries to smooth the business cycle by decreasing (increasing) transfers when output is above (below) potential. In rules (4) and (5) we combine countercyclical rules with Balanced Budget Rules (BBR) and Structural Surplus Rules (SSR), where the BBR/SSR refers to the treatment of commodity revenues, and CCY refers to the response to domestic non-resource income shocks.
(1) Full HtM Stabilization is where the government completely smooths HtM's consumption by setting θ a = θ p = 0 and θ y = −(1 − τ ). Following Lemma 2 (in the appendix), given θ a = 0, the welfare of the Ricardian HH is independent of the coefficients {θ a , θ y , θ p }. (2) The Balanced Budget Rule (BBR) suggests that the government should focus on minimizing the volatility of public assets around its long-term level. In this setup the government can perfectly stabilize public assets by pursuing the following fiscal rule by setting θ a = θ a = β −1 − 1 + , θ y = θ y = τ (we sometimes assume θ y = θ y = 0) and θ p = θ p = 1. 14 (3) The Structural Surplus Rule (SSR) states that the role of government is to minimize the volatility of fiscal instruments. In this case, the government saves revenues in excess of its long-run level and draws down from the SWF when revenues fall below the long-run level. The value of the parameters that accomplish that are θ a = θ a = β −1 − 1 + , θ y = θ y = 0 and θ p = θ p = 0. (4) The Hybrid BBR-CCY responds differently to commodity revenues and variations in non-resource GDP. Specifically the BBR-CCY spends all commodity revenues (θ p = θ p = 1), but smooths non-resource income ( The response to government assets is unchanged θ a = θ a = β −1 − 1 + (5) The Hybrid SSR-CCY responds differently to commodity revenues and variations in non-resource GDP. Specifically the SSR-CCY saves commodity revenues ( The response to government assets is unchanged θ a = θ a = β −1 − 1 + (6) The Optimal Simple Rule (OSR) chooses all parameters {θ a , θ y , θ p , θ a , θ y , θ p } optimally so that the loss function Equation 3.10 is minimized.
The OSR-Equal also chooses parameters to minimize the loss function Equation 3.10, with the restriction that the transfers are untargeted. This means that θ a = θ a = θ a , θ y = θ y = θ y ,θ p = θ p = θ p .
3.2. Equilibrium, stability and an irrelevance result. We take a first-order Taylor expansion of the system of equations (3.2)-(3.12) around the steady state and consider an equilibrium driven by the two exogenous shocks: a commodity price shock ( p t ) and a non-resource GDP shock ( y t ). The equations of the linear system are presented in section B.1 in the appendix.
Lemma 1 presented in Appendix B provides two conditions for the existence and uniqueness of an equilibrium in the exogenous-income model. To guarantee a stable path for the SWF, the first condition states that governments must transfer to households no less than 4% (the long-run real interest rate) of the deviations of the value of the SWF from its target size each year (but also no more than 104%). The second condition removes the unit root in the consumption of the Ricardian households by imposing a debt-elastic interest rate spread in the model (ψ > 0), as in Schmitt-Grohe and Uribe (2003).
Lemma 2, also in Appendix B, presents a version of the well-known Ricardian equivalence result in Barro (1974) adapted to our heterogeneous agent framework. It says that if the government commits to a transfers rule to the hand-to-mouth household that does not depend on the size of the SWF (θ a = 0), then the equilibrium path of consumption of the Ricardian household is completely independent of the transfer rule coefficients for the Ricardian HH {θ a , θ y , θ p }. The reason is that transfers to the Ricardian household do not alter the discounted flow of expected after-tax income of the Ricardian household when θ a = 0.

Calibration. General Parameters
Many of the most important parameters are not country specific, and so we calibrate these to international data or take them from the literature. The most important are the persistence of commodity price shocks, which we calibrate to a weighted average of oil prices and gas prices taken from BJS2013. The overall persistence (ρ = 0.93) is a weighted average of oil prices (ρ = 0.94) and gas prices (ρ = 0.89) as many oil exporters also produce gas. 15 We set β = 0.96 so that long-run annual real rate of interest is 4%. The coefficient of risk aversion σ = 2, which is a standard parameter in the literature. We follow Galí et al (2007) to set ω = ω y = ω U = 0.5 (50% of the population is HtM). For simplicity we set B ss = 0 so that steady-state consumption is equal across households.
We set the benchmark debt-elastic interest spread to be ψ = 0.01, which implies that a 100% of GDP increase in debt (or reduction in assets) increases interest rates by 1%. Schmitt-Grohe and Uribe (2003) set ψ = 0.001 to match volatility of the observed current-account-to-GDP ratio for Canada. Schmitt-Grohe and Uribe (2016) argue that ψ should be set to match the autocorrelation of the trade-balance-to-GDP ratio, and they estimate ψ = 1 for Argentina. We take ψ = 0.01 as compromise between these two approaches. In Section 5, we use an alternative calibration of the exogenous income model with ψ = 0.45 and find broadly similar results.
Country-specific calibration to Algeria and Trinidad & Tobago (TTO) For country-specific parameters, we chose to calibrate to Algeria and Trinidad & Tobago (TTO). This is mostly because Algeria is close to a "typical" oil producer, and TTO is close to a "typical" gas exporter -many countries export both -as measured by the size of resource exports relative to non-resource GDP. Specifically, BJS2013 (Table 1) lists the 2002-07 average export revenues/non-resource GDP for 21 petroleum exporting countries which have petroleum export revenues/non-resource GDP above 10% -running from Sudan (12%) to Saudi Arabia (82%). The cross-country average is 38%, which is fairly close to Algeria's 33% oil revenues and so it might be regarded as "typical". BJS2013 also list five countries with natural gas exports above 10% of non-resource GDP, and TTO's 20% is very close to the 21% average. For the calibration of the model, we also include TTO's oil exports (13% non-resource GDP) which bring total TTO resource exports to 33% non-resource GDP. As such we calibrate Q = 1/3 (and Y ss = 1, P ss = 1) so total natural resource exports are 1/3 of non-resource GDP (QP/Y = 1/3) to reflect the relative size of resource exports to non-resource GDP in Algeria and TTO. 16 However, we also chose these two countries based on a desire for geographic diversity (Middle East/North Africa for Algeria, Latin America/Caribbean for TTO), and diversity of country size (TTO has about 1.3m people with Algeria having 40 million). Finally, we also excluded a number of other countries with idiosyncratic features that would make optimal simple rules difficult to calculate, such as large numbers of migrant workers or political instability. 17  (1) reg on filtered data** σ p 24% Std. deviation of resource prices 23% 26% Average of SD export prices (BJS2013) Notes: * In part due to oil prices, see Section 6 on "correlated shocks" **Regression of lnX t = α + ρlnX t−1 + e t Despite their other differences, in most cases Algeria and TTO have very similar characteristics relevant for the model (in the cases where parameters differ, we usually take the average). We calibrate the tax rate τ = 0.15 as non-resource taxes are 15% of GDP in Trinidad and Tobago (IMF 2014 Article IV) and 16% of GDP for Algeria (IMF 2016 Article IV). Algeria and Trinidad & Tobago also have very similar sized SWFs. The Algerian SWF represents a share of 33% of the Algerian non-resource GDP and Trinidad & Tobago's SWF is about 28% non-resource GDP (data from the SWF Institute), so we set A ss = 0.3 as an intermediate value. We assume steady state transfers are set to pay out all steady state revenues. The persistence and volatility of non-resource GDP is taken from estimating an AR(1) process on HP-filtered log real per capita GDP (from the World Development Indicators). While it is true that HP filtering removes much of the persistence in log GDP by constructtion, this is necessary given log GDP per capita is close to a random walk, and this is a standard procedure in the literature. Table 2 summarizes the main results for optimal and classical rules. HtM Stabilization: smoothing vs insurance In the first column of Table 2, the government follows a rule which provides full insurance for the HtM household against non-resource and commodity price shocks. As a result, HtM household consumption remains constant at its steady state level (a welfare loss of zero for that HH), which is the same result we would get if the household had access to state-contingent Arrow-Debreu securities. Given the HtM HHs lack access to financial markets, one might think this policy is similar to government borrowing/saving on behalf of the HtM household as it "fixes" market incompleteness.

Main Numerical Results
However, from an aggregate perspective this rule is very inefficient because it concentrates risk with the Ricardian HH rather than sharing risk across households. In fact, the HtM household full stabilization rule has the worst aggregate welfare performance among the 7 rules considered in this section (a 4.9% of SS consumption welfare loss, each period ). The full HtM stabilization rule leads to a very large consumption variance for the Ricardian HH (SD of 31% annually). This is the difference between smoothing vs insurance -the Ricardian HH and government have the financial technology to smooth out anticipated changes in the time path of income, but persistent commodity price shocks also lead to large changes in the present value of future income, which is uninsurable for both Ricardian HHs and the government. Note that because θ a = 0, our Ricardian Equivalence result (Lemma 2) applies and the government and Ricardian HH act like one entity (we get the same allocation for any feasible combination of {θ a , θ y , θ p }).
BBR outperforms SSR Columns 2 and 3 of Table 2 show an interesting and unexpected result: the BBR outperforms SSR. From the results of the literature summarized in the introduction, one would expect the opposite. Moreover, the difference in welfare is quite sizable: the welfare loss is 13% lower under BBR than under SSR. As argued in Section 2, when shocks are persistent, the SSR over-saves windfall revenues (and overspends when commodity prices are low), which means that in the short term, consumption of the HtM HH under-responds to changes in commodity prices.
A related problem is that SSR leads to a very large standard deviation of assets, both public and private. In our model, the main problem this creates is that the rate of return earned on the SWF assets will decrease as the SWF increases in size ("beating the market" is hard for large funds), or alternatively the interest rate increases when the SWF is small (fixed management costs become larger, there become worries about future solvency) -thus reducing the income available for consumption. In the real world, it would also mean the SWF would be exhausted, or the government/agents would eventually reach their debt limit, though with a linear model the occasionally binding constraints are excluded from our analysis. 18 The importance of persistence The reason the BBR outperforms the SSR is that the oil price shocks are very persistent. This means that current income is very close to permanent income and so a BBR where households just consume current income is close to optimal. In Figure 2, we plot the welfare loss of the SSR and BBR against the persistence of the commodity shock. As the persistence of the shock increases, so does its standard deviation (which is equal to σ p / 1 − ρ 2 p ). To isolate the effect of persistence on welfare, we decrease σ p as ρ P increases to keep the total SD constant. (In Figure 8 in Appendix B we repeat this exercise with constant σ p .) In the upper LHS of Figure 2 one can see that for ρ P < 0.90 the SSR is better -which is the result in the literature. However, for ρ P > 0.90, which is the empirically relevant region for many commodity prices like oil, a BBR is preferred. The change in ranking of BBR and SSR is due entirely to the HtM HH (bottom LHS), who prefers a BBR for ρ P > 0.90 (but SSR for ρ P < 0.90) because for persistent shocks current income closely resembles permanent income. One can see that the HtM HH consumption SD is constant for the BBR (as variance of consumption equals that of income, which is constant by construction). Ricardian HHs are indifferent between the two rules because they can smooth income themselves, and so "undo" the effects of a sub-optimal fiscal rule. Note, however, that the Ricardian HH prefers less persistent shocks because they are easier to smooth. Countercyclical Transfers Kumhof and Laxton (2013) find that countercyclical fiscal policy -where a fall in output leads to an increase in transfers -leads to a substantial increase in welfare. Here we add counter-cyclical transfers to both BBR and SSR in Column 4 and 5 of Table  2, and find only a small improvement in welfare (by 0.03-0.05). 19 The reason is that shocks to non-resource GDP are relatively small and not very persistent, and so even with a sub-optimal policy they generate little welfare loss. Countercyclical transfers are optimal because the temporary nature of the non-resource shocks means that they should be smoothed by HtM HHs. 20 Optimal Simple Rules (OSR) The optimal simple rule is shown in Column 6 of Table 2, which is the rule that chooses all six parameters {θ a , θ y , θ p , θ a , θ y , θ p } to minimize the weighted average consumption variances in the loss function (Equation 3.10). One can see that the coefficients are very similar to those in the BBR-CCY rule -especially for HtM HHs where the details of the rule have the most effect. The optimal rule suggests that a 10% increase in oil revenues will lead to a 7% increase in transfers to HtM HHs, and so in a sense is a compromise between a BBR and a SSR. The optimal rule also means that temporary non-resource income shocks are almost completely insured for HtM HHs, and that an increase in SWF assets leads to an increase in transfers to HtM HHs by more than the interest earned on those extra assets. For Ricardian HHs, the coefficients 19 That is, commodity revenues are spent/saved according to the BBR/SSR, but shocks to non-resource GDP are smoothed with counter-cyclical transfers. 20 The relationship between the persistence of the commodity shock and the ranking SSR-CCY vs BBR-CCY are almost identical to that of SSR vs BBR (not reported). are relatively similar to those of HtM HHs. Figure 9 in section B.3 shows how the welfare loss changes as we change the fiscal rule coefficients one at a time around the OSR. Equal Allocation OSR In Column 7 of Table 2, we also calculate the optimal fiscal coefficient assuming that the government cannot target transfers separately at HtM and Ricardian HHs (i.e. θ a = θ a , θ y = θ y , θ p = θ p ), so the fiscal authority just has to choose a transfer-based rule for all households {θ a , θ y , θ p }(without primes). Despite this substantial restriction, the OSR-equal delivers almost the exact same welfare as the fully OSR. The reason is that the unrestricted OSR coefficients discussed above are quite similar for HtM and Ricardian HHs. Although Lemma 2 doesn't hold exactly (as θ a = 0), welfare is generally less sensitive to variation in transfers to Ricardian HHs than to the HtM HHs. The policy implication is that for stabilization purposes, it doesn't matter if the government can target transfers at the HtM HH -they should just set the fiscal rule that is relatively optimal for HtM HHs, and this will be close to optimal for the Ricardian HHs as well. 21 In the top row of Figure 3 one can see how the welfare loss changes in the neighborhood of the OSR-Equal rule. Most important, we find that the welfare loss increases substantially as the government saves more commodity revenue (i.e. θ p < 0.68). For θ a , the welfare loss increases sharply below the optimal value of θ a = 0.09, because this causes SWF assets to become highly volatile. As above, the welfare loss increases slowly as the response to non-resource income shocks become more pro-cyclical above the optimum of around θ y = −0.8.
In the bottom row of Figure 3, we show that if ρ p = 0 (commodity revenues are not persistent) general welfare losses are much lower, and even very suboptimal procyclical policies (spending all of resource revenues) generate relatively minor welfare loses of around 0.2% of steady state consumption. This leads us to conclude that the payoffs for making policy mistakes are asymmetric: if commodity price shocks are transitory, setting the fiscal rule as if they are permanent only leads to an additional welfare loss of 0.17% of steady state consumption. In contrast, if one sets optimal policy for a transitory shock when shocks are actually permanent, welfare losses are over 1% of steady state consumption (in the baseline calibration).
The optimal rule for shocks of different persistence Figure 4 shows how the untargeted optimal rule (OSR-equal) changes as the persistence of the commodity price shock increases. θ p increases non-linearly with the persistence of the commodity price shocks. When the shock is very persistent, ρ p = 0.95, the optimal rule prescribes that governments should spent 80 cents in the dollar of windfall commodity revenues in times of high prices, but only 8 cents when the shock is purely transitory, ρ p = 0. An implication is that seemingly similar commodities can have quite different optimal fiscal rules. For example, oil is one of the most commodities with the most persistent price shocks, and so the optimal rule involves spending around three quarters of excess oil revenues. However, for gas and copper the slightly less persistent price process involves the government should only spend half of above average commodity revenues. For sugar, Arabica coffee and bananas, the government should spend around a a quarter to a third of average average commodity revenues. See Appendix Table 7 for a list of commodities, the persistence of their prices and the implied value of fiscal rule coefficient θ p .
As in the analytical model of section 2, the persistence of the commodity price shocks does not affect θ a and θ y . The government should spend annually 9% of the assets above the long-run target for the SWF and insure households of most (θ y = −0.79) of the variation in non-resource income.

Extension 1: Debt Elastic Interest Spread and Precautionary Savings
The debt-elastic interest spread (ψ) is needed to make the model stationary, but also can provide a reduced-form way for our simple linear model to capture non-linear precautionary savings (as in Jeanne and Sandri 2016) and/or financial frictions which generate a realistic autocorrelation of the trade balance (Schmitt-Grohe and Uribe 2016). In our baseline simulations above we calibrate ψ = 0.01, which suggests that a 100% of GDP increase in SWF assets (debts) leads to a 1% decrease (increase) in interest rates. In general we need a higher debt elasticity spread to capture financial frictions or precautionary savings, but let's first consider the effect of a lower value of the debt-elastic interest spread.
A lower debt-elastic interest spread reduces the penalty of deviating from target assets as a share of GDP. As SSRs require large building up and drawing down of assets it also makes SSRs slightly more attractive. We can reduce the debt-elastic interest spread to ψ = 0.001 (the value used in Schmitt-Grohe and Uribe 2003), which means that a 100% of non-resource GDP increase in SWF assets (debts) leads to a 0.1% decrease (increase) in interest rates. With ψ = 0.001, the optimal policy involves drawing down (or building up) the SWF assets at half the rate of the baseline calibration, i.e. the optimal θ a = 0.05 (vs 0.09 the baseline OSR equal), though optimal θ p and θ y are mostly unchanged. BBR is still preferred to SSR, but the welfare loss difference is much smaller (around 1%).
Precautionary savings One caveat to the class of linear models considered in the previous sections is that they abstract from precautionary motives to save. In a model with precautionary savings and borrowing constraints, the government has an additional incentive to save in order to stay away from their borrowing limit and avoid drastic cuts in spending when a large shock causes the borrowing constraint to bind. As a result, there is a worry that linear models without precautionary savings might overestimate the optimal pro-cyclicality of fiscal policy. However, we show that the linear exogenous-income model of section 4 actually does a good job in capturing the main features of Jeanne and Sandri's (2016) non-linear model of precautionary savings and, if anything, underestimates (rather than overestimates) the optimal pro-cyclicality of fiscal policy.
Jeanne and Sandri (2016) (JS2016 hereafter) analyze the optimal management of reserves using an intertemporal fully optimal (non-linear) model of an open economy where a representative household consumes non-tradable goods and imported goods. The household can borrow from and lend to the government but does not have access to international financial markets. The government holds reserves (foreign assets equivalent to SWFs) to smooth the household's consumption path of imported goods. The government's problem involves trading off the opportunity cost of holding reserves (or carry cost) vs the risk of costly contractions in imports when negative external shocks cause debt constraints to bind. In the benchmark calibration they find that an optimal simple linear rule (similar to the one in this paper) can deliver more than 90% of the welfare gains from optimal non-linear reserve management. With their calibration to a lower level of shock persistence, the linear rule prescribes that the government should spend 24% of the reserves above the optimal level and 65% of export revenues above the estimated long-run level. *Calibrated to match the estimated optimal long-run target of reserves in JS2016. **Calibrated to match the 1st order autocorrelation of foreign reserves in JS2016. *** Our estimates of the 1st autocorrelation of the trade balance-to-output ratio for Algeria and T&T are 0.52 and 0.56 respectively.
Comparing the exogenous income model with JS2016. In this section, we increase the debt-elastic spread ψ until our model is able to replicate the first-order autocorrelation of net assets/reserves (public+private) in JS2016 with the OSR-Equal fiscal rule with the same calibration. We then check if the linear model of section 4 is biased towards more procyclical rules by comparing our rule with that in JS2016, and re-generating Table 2 with the higher value of ψ. But before we do this we need to recalibrate the predetermined parameters of our model so that they are in line with JS2016.
Panel A of Table 3 shows the calibration of key parameters in JS2016 and the new calibration (aimed to "mimic" JS2016) of the linear exogenous income model of section 4. 22 Note that the estimated persistence of the value of exports (ρ p = 0.78) is significantly lower than our baseline estimate for Algeria and Trinidad & Tobago (ρ p = 0.93). We set τ = 0 since there are no taxes in JS2016. We lowered the intertemporal discount factor (β = 0.95) and steady-state transfers (T r ss = 0.33) to match the long-run interest rate (r ss = 5.1%) and the optimal level of reserves (A ss /M ss = .22 ∼ 2.2 months of imports) in JS2016, respectively (shown in Table 3 Panel B). 23 22 JS2016 use annual data from a group of 24 developing countries (sample 1960 to 2014) provided by the World Bank's World Development Indicators to calibrate the path of detrended non-tradable output, value of exports and the country's interest rate. 23 Under the new calibration (aside from discrepancies generated by the linearity assumption) there are two main differences between the models: the elasticity of substitution between non-tradable and imported goods and the structure of the country's interest rates. In the exogenous income model, we implicitly assume that imported goods and non-tradable goods are perfect substitutes η = ∞. Second, the country's interest rate path is assumed to follow an AR(1) process in JS2016. In our model, the interest rate depends on the country's net debt, and its persistence With this new calibration, we have to set ψ = 0.45 to match the first-order autocorrelation of total assets of ρ A = 0.8 in JS2016. As the debt-elastic interest spread increases, assets become less persistent ( Figure 5 Panel A) because there is a strong incentive to avoid moving assets away from their steady state value. This is reflected in an increasing θ A (Figure 5 Panel B), which means the government increases (decreases) transfers more quickly as assets are above (below) their steady state level. This value of ψ is very large -45 times larger than the baseline value of 0.01 and implies that a 10% of GDP increase in debt (or reduction in assets) increases interest rates by 4.5ppts.
With ψ = 0.45 and OSR-Equal, our model matches very closely the optimal degree of procyclical spending of commodity revenues in JS2016 and the first-order autocorrelation of the trade balance-to-output ratio in the data (see Panel C of Table 3). This is remarkable given neither of these were calibration targets. Specifically, our model predicts that the government should spend θ p = 0.67 of export revenues above the long-run level -very close to the value in JS2016 -and 33% of accumulated assets, slightly more procyclical than JS2016's estimate of 24%. A higher debt-elastic interest spread increases the degree of pro-cyclicality of θ P because saving commodity revenues now leads to more unfavorable movements in interest rates. Moreover, the model predicts a first-order autocorrelation of trade balance-to-output ratio of ρ T B = 0.55 that is in line with the empirical evidence for many countries -we estimate 0.52 for Algeria, 0.55 for Trinidad and variance are endogenously determined. While relevant variables in JS2016 are expressed in terms of imported goods, this is comparable with our model because we assume all goods are perfectly substitutable.  Table 4 shows the welfare performance of optimal and classical rules when we use the higher debt-elastic interest spread consistent with JS2016 (ψ = 0.45), but applied to the baseline calibration which has higher commodity price persistence (ρ p = 0.93). Column 6 shows that adding a debt-elastic interest rate spread makes the OSR-Equal significantly more procyclical than the baseline case with low ψ. Most important, the government spends 77% of above-average commodity revenues here against 68% in the baseline in Table 2. Because more higher debt-elastic of interest rates make deviations of public assets from their long-run level more costly, the speed of convergence of public assets towards the target is much faster relative to the baseline case (θ a = 0.31 vs θ a = 0.09 in the baseline). Column 5 also shows that the targeted optimal simple rule is more procyclical relative to the baseline calibration and columns 1-4 show that the welfare gains of adopting a BBR (relative to SSR) increase with ψ.
In sum, we find that (i) the linear model of Section 4 with a reduced-form financial friction is able to capture much of the dynamics of more complicated non-linear models, and (ii) if anything our baseline simple linear model slightly understates the optimal pro-cyclicality of fiscal rules. In commodity exporting countries, changes in commodity prices often have a large impact on GDP. In both Trinidad & Tobago and Algeria, real GDP per capita rose as oil prices increased in the 1970s and early 1980s, fell during the period of low oil prices from the mid-1980s, and then growth returned as oil prices increased from around 2000 ( Figure 6). 24 After detrending both series, the correlation between log real GDP and log real oil prices is around 0.5 for Trinidad & Figure 6. Spillovers from Oil Prices to GDP Tobago and 0.7 for Algeria. A simple regression of log real GDP per capita on log real oil prices and a time trend yields a coefficient of around β Y P = 0.2 on oil prices, and is highly statistically significant. This suggests that in each of Trinidad & Tobago and Algeria, a 1% increase in real oil prices increases the level of GDP per capita by about 0.2%. As both countries are a fairly small share of global oil production, it is unlikely that causality runs from GDP shocks to oil prices.
We implement this spillover from oil prices to GDP in the exogenous income model in the simplest way: by assuming by that non-resource GDP increases by 0.2% when oil prices increase by 1%. We keep pure non-resource shocks as iid (ρ Y = 0), though non-resource GDP inherits much of the persistence of oil prices. 25 Note, however, that because the oil price shocks are much larger, they completely swamp variation in non-resource GDP with our default calibration of σ y , leading to a 95% correlation between output and oil prices (which is much higher than in the data). To reduce this correlation to around 50% (the value in the data), we also consider an alternative calibration with σ y = 0.22. From the analytical model, we know that as shock persistence increases (ρ Y → 1) the fiscal response to non-resource GDP shocks should become more pro-cyclical (less countercyclical) (Equation 2.3, θ Y → τ ). Indeed, keeping other fiscal rule components fixed at their values in the baseline model from the previous section, an increase in θ Y tends to improve welfare in the model with spillovers. However, as the increased persistence of non-resource GDP can be traced to commodity price shocks, the optimal policy is able to address its welfare effects through an increase in θ p , without changing θ Y . That is, when non-resource GDP responds to commodity shocks, it makes the optimal response of fiscal policy to commodity shocks even more pro-cyclical. This leaves θ Y to respond counter-cyclically to the temporary non-resource GDP shocks as before.
To this, Panels B and C of Table 5 reports untargeted OSRs and constrained-optimal simple rules -where θ y = −0.5 is fixed but the other coefficients are chosen optimally-for two alternative calibrations. Columns 6 and 8 show that the fully optimal response to more persistent non-resource GDP shocks is to increase the pro-cyclicality of the response to commodity shocks (↑ θ P ), and keep other aspects of the fiscal rule unchanged (θ a = 0.09 and θ y = −0.8) relative to the uncorrelated baseline in Table 2. Specifically, the optimal response to commodity price shock increases from θ p = 0.68 in the baseline above to around θ p = 1.05 when commodity shocks spill over to the non-resource economy. 26 A caveat is that an optimal counter-cyclical response to non-resource GDP is only important if σ y is not too small. Otherwise, the household is close to indifferent along a locus of points with a higher θ Y and lower θ P which generate the same fiscal response to commodity price shocks. For our default β Y P = 0.2, Figure 10 (in Appendix C), shows that the locus of points forms the line θ P = intercept−0.6×θ Y , where an increase in commodity price persistence increases the intercept. In Column 7 of Table 5, we show this numerically, by fixing the coefficient θ Y = −0.5 and choosing the other fiscal rule coefficients optimally (with a low σ Y ). This results in a fall in θ p from 1.05 to 0.88, but there is no change in the welfare loss (6.09% of steady state consumption). In Column 9 of the same table we repeat the exercise (fixed θ Y = −0.5 with optimal θ P and θ A ) with a higher standard deviation of non-resource GDP shocks (σ y = 0.22) and find the same fall in θ p from 1.05 to 0.88, but a higher welfare loss of 0.11% (from 6.31% to 6.42%), as responding counter-cyclically to non-resource GDP shocks is now quantitatively important.
Adding spillovers from commodity prices to non-resource GDP only has a small effect on the performance of classical rules (Panel A, of Table 5 with σ y = 0.04). Specifically, we still find that balanced budget rules are at least as good as structural surplus rules -in contrast to the literature where the SSRs is strictly preferred -and that BBR-CCY is close to optimal. Here the BBR and SSR generate a very similar welfare loss, whereas in Section 4 BBRs are strictly preferred. 27 One can see that the BBR is too pro-cyclical (when θ y = 0, θ p should be around 0.6), and as such introducing a countercyclical response to non-resource shocks substantially reduces welfare losses (close to the loss achieved by OSR-Equal). In contrast, SSRs are not pro-cyclical enough and so reducing θ Y increases welfare losses substantially, leading to a very large welfare gap between between BBR-CCY and SSR-CCY. 28 26 Comparing Table 5 Columns 6 and 8, note that the OSR-Equal does not depend on σ y . This is because θ y responds only to non-resource GDP shocks (with θ P targeting commodity price shocks and their spillovers), and hence the optimal coefficient only depends on persistence, not volatility. 27 Specifically, BBRs are marginally preferred to SSRs excluding tax revenues (Column 2, a difference of 0.08%), BBRs generate slightly higher welfare loss than SSRs including tax revenues (Column 1, a gap of 0.05%). We view these differences as small enough that the household is effectively indifferent across the rules, especially given that the welfare loss calculation is a second order approximation (rather than being exact). 28 The gap is much larger than before because non-resource GDP is much more volatile.

Extension 3: Real Business Cycle model
In the models of Sections 4-6 we assumed that non-resource GDP is exogenous. In this section, we set up a small open economy (SOE) real business cycle (RBC) model and show that our main results are robust in a model with endogenous output in the non-resource sector.
Model Overview. The SOE RBC model maintains the basic structure of the exogenous-income model of the Section 4 -two types of households, exogenous commodity income, a debt-elastic interest rate spread and fiscal rules based on transfers to HHs -but introduces endogenous capital accumulation, labor supply and production in the non-resource sector of the economy. Output in this sector is produced by competitive firms by combining labor hired from both types of households and capital rented from the Ricardian HH (HtM HHs don't own capital) using a Cobb-Douglas production technology. Volatility in non-resource GDP is driven by temporary TFP shocks (ρ z = 0). As is standard in the SOE literature, we assume GHH preferences which imply that labor supply is unaffected by variations in household wealth. 29 The capital share of income is α = 1/3, and the Frisch elasticity of labor supply is (η − 1) −1 = 2.2 (see Appendix D.1 for further details on the calibration and a description of the RBC model).
There are two main changes in the RBC model relative to the exogenous income model: the endogeneity of labor and the endogeneity of capital. To isolate each of these effects we first add endogenous labor in Panel A of Table 6 keeping the capital stock fixed at its steady state level (by assuming very high capital adjustment costs). Then in Panel B, we allow both labor and capital to vary. For all the results in Table 6 we also fix θ A = 0.1, which simplifies the exposition but usually has little effect on welfare (see the end of this section for a further discussion).
Endogenous labor supply (and fixed capital) The RBC model with fixed capital has very similar optimal rules as the exogenous income model without spillovers, allowing for some scaling of the coefficient on non-resource GDP. In Table 6, Panel A Column 1 we present OSR-Equal, when instead of responding to non-resource GDP, the fiscal rule responds to the fundamental TFP shock Z. One can see that these results are almost identical to the baseline exogenous income results in Table 2 without spillovers. The optimal rule involves spending 68% of non-resource GDP shocks (the same as in Table 2), and transfers are strongly countercyclical with respect to TFP, where the coefficient on TFP is θ Z = −0.9. With fixed capital, non-resource GDP is perfectly correlated with TFP, and uncorrelated with commodity price shocks. When the countercyclical term is expressed in terms of non-resource GDP, we get an identical allocation and value for θ P , but with θ Y = −0.5 (relative to −0.8 in Table 2).
The difference in the value of θ Z and θ Y from the baseline model is due to (i) the distribution of income across households; and, (ii) the fact that endogenous labor supply amplifies TFP shocks. First, note that even though the capital stock is fixed, a fraction α of any change in GDP accrues to capital owners (the Ricardian HHs). Hence a 1% decrease in non-resource GDP reduces the after-tax incomes of the HtM HHs by (1 − α)(1 − τ ) = (1 − 1 /3)(1 − 0.15) = 0.57 , which is 2 /3 of the fall in income of 0.85 in the exogenous income model in Table 2. This explains why instead of getting a coefficient on θ Y = −0.8 in Table 2, we get a coefficient of θ Y = −0.5 here (which is 2 /3 as large). Second, a 1% TFP shock will increase labor supply by (η − 1 + α) −1 (which is equal to 1.26% with our calibration) leading to an increase in GDP of η/(η − 1 + α) which is 1.85% with our calibration. Hence, the fiscal response to a TFP shock (θ Z ) needs to be 1.85 times as large as the fiscal response to deviations in non-resource GDP (θ y ) to generate the same sized transfer. 30 One can see that as in the main exogenous income model, the BBR is preferred to the SSR, and both rules improve marginally when they respond counter-cyclically to non-resource GDP/TFP shocks (Table 6 Panel A, Columns 3-6).   Variable Capital and Endogenous Correlation Between Non-Resource GDP and Commodity Prices. When capital is allowed to vary, the RBC model performs similarly to the exogenous income model with spillovers (in Section 6), though with a more subtle form of counter-cyclical response to transitory non-resource GDP/TFP shocks. Capital accumulation also amplifies the persistence of the commodity price shock, which makes variation in non-resource GDP highly persistent and means it is optimal to spend all of the commodity windfall (θ p = 1). Figure 7, the endogenous spillover from commodity price shocks to non-resource GDP is driven by the debt-elasticity of interest rates. A positive shock to commodity prices leads to an increase of aggregate (public+private) assets in general and consequently to a fall in interest rates in the home country (due to debt-elastic interest rates). Lower returns on international bonds provide the Ricardian household with an incentive to invest in physical capital which generates an output boom in the non-resource sector. The correlation is generally higher for SSR than BBR, as there is a greater accumulation of assets, and increases with ψ. In the baseline calibration (ψ = 0.01) the correlation between non-resource GDP and commodity prices is ρ y,p = 0.45 under BBR and ρ y,p = 0.58 under SSR, which is similar to a correlation of 0.5 for Trinidad & Tobago and 0.7 for Algeria in the data (Section 6). Figure 11 in the Appendix highlights this mechanism by showing the impulse response of key variables to a commodity price shock in the RBC model.

As shown in
Panel B of Table 6 shows that the results of the exogenous income model with spillovers are quantitatively robust in full RBC model with variable capital, conditional on the fiscal rule responding to TFP (rather than non-resource GDP). The first column of Panel B shows that the optimal rule in the RBC model is extremely close to the optimal rule in columns 6 and 8 of Table  5: the government should spend all of their commodity revenue (θ p ≈ 1) and respond countercyclically to temporary TFP shocks with a coefficient of θ Z ≈ −0.8. This is almost identical to the BBR-CCZ rule, which is preferred to SSR-CCZ (BBR-CCY is also close to optimal in Table 5 and is preferred to SSR-CCY). In the full RBC model, the household strongly prefers the BBR to SSR with respect to commodity revenues (the welfare loss is around more than 50% larger with SSR than BBR). This is what we would expect given the high persistence of commodity prices, but Figure 12 in the Appendix shows that the cut-off above which the BBR is preferred is much lower in the RBC model (ρ p > 0.74 in the RBC model, relative to ρ p > 0.9 in the exogenous-income model), perhaps due to extra persistence of non-resource GDP through capital accumulation. 31 When the fiscal rule is expressed in terms of endogenous non-resource GDP rather than TFP (Table 6, Panel B, Column 2), the optimal θ P ≈ 1 is unchanged, but the response to non-resource GDP is almost acyclical (θ y = −0.05), and the welfare loss is slightly larger than for the optimal rule in terms of TFP. Capital accumulation -due to changes in interest rates, and assets and ultimately commodity prices -means that non-resource GDP is no longer as highly correlated with temporary non-resource TFP shocks (the correlation is now around 0.25). In addition, because endogenous capital accumulation makes non-resource GDP is even more persistent than commodity prices, the government cannot just increase pro-cyclicality of the response to commodity shocks and then respond counter-cyclically to non-resource GDP (as in the exogenous income with spillovers). 32 This suggests that policymakers need to be careful to respond to the fundamental shocks affecting the economy, rather than noisy proxies like non-resource GDP. 31 One difference between models is that in the exogenous spillovers model, HHs are close to indifferent between BBR and SSR (rather than strongly preferring BBR as they do in the RBC model). This could be because in the RBC model, the SSR increases spillovers from commodity prices to non-resource GDP -which then makes the economy more persistent and hence the SSR worse. 32 This is, even after removing the effect of commodity prices, non-resource GDP is not that highly correlated with TFP shocks in the RBC model with variable capital.
Optimal spending of SWF assets (θ A ) For most of this section, we fixed θ A = 0.1, which has almost no effect on the results with fixed capital (Panel A of Table 6) or when the fiscal rule responds to TFP shocks. 33 However, in the full RBC model (flexible capital) and when the fiscal rule is in terms of deviations in non-resource GDP, the optimal rule suggests the government should spend more than a third of SWF assets each year (θ A = 0.36), mainly to keep public assets and interest rates near their steady state level (not reported). With less variation in public assets and interest rates, non-resource GDP becomes is a better proxy for transitory TFP shocks, and hence the coefficient on θ y becomes more countercyclical and similar to the value in the exogenous income model. 34 The optimal response to commodity price shocks remains strongly pro-cyclical θ P ≈ 1.

Conclusions
In this paper, we re-evaluate the result that commodity exporters should save most commodity price windfalls using several simple models where a share of the population is unable to borrow or save, and fiscal policy takes the form of transfers directly to households. Unlike much of the literature, we find that the optimal fiscal rule is surprisingly procyclical, at least with respect to commodity revenues. Specifically we find that the optimal rule involves spending around two-thirds (or even up to 100%) of above-average oil revenues, though only around half of above-average gas or 33 Specifically the optimal θ A in these cases is 0.09 − 0.13 and the welfare loss is the same as optimal θ A to three significant figures. 34 Although θ y = −0.36 is still much lower than θ y = −0.8 in the exogenous income models, recall that much of this is because the HtM HH is shielded from over 40% of variations in non-resource GDP due to capital income (which accrues to Ricardian HHs) as well as the tax system. copper revenues (as those commodities have less persistent price shocks). As the rule is symmetric, this also means cuts in transfers of the same size when commodity prices fall. The reason for the relatively pro-cyclical rule is that many commodity price shocks are highly persistent, and this means permanent income (which should drive consumption) is quite similar to current income. In contrast, we find that non-resource shocks (which are less persistent) should generally be smoothed with counter-cyclical transfers, though transitory non-resource income shocks only drive a small proportion of consumption volatility in the model.
Nonetheless, our results are subject to several caveats, with the most important being that we only look at the effect of fiscal rules on consumption volatility. 35 While consumption volatility is an important determinant of the optimal rule in reality, it is not the only one. Chile's original fiscal rule, for example, was largely designed to smooth the volatility of fiscal instruments rather than consumption, presumably because fiscal volatility interrupted the efficient operation of government. If public investment is funded from commodity revenues, then balanced-budget-type rules will lead to inefficient volatility in public investment: a fall in commodity revenues will leave half-finished dams, roads and bridges. There might also be important political economy consequences of fiscal volatility -for example it is generally more politically difficult to cut spending than to increase it, meaning that variable commodity revenues can lead to a "ratcheting" up of spending that quickly becomes unsustainable. While our model (and results) include none of these forces, they do clarify that if structural surplus fiscal rules are optimal, they should be justified along those lines rather than in order to smooth consumption of liquidity constrained (HtM) HHs. highly counter-cyclical or pro-cyclical transfers rule are feasible policy choices for the government. The second condition adds a debt-elastic interest rate in the model to remove the random-walk behavior of the consumption of Ricardian household, as in Schmitt-Grohe & Uribe (2003).
Lemma 2. Consider the model (B.1)-(B.9), assume θ a = 0 and ψ → 0. In a unique and stable equilibrium, the consumption path and welfare of the Ricardian household is independent of the transfers it receives from the government {θ a , θ p , θ y }.
Lemma 2 is an adaptation of the classic Ricardian equivalence result in Barro (1974) for our heterogeneous-agent setup. Ricardian agents consume out of their permanent income, and to the extent that lump sum transfers financed by public debt issuance do not affect the agent's intertemporal budget constraint, fiscal policy cannot influence equilibrium allocations in a non-trivial fashion. The introduction of HtM households breaks the classical Ricardian equivalence (e.g. Galí et al (2007)). In our model, transfers to one type of agent affect the other through the effects on public assets (if θ a > 0). However, if the government commits to a particular transfer rule to the HtM HH which does not depend on the level of public assets (θ a = 0), then transfers between the government and the Ricardian HH do not affect the intratemporal budget of the Ricardian HH and hence the Ricardian equivalence applies again. B.3. Optimal Simple Rule. In Figure 9, we show how the welfare loss changes as we change the fiscal rule coefficients one at a time around the Optimal Simple Rule (which is indicated by a vertical line). First, one can see that optimal simple rule is optimal, in that it leads to the lowest welfare loss (at least locally). Most interesting is the bottom RHS plot which shows that as the government saves more commodity revenues on behalf of the HtM HH (θ P → 0), the welfare loss increases from about 2.4% of steady state consumption to almost 3%, reinforcing the point that it is optimal for HtM HHs to spend rather than save commodity revenues when they are highly persistent.   Table 2 which minimizes the welfare loss. Top row: fiscal rule coefficients for Ricardian HHs. Bottom row: fiscal rule coefficients for HtM HHs.
Appendix C. Spillovers from Commodity Prices to non-resource GDP Figure 10 shows combinations of θ Y and θ P that approximately maximize welfare (minimize the welfare loss) when ρ p is calibrated to match the persistence of the price shock of selected commodities (here β Y P = 0.2 and σ Y = 0.04). We find that fixing θ A = 0.09 the welfare loss is minimal along all points of the line θ P = intercept − 0.6 × θ Y for all ρ p . The intercept of each indifference curve is increasing in the persistence of the commodity price shock, because more persistent shocks requires more pro-cyclical fiscal policy (either in terms of θ P or θ Y ). Also, the red dot (θ Y = −0.77 and θ P = 0.68) and the black dot (θ Y = −0.77 and θ P = 1.03) display the OSR equal in the baseline calibration and in the calibration with correlated shocks, respectively. One can see that the optimal response to commodity price shocks becomes much more pro-cyclical when shocks are correlated. The RBC model is based on the exogenous income model of Section 3 augmented to introduce endogenous production in the non-resource sector of the economy. To be brief, we will only discuss the main differences between the RBC model and the exogenous-income model. First, preferences are different: here we use Greenwood-Hercowitz-Huffman (1988) (GHH hereafter) preferences to remove wealth effects on labor supply (common in small open economy RBC models). Each type of household chooses labor supply and consumption to maximize utility subject to a budget constraint, where (η − 1) −1 is the Frisch elasticity of labor supply and γ the coefficient of risk aversion (equivalent to σ in the exogenous income model in the main text).
The Ricardian household can smooth consumption by accumulating two types of assets: physical capital and one-period bonds traded internationally at interest rate R t . Physical capital accumulation is subject to a depreciation rate and adjustment costs according to equation (D.2), the Ricardian household's budget constraint is given by, where C t is per Ricardian household consumption, B t is per Ricardian household stock of bonds, W t is the wage rate and T r t is per Ricardian government transfers and R k is the rate of return on capital. The Ricardian household maximizes Equation (D.1) subject to (D.3) and (D.2). The first-order conditions of this problem are, where we dropped the upper index ( ) from (D.4) because labor supply is the same across households in equilibrium. The Hand-to-Mouth household has no access to any sort of financial instrument and hence is subject to the period-by-period budget constraint, where T r t is per HtM household government transfers. Non-resource goods are produced competitively using labor and capital. Firms maximize profits choosing labor and capital inputs subject to a Cobb-Douglas production function, where Total Factor Productivity, Z t , follows an AR(1) process with persistence ρ z and standard deviation σ z . Note that K t−1 is a predetermined variable at time period t. Profit maximization yields the first-order conditions, where τ is a sales tax rate levied on firms. As in exogenous income model, all income from commodity exports accrues to the government. The government's budget constraint is: A t = R t−1 A t−1 + QP t + τ Y t − ωT r t − (1 − ω)T r t (D.11) and the debt-elastic interest-rate spread is R t = R w t + ψ(e −(1−ω)Bt+At−(1−ω)Bss−Ass) − 1) It is useful to define GDP, trade balance and the current account, Up to a second order, welfare losses using the GHH utility function can be approximated by ζ.  Table 8 summarizes the calibration. Note that C P C 1,ss = 1.2292, C P C 2,ss = 1.0625, Y ss = 1, Y R = 1/3, K SS = 2.  (Table 1) D.3. IRF in the RBC model. Figure 11 shows how a commodity price shock in the RBC model increases in aggregate (public+private) assets and reduces interest rates (due to the debt-elastic spread) which then boosts capital accumulation and output non-resource sector.
D.4. The Importance of Persistence in the RBC model. Figure 12 plots the welfare loss of the SSR and BBR changing the persistence of commodity price shock (adjusting the variance of the shock as the persistence increases so the the variance of the commodity price (V (p t ) = σ 2 p /(1 − ρ 2 p )) is kept constant). Note that the cutoff 0.74 where BBR is better than SSR has moved to the left in comparison with the exogenous income model (0.9).