Policy Research Working Paper 10854 Electricity Transition in MFMod A Methodological Note with Applications Charl Jooste Florent McIsaac Alexander Haider Jobs and Economic Growth Global Practice July 2024 Policy Research Working Paper 10854 Abstract This paper describes power sector modeling methodologies This paper describes two distinct methods to overcome this for the World Bank’s macrostructural model—MFMod. constraint: (i) using a more granular representation of the Macrostructural models generally do not model sectors, production function and (ii) linking the macrostructural such as the power sector, in detail, limiting their capac- model with the World Bank’s electricity planning models. ity to represent deep system transformation (for example, These methods provide a more nuanced technical repre- low-carbon energy transitions). The main constraints to sentation of deep transformations, enabling discussions on adequate sector modeling are data availability and tech- their macroeconomic consequences. The paper provides nological representation of the power system. Time-series results for Mauritania and South Africa. These methodol- data for specific production factors across sectors do not ogies serve as a blueprint for macroeconomic modeling of exist consistently for most countries in World Bank models. energy transitions in this class of models. This paper is a product of the Jobs and Economic Growth Global Practice. It is part of a larger effort by the World Bank to provide open access to its research and make a contribution to development policy discussions around the world. Policy Research Working Papers are also posted on the Web at http://www.worldbank.org/prwp. The authors may be contacted at cjooste@worldbank.org, fmcisaac@worldbank.org, and ahaider@worldbank.org. The Policy Research Working Paper Series disseminates the findings of work in progress to encourage the exchange of ideas about development issues. An objective of the series is to get the findings out quickly, even if the presentations are less than fully polished. The papers carry the names of the authors and should be cited accordingly. The findings, interpretations, and conclusions expressed in this paper are entirely those of the authors. They do not necessarily represent the views of the International Bank for Reconstruction and Development/World Bank and its affiliated organizations, or those of the Executive Directors of the World Bank or the governments they represent. Produced by the Research Support Team Electricity Transition in MFMod: A Methodological Note with Applications∗ Charl Jooste1 , Florent McIsaac1 , Alexander Haider1 1Macroeconomics, Trade & Investment Global Practice, World Bank, Washington, DC JEL Classification: C10, C50, Q43 Keywords: Economic modeling, electricity transition, carbon pricing ∗ We thank Claire Nicolas, Etienne Espagne, Unnada Chewpreecha, Heather Ruberl, Frederico Gil Sander, Stephane Hallegatte, Andrew Burns, and Manaf Touati for their helpful comments. The authors thank the multi-donor Climate Support Facility for funding this work. 1 Introduction The climate-aware version of the World Bank’s macrostructural model (MFMod) used in this paper is based on Burns et al. (2019) with an application to Pakistan [named PAKMod, see Burns et al. (2021)]. PAKMod describes several climate features related to mitigation of the energy sector through a carbon tax, as well as physical risk modeling and adapta- tion/resilience to floods and how they are linked to an otherwise standard macroeconomic model. Several enhancements were made to the methodology used in PAKMod during the first phase of the Country Climate Development Report (CCDR) process and rolled out across different countries. The paper describes changes to the modeling of power sector decarboniza- tion; first by extending the PAKMod framework to further endogenize energy dynamics into the macroeconomic system, then by proposing an alternative approach based on soft-linking a techno-model1 to the macro framework. For the CCDRs, the modeling of the power sector has been enriched in comparison to previous exercises. In PAKMod energy demand and supply were determined from a macroe- conomic setup and solely dependent on the elasticity of substitution between fossil fuels and renewables, providing a simple and tractable technological landscape of the power sector that responds endogenously to the macroeconomic environment. During the CCDR process, MF- Mod was coupled with the World Bank Electricity Planning Model [EPM] (Chattopadhyay et al., 2018). This soft-linking approach reduced the reliance on the macroeconomic system to derive electricity supply (and thus the power mix with capital vintages as well as more granular technological representation) and demand. Instead, aggregate energy supply from renewables and fossil fuels was based on per-unit electricity production within a country, while accounting for distribution losses and the investments required to meet new demand. The soft-linking approach takes the concept of stranded assets into account as well. Stranded assets are assets that are no longer economically viable and are therefore written off balance sheets. In the context of decarbonization, stranded assets can include fossil fuel- based power plants, oil and gas reserves, and other infrastructure that is no longer needed as the world transitions to a low-carbon economy. By using technoeconomic modeling, we keep track of capital vintages with path-dependency. This means that the model accounts for the fact that past investments in fossil fuel infrastructure can still have an impact on the future, even if those assets are no longer used. For example, a coal-fired power plant 1 Applications are based on the World Bank’s electricity planning model in this paper. However, this method can be extended to any techno-economic model. 1 that is no longer operational may still be counted in the total power supply capacity of a country, even if it is not actually generating electricity. This approach is important because it helps to ensure that the full cost of decarbonization is taken into account. By accounting for stranded assets, the model can provide a more accurate assessment of the economic costs and benefits of different decarbonization pathways. This paper describes three modeling features. The first feature focuses on the modeling of sectors in macrostructural models. Sectoral elements are usually not modeled in large macrostructural models due to data limitations. We discuss several model design consid- erations that make sectoral modeling still useful. The second focus of the paper describes the endogenous power sector modeling. This setup can be ported to other models like MF- Mod without a large cost and still provide tractable modeling outputs for energy transition shocks. We discuss this approach since power sector models are not always available for most countries. The third part of the paper describes how a macrostructural model like MFMod can be linked to technoeconomic energy models. The rest of the paper summarizes the main changes from PAKMod. In Section 2 we start by specifying changes made to sectoral accounts. Section 3.1 discusses emissions channels and how electricity is modeled. Section 3.2 describes the soft-linking approach to EPM. Section 4 summarizes simulation results of a carbon tax in South Africa and the soft-linking approach to EPM for Mauritania. Finally, Section 5 concludes. 2 Specifying sectoral accounts MFMod (Macro-Fiscal Model) described in Burns et al. (2019), is a macrostructural model (MS). Its modeling methodology can be described as a hybrid New-Keynesian model, in essence following the theoretical design of DSGE frameworks with short-run dynamics guided by an econometric framework. Unlike CGE models, MS models require a comprehensive set of time-series data. Indeed, while most CGE models only require a snapshot of the economy (i.e., one year of data), MS models require many data points in time for robust parameter estimation. Sectoral modeling is often identified as a weak aspect of MS models as it relies on simple functional forms. It stems from the fact that time-series data for capital, labor, rents, wages and intermediate inputs do not always exist. In contrast, CGE models build sectoral production functions where aggregate labor demand and capital will be allocated to sectors based on standard first-order conditions, making the dynamics more theoretically driven. 2 Assuming that time series data for factor market variables at the sector level is not available,2 this section describes how sectoral representation of MS models can be improved. In MFMod, each country has a minimum of three sectors: agriculture (PtAGR YtAGR ), industry (PtIN D YtIN D ), and services (PtSRV YtSRV ), where P i is the value added deflator and Y i is value added at constant prices for sector i. Input-output (IO) tables are available for many (but not all) countries for certain years, enabling us to establish a top-down correspondence between intermediate demand and changes in sectoral value added. As described in Burns et al. (2021), the integration of an IO table improves the inter- sectoral responses to shocks. However, this option remains unsatisfactory given that most of the shocks occur from the demand side and are then mapped to sectors, precluding us from modeling sectoral shocks that then translate back to the demand side of the economy. For example, a shock to water tariffs should affect agriculture demand for water as well as manufacturing and in turn affect aggregate demand through the price channel. These relative price shifts are not accounted for in previous methodologies. One way to include relative price shifts, is to model the sector in the form of translog cost functions (Berndt and Wood, 1975), which will be the starting point of the specification of sectoral accounts under the constraint that we do not have data on wages and rental rates. In Burns et al. (2021), aggregate real value-added (GDP at basic prices), Y F CST , is already determined. Given that the demand side of the economy remains the same as in Burns et al. (2021), total value-added is simply written as the market price GDP, Y M KT P , minus net real indirect taxes, (N ITt ): YtF CST = YtM KT P − N ITt . (1) The GDP deflator at basic prices, PtF CST , remains a function of marginal costs, M Ct , and the output gap, Yt : ∆ ln PtF CST = F M Ct , Yt . (2) This allows us to move from aggregate value-added to sectoral value-added. We define sectoral shares to total value added as: Pti Yti := ωi,t . (3) PtF CST YtF CST 2 When factor market data exist at the sector level, one can proceed to build out sector specific production functions and analytical formulas for marginal costs. 3 Note that the sum of the shares equals 1: i i i Pt Y t ωi = = 1. i P F CST Y F CST The translog cost function allows us to estimate equations for each of the shares as a function of relative prices and incomes. Note that the trans-log cost function is typically used for estimating income elasticities and own and cross price elasticities for factor prices, for which we do not have data for. However, we can exploit the following properties of the production activities. Aggregate production is a function of total factor productivity (At ), labor (Nt ), and capital (Kt ), which is the sum of each sector’s capital, labor and weighted TFP: YtF CST = G (At , Kt , Nt ) = G γi Ai,t , Ki,t , Ni,t . (4) i i i Note that γi is the share of sector i TFP in aggregate TFP. The aggregate resource constraint is the summation of sectoral factor costs, or the wage bill (Wi,t Ni,t ) plus gross operating surplus (Ri,t Ki,t ): PtF CST YtF CST = (Wi,t Ni,t + Ri,t Ki,t ) . (5) i We also know that sectoral value-added is the sum of sectoral wage bills and gross oper- ating surplus, or, Pti Yti = Wi,t Ni,t + Ri,t Ki,t . (6) In real terms, total value-added is produced via a production function, but the quantities summed up across sectors also yields total value added: YtF CST = YtAGR + YtIN D + Y SRV . (7) Each sector has its own production technology, Gi : Yti = Gi (Ai,t , Ki,t , Ni,t ). If we assume that G(·) is a concave technology, then, after deriving the standard first-order conditions, marginal costs will be represented as a function of wages, capital rents, and TFP (or the dual cost function), Pi = G ˜ i (Wi , Ri ). Taking a second-order Taylor-series expansion of the unspecified aggregate dual cost function C (YtF CST , Wt , Rt ) yields the translog cost function. For the aggregate economy- 4 wide setting the translog cost function (with wages and rents as factor prices) is: lnC YtF CST , Wt , Rt = α0 + αy ln YtF CST + βL ln (Wt ) + βK ln (Rt ) 1 + βKL ln (Rt ) ln (Wt ) + βLK ln (Wt ) ln (Rt ) 2 (8) 2 2 2 + βyy ln YtF CST + βLL ln (Wt ) + βKK ln (Rt ) + βLy ln YtF CST ln (Wt ) + βKy ln YtF CST ln (Rt ) + εt . From Shephard’s lemma we can write the capital and labor shares as: ωL,t = βL + βLL ln (Wt ) + βLK ln (Rt ) + βLy ln YtF CST + ϵL,t , (9) ωR,t = βK + βKL ln (Wt ) + βKK ln (Rt ) + βKy ln YtF CST + ϵK,t . The cost function and the share equations can be jointly estimated to obtain the elasticities of substitution and the income parameters of the production function (note that the parameters in Equation (9) correspond to the parameters in Equation (8)). Unfortunately, we do not observe capital, capital rents, labor and wages at the sector level. We mainly observe value-added by sector and the price deflator by sector. We exploit the identities above to write out share equations for each sector, with the implicit assumption that the sectoral price deflators are functions of sectoral wages and capital rents. The general cost function takes the following form: C YtF CST , Wt , Rt = C YtF CST , ωi,t Pi,t = ˜ i (Wi,t Ri,t ) . ωi,t G (10) i i The general form of the non-homothetic translog cost function now becomes: ln PtF CST YtF CST = β0 + βy ln YtF CST 1 2 + βyy ln YtF CST + βi ln(Pi,t ) 2 i (11) 1 + βij ln(Pi,t )ln(Pj,t ) + βiy ln YtF CST ln(Pi,t ) + εt . 2 i j i where the error term is normally distributed, εt ∼ N (0, σ 2 ), and {β0 , βy , βyy , βi , βij , βiy } are parameters to be estimated. Note that this resembles the standard translog cost function, where output is modeled as a function of wages and capital rents. However each sector’s price is a function of the nominal marginal cost. The equation above captures the wage and 5 capital rent from each sector. This allows us to estimate sectoral impacts of price changes. The share equations (ωi,t ) should be estimated jointly with the cost equation:3 ωi,t = αi + βij ln (Pj,t ) + βiy ln YtF CST + ϵi,t . (12) j It is assumed that prices are homogeneous, which implies several linear restrictions to estimate the system: αi = 1, i βij = 0, βij = 0, i j βiy = 1. i Given that the shares add up to 1, we drop one equation.4 From these equations we can derive own and cross price elasticities of demand. A shock in sector j will thus have an impact on sector i. We make one additional modification to the equations. Sectoral prices in MFMod are not functions of factor prices (due to non-existent data). However, we map aggregate marginal cost to each value-added deflator. The estimated coefficients should be a proxy for the weight of aggregate wages and rental rates in each sector. This assumption requires us to change the factor cost price as weighted sums of each sectoral price: ln PtF CST = ωi,t ln (Pi,t ). (13) i Aggregate factor price is now a function of sectoral shares (ωi,t ) that shift due to price and income effects. Each factor price equation is now re-written as a function of the aggregate ∗ marginal cost, output gap and inflation expectations (πt ), where the sensitivity of sectoral prices are unique: 3 Note that in some country cases we have a small number of observations (in this case sectors) relative to time periods, N << T , which may render biased estimates. 4 By dropping one equation, both the cost function and share equation need to be modified. The mod- ification entails writing each price relative to the price of the dropped variable, in this case the service sector. 6 ∗ ∆ ln (Pi,t ) = αi + θi ∆ ln (Pi,t−1 ) + (1 − θi ) [λi ∆ ln (M Ct ) + (1 − λi ) πt ] + βi Y t + εP i,t . (14) Given that we do not model factor prices (wages and rents) at the sector level, we make the strong assumption that factor markets equalize across the sectors. While the transition dynamics of each sector price will be different, the balanced growth path will be the same and will grow in line with inflation expectations. Note that aggregate marginal costs grow at the rate of the inflation target in the long run. Finally, it is now easy to solve for the level of our sector variables. For sectoral value- added at constant prices simply multiply the sector shares with total value-added: Yi,t = ωi,t YtF cst . (15) 3 Mitigation channels We provide an update on the modeling of the power sector in MFMod. Previously all renewables were lumped into a single category. Now, different renewable sources are included. Further changes reflect the soft-linking of MFMod and EPM in cases where a power planning model exists. First, we describe the endogenous demand for energy, the import and production de- cisions. In the second part of this section, we describe the soft-linking to power planning models. Electricity production, imports and consumption data are typically available for energy quantities (e.g., terajoules, or kilowatts). The description in PAKMod converted energy units into national account equivalents. While this was useful, it needlessly complicated matters. It was also assumed that supply met demand at any point in time, an unreasonable assumption for countries struggling with energy generation. Consequently, this section simplifies the energy representation and introduces supply constraints into the model. 3.1 Determining energy production and consumption 3.1.1 Aggregate production This section describes the implementation of a power sector module without recourse to a technoeconomic energy model. Four distinct features are important: (i) Modeling electricity 7 demand; (ii) modeling electricity production; (iii) modeling electricity imports and (iv) mod- eling capacity constraints. Electricity demand is the sum of final and intermediate demand. The previous section described the general sectoral setup, which allows us to also model each sector’s demand for electricity. Final consumption is split between electricity and other types of consumption using a CES nest – i.e., electricity demand for final consumption depends on the elasticity of substitution, while intermediate electricity demand depends on fixed shares derived from an IO table. Electricity production is the sum of electricity value-added and intermediate supply. Value-added should be derived from labor and capital, or OPEX and CAPEX. Unfortunately, capital and labor data for the electricity sector in most countries are not available (even if value-added is). The production of electricity thus takes the same form as the modeling of the other sectors as in the previous section. This is an obvious short- coming since making sector specific investment choices are not that easy in this setup and keeping track of different capital vintages by electricity production unit is not feasible (i.e., modeling stranded assets is not straightforward). In the model, excess demand is imported up until the point capacity is met. I.e., capacity is a constraining factor and is assumed to be exogenous. These assumptions are relaxed in the soft-linking approach in the next section. The soft-linking approach tracks CAPEX and OPEX costs explicitly and hence also capital vintages. Aggregate economic output is produced using capital (K ), labor (N ) and electricity (QEt ). The units for capital are in local currency units (LCU), for employment we use the number of people employed and for electricity we use the amount of kW h available for supply (installed capacity). In the modeling it is assumed that electricity generation and capital are complements. This means that disruptions in electricity supply have a direct and indirect effect on output. The aggregate production function (or potential throughput, not GDP because we are adding energy) is written as a CES function between capital and electricity and as a Cobb-Douglas technology for capital and energy with labor (see Allcott et al. (2016) and Fried and Lagakos (2023) for examples): α ρ Yt∗ = At ω1 Ktρ + ω2 QE t ρ Nt1−α . (16) Using the aggregate resource constraint and the first-order conditions, marginal costs are now an increasing function of wage costs (W ), rental costs (R) and electricity costs (P E ): 1 M Ct = F W, R, P E . (17) At 8 3.1.2 Production of energy Section 2 described how sectors are modeled. This holds true for the electricity sector too in the absence of data on fixed and variable factors of production. Electricity production is a translog cost function, where the share in output is explicitly modeled E Pti YtIO,E ωt = αE + βi ln + λ ln , (18) i=1 PtSRV YtF CST i Pt E where ωt is the share of electricity in total value-added and i=1 βi ln SRV Pt represent the YtIO,E coefficients on relative prices (cross and own-price elasticities), while ln YtF CST measures the impact of final demand (approximated using the input-output table) on electricity pro- duction. If the IO tables reflect that household consumption is the main user of electricity, then the household weight in YtIO,E will be larger. In value-added terms, we can then get total energy value-added: E F CST YtE = ωt Yt . (19) The price of electricity (in this case the deflator) is an aggregation of renewable prices (PtREN which will be a function of the levelized cost of electricity (LCOE )), and fossil fuel prices (PtF OSS which will be a function of LCOE estimates, or a commodity price proxy in cases where LCOE estimates are not available), all indexed to a value of 1 in the base year. Given that fossil fuels and renewables are substitutes we express the price aggregation as: 1 1−σ1 1−σ1 1−σ1 PtE = ω1 PtF OSS + ω2 PtREN . (20) Fossil fuel prices are a weighted sum of oil prices (PtOIL ), coal prices (PtCOL ) and gas prices (PtGAS ): 1 1−σ2 1−σ2 1−σ2 1−σ2 PtF OSS = ω3 PtOIL + ω4 PtCOL + ω5 PtGAS . (21) Renewable price is a weighted sum of wind prices (PtW N D ), solar prices (PtSOL ), hydro prices (PtHY D ) and biofuels (PtBIO ):5 1 1−σ3 1−σ3 1−σ3 1−σ3 1−σ3 PtREN = ω6 PtW N D + ω7 PtSOL + ω8 PtHY D + ω9 PtBIO . (22) The prices of the respective indices are exogenous and assumed to be determined by 5 The list of renewables may also include geothermal or other sources depending on data availability. 9 LCOE (in kW h), or international commodity price (tons of oil equivalent, toe) assumptions plus any carbon taxes or subsidies. For j the price can be expressed as:6 ln Ptj = αP + ln F Xt · LCOEtj 1 − τtj , (23) where F Xt is the bilateral exchange rate to the dollar. The price can be modified by including a subsidy, τtj which will be represented in terms of toe units. A renewable subsidy would lower the price of renewables relative to fossil fuel prices and prompt a substitution towards renewable use. 3.1.3 Consumption Demand for electricity is mainly derived from household consumption choices and from electricity used as an intermediate input (which may be large). Deriving energy (electricity) demand from final demand components is a standard feature in many CGE and integrated assessment model (IAMS), see, for example, Loulou and Labriet (2008) for the TIMES model and Böhringer and Rutherford (2013), He et al. (2011), and Holmøy (2005) for CGE approaches. Aggregate consumption in MFMod remains unchanged from previous versions. It is a function of disposable income (nominal wage bill (Wt Nt ) adjusted for taxes (τtN ) and deflated by the consumption deflator (PtC ), transfers (GT t RN ), remittances (REM Tt ) and n the real interest rate (it − πt − rt ). It is still determined by the standard MFMod equation:   1 − τtN W Nt + GT t RN n  t Ct = f  , REM Tt , (it − πt − rt ) . (24) PtC The consumption bundle for MFMod contains electricity consumption (CtE ) and other consumption (CtO ). They are represented as substitutes. The first-order condition yields the demand for electricity as a function of the relative price of consumption to electricity prices: σ PtC CtE = γ1 Ct , (25) PtC,E where σ is the constant elasticity of substitution, γ1 is the share of electricity in the con- sumption basket, and PtC,E is the (market price based) energy price index.7 The expression 6 In some cases, one may prefer to use the index of the cost of production because the cost is likely to be closer to the infrastructure you already have, not the infrastructure you could have (based on the LCOE ). 7 See Equation (28) for the definition of PtC,E . 10 above is modified in MFMod to separate short vs. long run effects: PtC −1 ∆ ln CtE = γ1 + θ ln CtE −1 − ln (Ct−1 ) − σ ln C,E Pt−1 (26) PtC + β1 ∆ ln (Ct ) + β2 ∆ ln + εCE t . PtC,E Note that −1 < θ < 0 is the error correction parameter, σ is the long run elasticity of substitution and β2 is the short run elasticity of substitution. The aggregate price index for consumption remains the same as in PAKMod: 1 1−σ 1−σ 1−σ PtC = γ1 PtC,E + γ2 PtC,OT H , (27) where other prices are the weighted sum between producer and import prices. Lastly, energy prices are a function of the producer energy price plus any taxes or levies: PtC,E = PtY,E 1 + τtLevy . (28) 3.1.4 Determining physical quantities Given that we have solved for the demand for electricity (CtE ) we can approximate the quantities of electricity consumed (in toe or tW h). Total electricity consumed in toe will grow in line with consumption of electricity and intermediate inputs at constant prices: ∆ ln QE t = ∆ ln CtE + βi Yi,t , (29) i i.e., the growth rate in physical energy demanded for electricity is equal to the growth rate in total electricity consumption plus a fixed coefficient of electricity use (β ) by each sector (i). Since we are interested in local emissions sources, we need to distinguish local produc- tion from imported electricity. Local production of electricity is a function of value-added electricity at constant prices: ∆ ln QE D,t = ∆ ln Yt E , (30) which implies that imported electricity is the residual between total electricity consumed 11 and domestic electricity produced: QE E E M,t := Qt − QD,t . (31) Given that we have the solution for each locally produced fossil fuel and renewable price index we can then determine the demand for renewables and fossil fuels. The quantities for fossil fuels are: σ1 PtE QF t OSS = ω1 QE D,t , (32) PtF OSS i.e., aggregate fossil fuel demand (only that which is used in electricity production) is a CES of the price of fossil fuels (derived above) and the price of electricity. Renewable demand in the model is the residual after subtracting fossil fuel demand from total electricity demand:8 QREN t = QE F OSS D,t − Qt . (33) Now it is simply a matter of allocating produced quantities to sources. The demand for domestic fuel electricity is: σ2 PtF OSS Qj t = ωh QF t OSS , (34) Ptj where j ∈ {oil, coal, gas} and h ∈ {3, 4, 5} . The same logic holds for different renewables. The equations show that it is relative prices that cause the transition. In the first nest, we have the relative price of fossil fuels vs. renewables and in the second nest the type of fossil fuels or renewables. For energy transition one would need a large elasticity of substitution to move away from fossil fuels, and a large increase in relative prices. A large carbon tax, a renewable energy subsidy or low operational costs for renewables can achieve such a transition. 8 Note that we have the following that holds in the data: QE D,t = Qt F OSS + QREN t E as well as PD,t QED,t = PtF OSS QFt OSS + P REN REN t Qt . There is thus additivity both in nominal and in quantity terms. In CGE models, one way to incorporate additivity and maintain the substitutability assumption is to change the utility function slightly where we still pick quantities but with prices included in the utility function and the constraint being the additive quantity identity. The first-order conditions look very similar, but the share parameters are slightly different (see van der Mensbrugghe, 2020). 12 3.1.5 Electricity imports One modeling simplification entails simplifying the import module. Essentially, we drop the imports by fuel type and only add a category for total electricity imports. We note that total energy consumed is either from local production or imports: CtE − YtE ≤ MtE , (35) i.e., we import electricity if consumption exceeds domestic production capacity (∆ ln QE t = ∆ ln YtE ). In the CCDR example, we can import infinite amounts at international prices if con- sumption exceeds local production. Technically it is possible to impose a cap on the amount of energy that can be imported (e.g., due to constraints that our trading partners are facing, ¯ t . This implies that consump- or local distribution constraints). Let us call this constraint M tion must be constrained to be the minimum of electricity consumption demand, or capacity (YtE + M ¯ t ): ¯t . MtE = min max CtE − YtE , 0 , M (36) This ensures that consumption can never exceed generation capacity, while imports can- not exceed import capacity, and should always be zero if local demand is met by local production. 3.1.6 How the model embeds desired energy transition paths In some simulations the models are tasked with finding the carbon taxes associated with an emissions path conditional on the model reacting to the price path. The approach boils down to a goal-seek where we have a vector of control variables (x), in this case carbon taxes, for a vector of target variables (y), in this case emissions, to reach a desired path (y∗ ), e.g., net zero. The modeling approach requires that we find values of x that minimize the following quadratic function: f = (y − y∗ )′ W (y − y∗ ) . (37) Note that the weighting matrix (W) is symmetric (mT × mT ), where m is the number of target variables (e.g., coal, oil and gas) and T is the number of periods. The values of the control variables that minimizes the loss function will be a function of the gradient and the 13 second derivative of the loss function, or: xi = xi−1 − αi H− 1 i gi , (38) where i refers to iterations, α is the step size, H is the Hessian and g is the gradient. 3.2 Soft-linking energy planning models to MFMod Rather than designing an endogenous energy system with the MS, this section explores the option of soft-linking a complete energy model to the structure of the MS. While this ap- proach offers the possibility of deriving results from a highly granular energy model (with detailed capital stocks and clear engineering constraints) that improves realism, the main shortcoming comes from the fact that some endogenous relationships between the two sys- tems (e.g., the link between GDP and energy demand) and policy applications will be un- derrepresented. Several electricity planning models are used during the CCDR process, such as the World Bank’s energy planning model (EPM) and IIASA’s MESSAGEix.9 Taking the macro envi- ronment as exogenous, these models are least cost optimization systems such that the supply of energy by source is a function of the cheapest inputs in terms of variable and fixed costs. Their main input is the electricity demand, often derived from GDP and population pro- jections among others. Assuming that supply always equals demand, they produce several indicators that then feed back into MFMod. Figure 1 demonstrates the main inputs from EPM/MESSAGE into MFMod: 1. Energy mix: Shares of electricity generated by fossil fuels vs. renewables. 2. CAPEX: The investment needs required to achieve the transition. 3. OPEX: The operating costs (e.g., fuels). 4. Emissions: The emissions related to energy. The policy options are largely user driven. As an example, the domestic vs. imported provision of CAPEX and OPEX depends on public vs. private sector financing.10 These inputs are either derived from historical shares or are based on a narrative approach where 9 Among other techno-economic models used in CCDRs. 10 Imported CAPEX is modeled as an import of goods and non-factor services. Imported CAPEX may also affect the financial account of the BOP but this channel is ambiguous and therefore not explicitly modeled. 14 Figure 1: Inputs from energy system into macro structural model. we assume the shares and discuss the implications. In the case of the public sector, funding is discretionary — i.e., the government can allocate resources to fund the change in energy provision. This financing is done either through taxes, debt, expenditure re-prioritization or a combination of them. The soft-linking may entail several iterations between the macroeconomic model and the energy planning model. An outline looks as follows: 1. Send unconstrained demand for electricity based on MFMod baseline (or use govern- ment plans if they exist) to the energy system. (a) The energy model splits energy use between sectors and by commodity. (b) The energy model calculates additional investment needs required to meet de- mand. 2. Translate additional investment demand (i.e., fixed + variable cost) into government or private sector financing. Update macroeconomic baseline with new solution and send next round of electricity demand and prices to energy model. Unfortunately, it is not always possible to run multiple iterations. In this case, one may switch off the electricity block of MFMod, and only use electricity and investment needs as an exogenous input. 15 For the sake of clarity, we focus on one interaction. Projections of the aggregate version of MS models implicitly produce CAPEX and OPEX as an extension of historical trends in the aggregate expenditure variables. In the following, it is assumed that the projection already integrates the reference scenario of a techno model, i.e., cost-minimizing behavior taking into consideration master plans and current policies. Therefore, integration will be made by taking the difference between decarbonization scenario (or other scenario for that matter) and the reference scenario. 3.2.1 CAPEX The change in investment (CAPEX) for scenario i will be: ∆CAP EX i = CAP EX i − CAP EX Ref erence (39) In national accounts, CAPEX is investment. Therefore, it would feel natural to add the delta-CAPEX from a techno model so that total nominal investment yields11 ItCN = PtI ItKN + ∆CAP EXti , (40) where ItKN is real investment of the MFMod standard run and PtI is the investment price deflator. Every scenario from techno-models will provide the same level of useful energy (i.e., energy supply is the same in the reference and scenario case, only perhaps the energy mix is different). Therefore, a scenario that has a higher CAPEX will not add to the productive capital, Kt , more than what the reference scenario provides. As an example, assume the energy mix is 100% solar in the scenario case (with 2 tW h of production) compared to 100% coal in the reference (also with 2 tW h of production), then even though the total capital stock for the electricity sector is three times higher in the scenario compared to the reference case, the electricity production will remain unchanged. In cases where renewables are more productive, then the additional productivity gain will have to be reflected. There are two complementary ways to integrate ∆CAP EXti into the MS system, either by prices or by quantities (or a mix of both). 11 For simplicity, we keep the aggregate form. One can split investment into public and private, depending on the financing channel of these investments (see below). 16 3.2.2 Approach through prices For the capital stock accounting in the model to remain meaningful under all scenarios, the following can be considered ∆CAP EXti PtI 1+ It , It where ∆CAP EXt passes through the investment price inflation mechanism and diffuses into the economy by increasing the cost of capital. For a MS model, this translates into adding this quantity to the disturbance term of the investment deflator ∆pI t: ∆CAP EXti ≈∆ . It This implies that an increase in CAPEX required leads to an increase in the cost of capital, but without an increase in the aggregate capital stock. In this case, to produce the same amount of electricity, but with a different capital type (e.g., renewables) will require a cost adjustment. The benefit is lower emissions and possibly lower electricity tariffs in the future. To distinguish between public, ∆pI,G I,P t , and private investment, ∆pt , one can add the following: Variables added to disturbance term i ∆CAP EXt ∆pI,G t β∆ G It , i ∆CAP EXt ∆pI,P t (1 − β ) ∆ P It , i ∆CAP EXt For countries that model government in- β∆ G It , vestment in nominal: ∆iCN GG, t where β is the fraction of the CAPEX that is financed by the public sector. Note that we intentionally require the model to invest a slightly higher amount than what cost minimization would suggest. This is due to the exogenous nature of CAPEX in the soft-linking, which does not react endogenously to changes in aggregate demand. Indeed, an implicit assumption in this framework is that investment in the power sector is inelastic, favoring variation in CAPEX for the power sector over elastic investment throughout the simulation. 17 On the revenue side of the economy, if labor does not change (a fair assumption if we assume that workers displaced in the fossil fuel industry get absorbed by the renewable industry -– i.e., perfect labor mobility), then this approach implies that the cost should be reflected in capital rents (Rt ) of12 Pt Yt = Wt Nt + Rt Kt . (41) Since we are substituting out one form of capital for another, Rt is the only variable that can shift in this case. The cost is thus only equal to the difference between one source of energy compared to another. While nominal GDP is likely increasing in this scenario, real GDP should be falling due to higher costs. Given that the stock of productive capital is the same in the two cases, total energy costs would then be equal to: ′ ′ T CE E E E t = Rt Kt − Rt Kt = Kt Rt − Rt . (42) Unfortunately, the capital stock and valuation of electricity asset data is not readily available, hence the methodology we propose through investment deflator. 3.2.3 Approach through quantities For this approach, one will need to modify the production function in the case of viewing it as an investment. GDP will increase in the short run (due to the investment values – not because there are more laborers or more productive capital generated — i.e., the total electricity output is the same before and after the transition). However, we know that if we increase investment, then capital stock will also increase. This will lead to an increase in potential GDP. To ensure that we do not have an increase in potential GDP (since both sources of electricity yield the same output) we need to modify TFP as follows: Yt At = −α α , (43) (1 + ∆) Kt1−1 Nt where ∆ is the change in capital due to additional investment in alternative energy sources. This modification will ensure that potential GDP remains as before (i.e., capital stock increases but TFP falls). A lower TFP will result in a higher marginal cost and hence lead to higher prices, but a lower real wage. Hence this change will have Hicks-neutral properties and will not alter revenue distribution. It is important to note the differences in 12 We note that labor is a more intensive resource in renewables compared to fossil fuel electricity produc- tion. 18 the two modeling assumptions. By changing TFP we are modifying the aggregate marginal cost assumption. TFP is lower, and hence marginal costs will increase. These marginal cost effects will reduce aggregate demand. The other outcome is that lower TFP will inevitably lead to lower long-run output. Thus, the modeling will generate short run benefits (i.e., just the value that is invested), but long-run losses. Note that the converse also holds, if CAPEX and OPEX are lower in the scenario, then TFP will be higher. In the cost scenario case, the long run is unchanged and aggregate marginal costs too. There is however crowding out of private investment and hence there will be a short run decrease in GDP. On the import side we have two possible adjustments mimicking the domestic side: • Option 1 : If the investment of a given scenario contains imports, called ∆CAP EXti, imports = CAP EXti,imports − CAP EXtRef erence,imports , (44) where CAP EXti := CAP EXti,imports + CAP EXti,domestic , could be modeled in the same manner as done above for investment, by adding this quantity to the disturbance term of the import price deflator ∆pM t ∆CAP EXti,imports ∆ . Mt • Option 2: perhaps more accurate, would be to add to the disturbance term of real imports, ∆mt ∆CAP EXti,imports ∆ . Mt Both representations would help keep the neutrality of imports for GDP in nominal terms (at least in the short term). 3.2.4 OPEX The change in technology implied by different CAPEX trajectories will be accompanied by different operational expenditure (OPEX) requirements. For example, switching from a coal- based mix to a solar-based mix will significantly reduce OPEX while increasing CAPEX. The change in OPEX is defined as 19 ∆OP EXti := OP EXti − OP EXtRef erence (45) with OP EXti = OP EXti, import + OP EXti, domestic (46) Taking an approach in the spirit of Nordhaus (an inelastic spending), the change in OPEX will change the value added. Given the level of aggregation, it is difficult to distinguish which sectors’ value added, or equivalently which spending, will be impacted. An option could be to discount domestic demand Ct + It through their relative weights, so that Ct C = Ct − ∆OP EXti, domestic (47) Ct + It and do the same for the other demand variables. We could simply add the OPEX to the imports by adding this factor to the disturbance term of ∆mt ∆OP EXti, imports ∆ . Mt Addendum: Note that if we want to model the sensitivity of prices because the model already has commodity prices such as the price of oil, and if we have the following decomposition n OP EXti, import = OP EXti, import (j ), i=1 with j a commodity. By defining the price of this commodity, pj,Ref t erence , for the reference j,i scenario, and, pt , for the scenario k , one could test the sensitivity of commodity price by adding this quantity to the disturbance term of ∆pM n ∆ pj, i i, t ∆OP EXt import (j ) i=1 However, it is worth noting that the prices scenario may no longer be consistent with a techno model. They could be interpreted as unanticipated changes, keeping the power mix as projected by a techno model. 20 3.2.5 Emissions A techno model will provide a marginal abatement cost that could be interpreted as a carbon price for the electricity sector only. There is another complexity – when implementing carbon prices (we use carbon taxes thereafter) under a regulated electricity tariff system, because only changes in the non-power sector (e.g., transportation) will occur. First let’s define the carbon revenues in the model: Carbon Rt = τtCARB · F Xt · EM ISt , (48) τtCARB is the exogenous carbon tax in USD, F Xt is the bilateral exchange rate to the dollar, EM ISt is the emissions in per ton of CO2 equivalent. Total emissions are either the weighted sum of emissions by commodity type (in the case of energy sector integration), EM EM ISt = αi · (Qi,t + Mi,t ), (49) i EM where αi is the emissions factor of commodity i, and consumption is equal to production plus imports (Qi,t + Mi,t ). In the case where we have energy data distinguished between the power and non-power sector, the carbon tax will then only be applied to the non-power sector: Carbon Rt = τtCARB · F Xt · EM αi · QN i,t ELE N ELE + Mi,t (50) i 4 Model simulations We illustrate four shocks in the model. The first two are two policy responses after initiating a carbon tax for South Africa. The third shock focuses on an optimal control problem – finding the carbon taxes to keep emissions fixed as of the last period in the model (i.e., 2023). The final shock is the modeling of energy transitioning in Mauritania by soft-linking the macroeconomic model to EPM. 4.1 A USD 20 carbon tax in South Africa The modeling introduces a very simple carbon tax equal to USD 20 per ton of emitted carbon. In this scenario the simple energy module is switched on in MFMod (i.e., no interlinking or soft-linking between the EPM or MESSAGE). The carbon tax changes relative energy 21 prices. It is assumed that the carbon tax will not go towards investing in renewable energy (i.e., no new capacity). Although this assumption is likely not realistic, it illustrates how the economy responds to such measures. The carbon tax is passed through to end-users (i.e., households, and as intermediate consumption by South Africa’s economic sectors). The government collects revenues from the tax. It has the choice to reduce debt by saving the revenues, or to use it to offset some of the losses that consumers face. Introducing carbon taxation reduces household consumption and investment in the short term (top left panel of Figure 2). Imports of fossil fuels fall, and exports fall due to a loss in competitiveness. Emissions from fossil fuels fall relative to baseline – reflecting both a decrease in consumption and a reduction in imports. Finally, the budget balance improves due to significant revenues generated from fossil fuels. Figure 2: A USD 20 carbon tax - σ < 1. Figure 3: A USD 20 carbon tax - σ < 1. Because we did not model investments into renewables, the responses are only due to households taking the hit of the shock. One can clearly see that the renewable share in electricity generation (Figure 3 left top panel) does not change by a large value, despite the fall in the carbon intensity of energy production. In this simulation, the calibrated elasticity of substitution is smaller than 1 and the transition is sluggish (calibrated to take 10 years to 22 build up the required energy, holding all else constant). These calibrations are illustrative. They capture the time to build, delays in transition that are due to a lack of political will power of finance constraints. In a second simulation the carbon tax grow at at rate of 4.5 percent per year, spurring faster transition (within three years as opposed to ten, holding all else constant) as well as increasing the elasticity of substitution between fossil fuels and energy to 5 from 2. Figure 5 show that the renewable share increases to 60 percent after seven year. This illustration shows the importance of calibrating the elasticity of substitutions correctly as well as the transition period. All macro models will be significantly sensitive to these two parameters. Figure 4: A USD 20 carbon tax - σ = 5. Figure 5: A USD 20 carbon tax - σ = 5. In another exercise, we compare the revenue savings carbon tax scenario to one where the budget is neutral. The budget is neutral by matching the carbon tax income with a reduction in wage income taxes. Figure 6 shows that a carbon tax can reduce emissions and simultaneously stimulate aggregate demand via a reduction in labor income tax rates. The average effective personal income tax is reduced by approximately three percentage points, inducing a sharp increase in real disposable income, and hence an immediate increase in household consumption. As a result, private investment will marginally decrease, primarily 23 due to an even larger discrepancy between relative factor prices (real wages relative to real capital returns). Inflation is also larger due to higher consumption. Figure 6: A USD 20 carbon tax – Revenue recycling vs. budget savings (σ < 1). Turning to a new simulation, we solve the model to find the carbon prices that achieves a 70 percent reduction of emissions by 2050 with respect to the baseline. Again, we illustrate how the model responds to different price sensitivities. When σ < 1, most of the reduction in emissions come from lower aggregate demand with very little shift in the distribution of electricity (bottom left panel of Figure 7. However, when σ = 5 emissions fall at the same level but now renewables represent a much larger share in electricity. As expected, the carbon tax level required to achieve the emissions reduction level is much higher when the elasticity of substitution is low. Figure 7: Carbon taxes to achieve emissions target. 4.2 Electricity planning simulations for Mauritania Our illustrative assumption regarding the energy mix in Mauritania posits that fossil fuels constitute a relatively small portion of the overall energy composition. In 2020, heavy fuel 24 oil (HFO) and diesel accounted for approximately 23 percent of the energy mix.13 The scenario that is modeled includes a fully integrated network in the Sahel region with the additional condition to reduce emissions by 80 percent compared to the business as usual baseline (which is existing network and committed transmission lines between countries). The additional energy supply from this scenario is depicted in Figure 8, and only represents a marginal increase from the baseline. Due to the benefits of integration, there is a small reduction in CAPEX compared to the baseline, while an increase in OPEX (up to -0.08 percent and 0.02 percent of baseline GDP for investment and OPEX, respectively, by 2030) is recorded as well. However, it should be noted here that a fully integrated electricity network in the Sahel not only demands large CAPEX outlays, but faces political economy hurdles as well. Estimates suggest that $1B in CAPEX is needed by 2040 for Mauritania only to develop the national transmission network and enhance interconnections with neighboring Sahel countries; see World Bank (2023) for more details. Taking into account the role of the government as a monopolist in the construction of the power transmission network we are assuming that most of the costs will be financed by the government. In addition, we assume that roughly 20 percent of CAPEX is imported. However, future power generation costs could potentially be covered by the private sector through Independent Power Producer (IPP) schemes, possibly with support from the World Bank. For an overview of IPP schemes and the lessons learned, see Besant-Jones (2006) and Vagliasindi (2012). In particular, gas-to-power and renewable energy (solar photovoltaic and wind) projects are clean energy technologies with the potential of being financed through the private sector with appropriate risk mitigation mechanisms. Our results, summarized in Figure 9, show that higher OPEX costs and lower investment spending (relative to the baseline) produce a small decrease in consumption and investment. Imports decrease in response to aggregate demand. The lower output gap puts downward pressure on inflation (note the scale – the numbers are relatively small). Electricity value- added decreases relative to the baseline given that some energy supply will be coming from other countries due to the grid integration. The fall in aggregate demand induces a reduction in industry and agriculture too. At the same time relative price shifts make services better 13 The energy mix is supposed to reflect the main grid only, i.e. isolated grids and off-grid generators are not included. Including those auxiliary electricity generators would increase the share of HFO and diesel substantially, see IRENA (2023). In addition, hydro power plants that are not located in Mauritania but provide energy to the country as domestic providers are included in the energy mix. Those include the Barrage de Manantali, the Centrale hydroélectrique de Gouina, and the Félou Hydroelectric Plant. The three hydro plants are located in Mali. Note that the energy mix is an entirely exogenous input in the model, and different assumptions about the energy mix can be incorporated into the scenario analysis. 25 Figure 8: Energy mix and energy supply scenario in Mauritania. Source: EPM Figure 9: Modeling results when soft-linking energy planning models with MFMod for Mauritania. off in this scenario. Note that our analysis does not consider the spillover effects of a more reliable electricity supply on firm-level productivity. These effects could be significant in Mauritania, where an unreliable electricity network and relatively high electricity costs, compared to regional counterparts, pose major obstacles to business development (Oppong et al., 2022).14 Conversely, the negative health impacts of burning fossil fuels are explicitly modeled in Burns et al. (2021). These impacts reduce the effective labor supply and increase government health expenditures in our approach. 5 Concluding remarks and ways forward Approaches to modeling energy in an MS framework, endogenously or with other generative models, will require continuous updating and improvements. Macroeconomic models lack the details of a technological least cost energy system. This paper discusses two energy-macro integration methodologies using the World Bank’s macrostructural model as an example. 14 See also Fried and Lagakos (2023) for the long-run, general-equilibrium effects of electricity on firm and aggregate productivity. 26 Both methodologies require frequent updating due to changing technological frontiers in the energy sector and volatile commodity prices. In recent years, CAPEX projections for solar and wind power have been steadily revised downward due to singular improvements in technology and supply chain (through sizable investments), which have significantly reduced CAPEX price projections (e.g., 2025 Solar PV capex is lower with today’s projections than it was five years ago for the same projected date). However, it has been proven during recent shocks (COVID or the war in Ukraine) that the supply chain can be fundamentally disrupted, reshaping the market and thus price projections along the supply chain (from primary energy to the crucial minerals used for certain technologies). Maintaining projections with the latest available data is essential to provide the best policy advice. On the methodological side, several improvements can be noted. First, better connecting the wealth of knowledge produced by the techno-models to the MS models could be fur- ther developed, creating modeling pipelines between the models to be able to do multiple iterations and get closer to a fixed point. One option that can be explore is the merge the two approaches detailed in this paper in connecting techno-model runs into the CES energy module parameters and account for the additional investment costs. This innovation will be particularly useful in order to provide a better framework for policy simulations (through taxes and subsidies), which is often missed by techno-economic models. Indeed, these partial equilibrium models focus on minimizing economic costs from a social planner perspective, abstracting from constraints and policies that are relevant in a macroeconomic setting. Sec- ond, amend the design of the nested CES technology for energy to account for additivity constraints in order to improve the representation of energy flows. It could be achieved by using additive CES functions as described in the MANAGE v2.0 documentation (van der Mensbrugghe, 2020). Third, a better representation of capital (e.g., capital vintages) from the endogenous macro approach would be useful for a more granular view of the stranded asset issue. 27 References Allcott, Hunt, Allan Collard-Wexler, and Stephen D. O’Connell (2016). “How Do Electricity Shortages Affect Industry? Evidence from India”. In: American Economic Review 106.3, pp. 587–624. Berndt, Ernst R. and David O. Wood (1975). “Technology, Prices, and the Derived Demand for Energy”. In: The Review of Economics and Statistics 57.3, pp. 259–268. Besant-Jones, John E. (2006). Reforming power markets in developing countries : what have we learned? Energy and Mining Sector Board Discussion Paper 19. The World Bank. Böhringer, Christoph and Thomas F. Rutherford (2013). “Transition towards a low carbon economy: A computable general equilibrium analysis for Poland”. In: Energy Policy 55. Special section: Long Run Transitions to Sustainable Economic Structures in the European Union and Beyond, pp. 16–26. Burns, Andrew, Benoit Campagne, Charl Jooste, David Stephan, and Thi Thanh Bui (2019). The World Bank Macro-Fiscal Model Technical Description. Policy Research Working Paper Series 8965. The World Bank. Burns, Andrew, Charl Jooste, and Gregor Schwerhoff (2021). Climate Modeling for Macroeconomic Policy: A Case Study for Pakistan. Policy Research Working Paper Series 9780. The World Bank. Chattopadhyay, D., F. De Sisternes, and S. K. W. Oguah (2018). World Bank Electricity Planning Model (EPM): Mathematical Formulation World Bank Electricity Planning Model. Tech. rep. The World Bank. Fried, Stephie and David Lagakos (2023). “Electricity and Firm Productivity: A General- Equilibrium Approach”. In: American Economic Journal: Macroeconomics 15.4, pp. 67– 103. He, Y. X., L. F. Yang, H. Y. He, T. Luo, and Y. J. Wang (2011). “Electricity demand price elasticity in China based on computable general equilibrium model analysis”. In: Energy 36.2, pp. 1115–1123. Holmøy, Erling (2005). The Anatomy of Electricity Demand: A CGE Decomposition for Norway. Discussion Papers 426. Statistics Norway, Research Department. IRENA (2023). Mauritania Renewable Energy Statistical Profile. Accessed on: 2024-04-02. International Renewable Energy Agency. url: https : / / www . irena . org/ - /media / Files / IRENA / Agency / Statistics / Statistical _ Profiles / Africa / Mauritania _ Africa_RE_SP.pdf. 28 Loulou, Richard and Maryse Labriet (2008). “ETSAP-TIAM: the TIMES integrated assessment model Part I: Model structure”. In: Computational Management Science 5.1, pp. 7–40. Oppong, Felix, Urbain Thierry Yogo, Maria Elkhdari, Djibril Ndoye, Cristina Navarrete Moreno, Sarah Zekri, Aarti Reddy, Teslem Zein, and Graciella Miralles Murciego (2022). Report on the Economic Situation in Mauritania: Lever- aging the Private Sector to Drive Economic Transformation and Job Creation. Tech. rep. Washington, D.C.: World Bank Group. Vagliasindi, Maria (2012). Power market structure and performance. Policy Research Working Paper Series 6123. The World Bank. van der Mensbrugghe, Dominique (2020). The Mitigation, Adaptation and New Tech- nologies Applied General Equilibrium (MANAGE) Model Version 2.0g. GTAP Technical Paper TP/20/xx. Center for Global Trade Analysis, Purdue University. World Bank (2023). Schéma Directeur Production -Transport de la Mauritanie. Tech. rep. Washington, D.C.: World Bank Group. 29