Simultaneous supply and demand constraints in input-output networks: The case of Covid-19 in Germany, Italy, and Spain

Natural and anthropogenic disasters frequently affect both the supply and demand side of an economy. A striking recent example is the Covid-19 pandemic which has created severe disruptions to economic output in most countries. These direct shocks to supply and demand will propagate downstream and upstream through production networks. Given the exogenous shocks, we derive a lower bound on total shock propagation. We find that even in this best case scenario network effects substantially amplify the initial shocks. To obtain more realistic model predictions, we study the propagation of shocks bottom-up by imposing different rationing rules on industries if they are not able to satisfy incoming demand. Our results show that economic impacts depend strongly on the emergence of input bottlenecks, making the rationing assumption a key variable in predicting adverse economic impacts. We further establish that the magnitude of initial shocks and network density heavily influence model predictions.


Introduction
An immanent feature of many natural and anthropogenic disasters is that they affect both the supply and the demand side of the economy. In this paper we study the Covid-19 pandemic as an exemplary case of simultaneous supply and demand shocks. Supply shocks from the pandemic arise from different sources. While deaths and sickness of employees can limit productive capacity, these effects are minor compared to nation-wide lockdown measures imposed by governments to curb the spreading of the virus. During lockdown workers employed in non-essential industries who cannot work remotely are unable to perform their jobs (del Dingel and Neiman, 2020;Koren and Pető, 2020).
The pandemic also affects demand in heterogeneous ways (Congressional Budget Office, 2006;del Rio-Chanona et al., 2020;Chetty et al., 2020;Carvalho et al., 2020;Chen et al., 2020). While we expect demand shocks to be comparatively small for some industries (e.g. manufacturing), other industries are strongly affected by demand shocks. An illustrative example is the transportation industry which is considered as essential in many countries and thus would not experience adverse supply side effects. But the transportation industry faces large demand shocks, since consumers reduce demand for air travel and public transport to avoid infectious exposure.
Since economic agents are embedded in production networks, we expect that the overall economic impact is larger than the initial shocks to supply and demand suggest. Demand shocks will reduce the sales of firms and, by backward propagation, also diminish the sales of their suppliers. Supply shocks, on the other hand, will spread downstream and upstream. Downstream effects materialize if the limited productive capacity of suppliers creates input bottlenecks for customers. Due to lower productive capacities, firms will also require less inputs for production, thus adversely affecting upstream suppliers of these inputs.
Input-output (IO) models are frequently used to model higher-order economic impacts arising from such exogenous shocks. Most of these models account for either supply or demand shocks but do not incorporate them concurrently (Galbusera and Giannopoulos, 2018). In this paper we revisit existing IO modeling techniques and introduce a novel dynamic approach, to account for both types of shocks. Our analysis is based on industry-level data but could easily be extended to firm-level analysis that has become the focus of recent studies (Diem et al., 2021;Borsos and Mero, 2020;Mandel and Veetil, 2020b;Inoue and Todo, 2019). In particular, our results relate directly to the effects of data aggregation on impact estimates.
Several macroeconomic models that account for the production network structure have been suggested to study the economic impacts of the Covid-19 pandemic. Inoue and Todo (2020) use an agent-based model calibrated to more than a million Japanese firms to model nation-wide economic effects of a lockdown in Tokyo. Using the World Input-Output Database (WIOD), Mandel and Veetil (2020a) study the effects of national lockdowns on global GDP in a non-equilibrium framework. Fadinger and Schymik (2020); Baqaee and Farhi (2020); Bonadio et al. (2020) and Barrot et al. (2020) use general equilibrium models to quantify economic impacts of social distancing. All these studies focus on the supply-side shocks of the pandemic and without further considering changes in final consumption. Exceptions are Pichler et al. (2020) and Guan et al. (2020) who incorporate both supply and demand shocks in their production network models.
In contrast to these studies, we consider simpler modeling techniques derived from traditional IO analysis which we extend to account for simultaneous supply and demand shocks. We follow this approach to better isolate underlying mechanisms of shock propagation in production networks that can be hard to disentangle in more sophisticated macroeconomic models. When applying pandemic shocks to data from Germany, Italy and Spain, we find that existing IO modeling techniques yield infeasible solutions of economic impacts. To un-derstand the nature of this problem we introduce a simple linear programming method that allows us the determine feasible market allocations, representing a lower bound of minimal shock propagation. To find more realistic impact estimates, we further introduce a new bottom-up approach based on rationing outputs. This setup allows us to dynamically model the propagation of shocks in production networks and uncover several theoretical implications, such as the effect of alternative behavioral assumptions on economic impacts.
We intentionally keep our modeling approach simple. As mentioned above, even more complicated models currently applied to assess the economic effects of the pandemic do not incorporate supply and demand shocks simultaneously. The focus of this paper is on the theoretical implications of simultaneous supply and demand constraints for IO-based impact assessment methods. For more realistic empirical impact assessment of natural disasters, we stress that further aspects that we do not consider here could play an important role, e.g. inventory dynamics (Bak et al., 1993;Pichler et al., 2021), price and substitution effects, adaptive behavior and governmental intervention (see Oosterhaven (2017) for a recent discussion).
Our paper contributes to the field of IO models in disaster impact assessment, for which a recent review can be found in Galbusera and Giannopoulos (2018). For recent demand-side and supply-side focused contributions see Klimek et al. (2019) and Avelino and Dall'erba (2019), respectively. Similar to our derivation of a lower bound of shock propagation, Koks and Thissen (2016) and Oosterhaven and Bouwmeester (2016) rely on optimization techniques to account for supply constraints in demand-driven models. Constrained optimization techniques are frequently used in extended IO models (for example Duchin (2005) and Duchin and Levine (2012)). The modeling of alternative rationing algorithms is related to the studies of Steenge and Bočkarjova (2007); Li et al. (2013) and Koks et al. (2015) which allow for imbalanced IO tables immediately after the disaster strikes and evaluate different recovery paths.
Our findings show that shock amplification is much larger in the bottom-up approaches than what best case scenarios would suggest. Micro-level coordination failures can severely exacerbate adverse economic shocks. Rationing assumptions play a key role in impact estimates and alternative behavioral rules can lead to very different aggregate outcomes. These effects strongly interact with the overall shock magnitude as well as the level of connectedness in the production network. While we find that economic impacts increase with higher levels of network density in general, the extent to which this is true strongly depends on the underlying rationing mechanisms. Our results also imply that estimates of economic impact can be highly sensitive with respect to data quality and aggregation. This paper is organized as follows. We first discuss first-order pandemic shocks to supply and demand, as well as the datasets used (Section 2). In Section 3 we introduce the basic IO framework and discuss how existing approaches have difficulties in incorporating simultaneous supply and demand constraints. Section 4 discusses the main results of this paper. We propose an optimization method in Section 4.1 and introduce alternative rationing algorithms in Section 4.2 to model shock propagation in supply and demand constrained production networks. We show empirical results and discuss further theoretical implications in Section 4.3 before concluding in Section 5.

Pandemic shocks to supply and demand
Our analysis is based on the most recent year (2014) of the World-Input-Output-Database (WIOD) (Timmer et al., 2015). 1 We use estimates of supply and demand shocks from the literature to determine maximum final consumption and production values for 54 industries in three major European economies, i.e. Germany, Italy and Spain. 2 We focus on these economies because existing research provides us with lists of essential industries and thus allows us to make reasonable estimates of supply shocks. For this reason, we only allow for domestic supply shocks in our analysis, despite acknowledging the importance of international supply chain disruptions.
We follow the approach of del  to compute supply shocks for every industry during a lockdown. A supply shock is caused by the removal of labor in non-essential industries due to social distancing measures. In contrast, an industry which is defined as essential will not be affected. Even if employed in non-essential industries, workers who can accomplish their work from home will do so and are assumed to keep pre-lockdown productivity levels. The Remote Labor Index RLI i indicates the share of an industry's labor force that can work from home. The supply shock to industry i is then computed as where e i is the share of an industry defined as essential. Thus, the supply shock of an industry during lockdown is the share of labor in non-essential industries that cannot work from home. We assume that the supply shock to an industry determines the maximum production of an industry, i.e.
where x i,0 denotes the production in industry i before lockdown. Following this approach, every industry faces binding supply side constraints, limiting its production to ]. The Remote Labor Index is taken from del  and industry-specific essential ratings for Germany, Italy and Spain are obtained from Fana et al. (2020).
To determine first-order demand shocks to every industry, D i , we use estimates of a prospective Congressional Budget Office (CBO) study aiming at quantifying the demand-side impact of a pandemic (Congressional Budget Office, 2006). Demand and supply shock data have been mapped to WIOD industry categories by Pichler et al. (2021) and are presented in detail in Appendix A. As for supply shocks, we assume that demand shocks determine maximum final consumption values according to where f i,0 represents pre-lockdown final consumption. Since consumption cannot be negative, we have f i ∈ [0, f max i ]. 3 Note that WIOD distinguishes different final consumption categories. 4 We apply the CBO estimates to final consumption of households and non-profit organizations and assume a 10% shock to investments and exports as in Pichler et al. (2021). Due to our methodological focus we do not further distinguish between different final consumption categories but for simplicity only consider total final consumption values for every industry. It is important to point out that this is a major simplification and we expect the various types of final consumption to be highly relevant in empirical assessments. Table 1 shows country aggregates of essentialness scores, Remote Labor Index, supply and demand shocks.
/f are total supply and demand shocks, respectively. RLI = i RLIixi,0/x and e = i eixi,0/x denote the country-wide Remote Labor Index and essentialness score on which supply shocks are based. In all three countries total direct supply shocks are larger than demand shock.

IO framework
We first introduce basic national accounting identities that build the basis for most IO models. Let us consider an economy consisting of n industries, each producing a unique, industry-specific good. Inter-industry purchases and sales are encoded in the intermediate consumption matrix Z where an element z ij denotes the total monetary value of goods produced by industry i that are consumed by industry j. For the n-dimensional vectors of gross output, total final consumption and value added, we write x, f and v, respectively. In this economy the following identities hold where i is a n-dimensional column vector of ones. A core assumption in a Leontief-inspired modeling framework is that industries produce based on fixed production recipes, allowing us to rewrite the first identity of Eq. (3) as where A is the technical coefficient matrix with elements a ij ≡ z ij /x j (the production recipe) and L the Leontief inverse L ≡ (I − A) −1 . A conventional assumption is that gross output is determined endogenously, whereas final consumption is taken to be as exogenous. It then follows that value added is obtained as a residual variable. Eq. (4) is at the core of many IO models that are frequently used for disaster impact analysis. This specification defines a demand-driven model. However, as we have already stressed, many economic shocks actually act on the supply side of the economy. For example, natural catastrophes such as earthquakes or floods destroy physical capital, putting upper limits on an industry's production in the disaster aftermath. Eq. (4), however, neglects supply capacity constraints and implies an infinite elasticity of supply with respect to demand. This is particularly problematic given the frequent short-term focus of IO studies.
We should point out that there are also supply-driven IO models building upon Ghosh's model (Ghosh, 1958) that assumes exogenous primary factors and derives final consumption values endogenously. Ghosh's model does not comply with a Leontief production function and has been heavily criticized amongst other aspects for the assumption of perfect demand elasticities and perfect substitution of inputs (Oosterhaven, 1988;Gruver, 1989;De Mesnard, 2009). The IO inoperability model (Haimes and Jiang, 2001;Santos and Haimes, 2004) is another notable supply-side focused model. Dietzenbacher and Miller (2015) show, however, that it closely corresponds to conventional IO modeling approaches.
Neither the demand-nor the supply-driven specification of IO models are able to incorporate supply and demand constraints at the same time. A potential remedy is the mixed endogenous/exogenous model (MEEM), which has been applied in several studies including Steinback (2004); Kerschner and Hubacek (2009) and Arto et al. (2015). The MEEM acknowledges that not only final demand is constrained but that for some industries supply constraints are more severe and therefore binding. A difficulty in empirical analysis is to define which industries are supply and which are demand constrained. In some cases there might be "natural" distinctions. For example, Arto et al. (2015) study global supply chain disruption effects of the 2011 Tōhoku earthquake by solving the MEEM where only the Japanese transport equipment industry is supply constrained, whereas for all other industries gross output is endogenous. In case of simultaneous (severe) supply and demand shocks the line of distinction will be more blurred.
Note that the MEEM incorporates both supply and demand shocks, but not simultaneously for a single industry. Instead, an industry is either supply or demand constrained. As a consequence, solutions to the MEEM might not comply with exogenous industry-level constraints to supply and demand, i.e. they can be economically infeasible. As is shown in detail in Appendix B, this is exactly what happens if we apply the MEEM to the pandemic shocks discussed in the previous section. For all three countries, the MEEM yields final consumption values that are either negative or larger than the exogenous constraints.

Propagation of simultaneous supply and demand shocks
The industry-specific effects to supply and demand during the Covid-19 pandemic and the difficulty of incorporating them in the existing models motivated us to explore possible extensions of the IO modeling framework. Rather than using more complicated models that can deal with simultaneous supply and demand shocks, such as computable general equilibrium (CGE) models or those discussed in the introduction, we intentionally keep the modeling approach simple. We remain close to the Leontief framework, the "work horse" of many more advanced IO-based models. This allows us to better isolate the basic mechanisms of shock propagation that are easily conflated with other effects in more sophisticated models.
To determine lower bounds of shock propagation with respect to output and consumption, we study the idealized case of a social planner who allocates goods to maximize either total gross output or total final consumption within the given economic constraints. This will give us a best case scenario of negative economic impacts, i.e. the minimal decrease in total output and final consumption necessary to arrive within the set of feasible solutions given the exogenous constraints to supply and demand. Of course, alternative objectives could be optimized as well (e.g. employment).
While deriving a lower bound is valuable, it is unlikely to be realistic. We therefore consider a second approach by comparing alternative rationing algorithms. If an industry is supply constrained, it will not be able to satisfy all of its demand and thus needs to make a decision which customer to serve and to what extent. We implement several decision rules and investigate how this choice influences the estimated economic impact. In contrast to the optimization method or the MEEM, which simply compute an equilibrium, this approach explicitly computes the transient dynamics that lead to a new equilibrium.

Feasible market allocations
Given exogenous constraints to supply and demand, what is the feasible market allocation that maximizes final consumption and/or total output? The solution needs to lie within exogenous bounds on supply and demand and also needs to satisfy the assumption of Leontief production, Eq. (4). We seek market allocations {x * , f * } that (a) respect given production recipes x * = Lf * and (b) satisfy basic output and demand constraints x * ∈ [0, x max ] and f * ∈ [0, f max ].
We follow a mathematical optimization procedure to map out the solution space of feasible market allocations. As a first case, we determine the market allocation that maximizes gross output under the assumptions specified. Large levels of gross output indicate high economic activity, which in turn entail high levels of primary factors such as labor compensation. As a second case we look at market allocations that maximize final consumption given current production capacities. Due to the linearity of the Leontief framework, the problems boil down to linear programming exercises.
Maximizing gross output: subject to Maximizing final consumption: subject to To maximize gross output of the economy, i x * i , requires us to the find the vector of final consumption f * . The constraint Lf ∈ [0, x max ] ensures that industry output levels lie within the respective production capacities. The problem is similar when maximizing final consumption where a vector of output levels x * is chosen to maximize final consumption, The auxiliary constraint enforces that final consumption levels do not exceed given demand. The optimization problem always admits a solution since the trivial allocation of a full collapse {x * , f * } = {0, 0} always exists, although we expect positive values for realistic input data.
Note that the market allocations are "optimal" in a mathematical sense. That is, they represent maximum values of output and consumption given the exogenous constraints to supply and demand. Or stated differently, they determine the minimum level of shock propagation measured in aggregate final consumption and gross output. Thus, this optimization method is not intended to give realistic or necessarily desirable economic outcomes, but rather probes the system boundaries by mapping out the solution space. Any feasible solution, under the above-specified assumptions, has to lie within this space.

Input bottlenecks and rationing variations
As our second method we implement different rationing schemes for output constrained industries. In contrast to the optimization methods, this represents a bottom-up approach for finding feasible market allocations. Industries place orders to their suppliers based on incoming demand. Since suppliers can be output constrained, they might not be able to satisfy demand fully. A supplier therefore needs to make a decision about how much of each customer's demand it serves. Intermediate consumers transform inputs to outputs based on fixed production recipes. Thus, if a customer receives less inputs than she asked for, she faces an input bottleneck further constraining her production. As a consequence, the customer reduces her demand for other inputs as they are not further needed under limited productive capacities. We iterate this procedure forward until the algorithm converges.
We run this algorithm with four alternative rationing rules: (a) strict proportional rationing, (b) proportional rationing to intermediate demand but priority of intermediate over final demand, (c) priority rationing serving largest customers first and (d) random rationing, where customers are served based on a random order. We then compare the results obtained from the four competing behavioral rules.
These rationing approaches are frequently applied in the literature, although there are differences in the exact specifications. In general it is hard to calibrate how firms distribute output in case of supply constraints to empirical data and so the rationing choice is often ad-hoc. Here, we apply all four rules within a consistent dynamic framework to better understand how alternative behavioral assumptions affect impact estimates. Strict proportional rationing is frequently assumed in the literature (Henriet et al., 2012;Hallegatte, 2014;Guan et al., 2020;Mandel and Veetil, 2020a;Pichler et al., 2020) and also mixed proportional/priority rationing has been considered (Battiston et al., 2007;Hallegatte, 2008;Li et al., 2013;Diem et al., 2021). The agent-based framework of Inoue and Todo (2019) and Inoue and Todo (2020) assumes a variation of priority rationing while the random matching of suppliers and customers in the agent-based model proposed by Poledna et al. (2018) and Poledna et al. (2019) most closely resembles a random rationing approach.
(a) Strict proportional rationing. If industries are unable to satisfy total incoming demand completely, they distribute output proportional to their customers' demand, where no distinction is made between intermediate and final customers. More specifically, if an industry's output, x i , is smaller than incoming demand, d i , it will supply z ij = o ij x i d i to customer j, where o ij denotes the demand from customer j to industry i. We implement the rationing algorithm in the following way: First, industries determine their total demand as if there were no supply-side constraints, i.e. d = Lf max . Industries then evaluate if they are able to satisfy demand given their constrained production capacities. If an industry i can satisfy demand only partially, it will create a bottleneck of size r i = x max i d i to other industries due to proportional rationing. Since industries produce according to fixed Leontief input recipes, their largest input bottleneck, s i = min j:a ji >0 {r j , 1} will be the binding constraint in production. Thus, in case of input bottlenecks where s i < 1, production of i reduces to This in turn reduces the amount of goods delivered to the final consumer f i = min{x i − j a ij x j , 0}. The new final demand vector f now implies a new, lower level of aggregate demand, d = Lf , and we again let industries evaluate whether they can satisfy total demand within given production constraints. We iterate this procedure forward until all demand is met and no input bottleneck further constrains production. We can write the proportional rationing algorithm more compactly as follows: Algorithm 1 Proportional rationing; industries are not prioritized over the final consumer. Take an initial demand vector f [0] = f max as given, implying an initial aggregated demand vector . By looping over the index t = {1, 2, ...}, the following system is iterated forward: The algorithm converges to a new feasible economic allocation if In this case output and final consumption levels are given as Eq. (7) indicates whether an industry is output constrained, where r i is the share of demand that can be met given existing productive capacities. If r i ≥ 1, industry i is able to meet demand completely, whereas demand can only be partially satisfied if r i < 1. If any supplier of industry i (which is the set {j : a ji > 0}) is sufficiently output constrained, industry i faces an input bottleneck according to Eq. (8). Due to perfect complementarity of inputs prescribed by the Leontief production function, industry i can only produce a fraction of total demand as indicated in Eq. (9), reducing its delivery to final consumers as specified in Eq. (10). The new total demand to an industry i is then again derived through the weighted sum of final demand values where the weights are obtained from the Leontief inverse, Eq. (11).
(b) Mixed proportional/priority rationing. It has been argued that firm-firm relationships are stronger than firm-household ties, so that intermediate demand should be prioritized over final demand (Hallegatte, 2008;Inoue and Todo, 2019). While this assumption might make sense for households, this is not necessarily the case for other final demand categories. Final demand categories in national IO tables can include demand by governments and non-profit organizations, exports and investments and it is debatable whether intermediate demand should be prioritized over these categories.
To quantify the effect of this assumption on the amplification of initial shocks, we implement a mixed proportional/priority rationing algorithm. Here, industries ration intermediate demand proportional analogously to the proportional rationing algorithm (a), but prioritize intermediate demand over final demand. We outline this algorithm below.
Algorithm 2 Proportional rationing among industries; industries are prioritized over final consumers. Take an initial demand vector f [0] = f max as given, implying an initial aggregated demand vector d[1] = Lf [0]. By looping over the index t = {1, 2, ...}, the following system is iterated forward: The algorithm converges to a new feasible economic allocation if d In this case output and final consumption levels are given as The algorithm is similar to the proportional rationing algorithm (a) but differs mainly in one aspect. Only intermediate demand affects the extent of an industry's output constraints, Eq. (12). As a consequence, final demand does not play a role in the creation of input bottlenecks, Eq. (13).
(c) Priority rationing ("largest first"). Since it is not obvious that industries should pass on their output proportionally in case they are not able to meet demand fully, we next consider a type of priority rationing. Industries rank their customers based on demand magnitude and serve larger customers before smaller customers. In the proportional rationing setting an output constrained supplier affects all customers in the same way. Under a priority rationing scheme, however, supply shocks propagate downstream heterogeneously. For example, if a supplier cannot meet demand by only a small margin, most customers will not be affected by the priority rationing scheme. Only the smallest customers will face input bottlenecks, whereas every customer would experience the same small shock in the proportional rationing setup.
Intuitively, a priority rationing rule could make sense, as firms might have an interest in serving more important (large) customers fully, or at least as well as possible, before focusing on less important customers. It also seems closer to practice that firms process orders one-by-one instead of working through all orders simultaneously and leaving them incomplete to the same degree. While a priority rationing scheme could be plausible on the basis of firms or single transactions, it might be less so for more aggregate industry-level data. A link between two industries in IO tables corresponds to many firm/establishment level transactions and so it is not clear if large inter-industry links are due to a few big orders or many small orders. This becomes particularly evident when considering final consumers. Several industries face large demand from private consumers which effectively is the sum of many small orders (e.g. restaurants, grocery, theaters). Since we only consider an aggregate of final demand representing several distinct categories such as private consumers, government and investments, we exclude final demand from the priority rationing scheme. Thus, in the same manner as in the mixed prop./prior. rationing algorithm (b), we assume that intermediate demand is always prioritized over final demand. By adopting this convention, we can formulate the priority rationing algorithm as follows.
Algorithm 3 Largest first rationing; industries are prioritized over the final consumer. Take an initial demand vector f [0] = f max as given, implying an initial aggregate demand vector d[1] = Lf [0]. Every industry i ranks each customers j based on initial demand size: By looping over the index t = {1, 2, ...}, the following system is iterated forward: The algorithm converges to a new feasible economic allocation if d In this case output and final consumption levels are given as (d) Random rationing. As our final case, we again consider priority rationing. Rather than using a fixed ordering scheme based on demand magnitude, we use random priority.
Industries rank their customers randomly and serve customers based on their position in the ranking. While largest-first rationing makes intuitive sense in some cases, it is unlikely to be a good approximation for all real-world settings. In practice, it is likely that other factors such as timing of orders matter. In that case industries could adopt a first-come-first-serve principle to process orders. Since IO data rarely comes with granular time information, we adopt a random ordering of incoming orders that mimics a first-come-first-serve principle under a uniform prior of which orders are coming in first. The algorithm is presented below.
Algorithm 4 Random rationing; industries are prioritized over the final consumer. The algorithm is identical to Algorithm 3, except that the ranking of customer j by industries i, h ij = {k (1) , k (2) , ..., k (j) }, is randomly drawn.
While these algorithms are not guaranteed to converge to a steady-state equilibrium, we observe convergence in the vast majority of our simulation experiments. If the algorithm converges, the economic allocations obtained are automatically feasible. This means that no industry has negative output or produces more than its productive capacities allow, final consumption is non-negative and below given exogenous maximum consumption levels, and there are no input bottlenecks left that further constrain production of downstream industries. The Leontief equation x = Lf holds, which implies that all sales add up to total output.

Results
We initialize these four rationing algorithms with the supply and demand shocks and IO data of Germany, Italy and Spain. We then compare the steady-state equilibrium economic outcomes predicted by the rationing algorithms with the optimization results and the direct shock computations (Appendix A, Tables 2 and 3). Fig. 1 summarizes the main result visually, where a diamond indicates the aggregate final consumption and gross output levels predicted by the different approaches. Note that a data point in the top-right corner indicates high gross output and final consumption values, i.e. limited negative impacts, whereas diamonds in the bottom-left corner represent extremely adversely impacted economies. As already reported in Table 1, for all three countries supply shocks are substantially larger than final consumption shocks, pushing the Direct shock diamond substantially below the 45 degree line. Note that the direct shock market allocations are not feasible, as they ignore higher-order effects, such that a direct supply shock to an industry reduces the inputs of downstream industries and thus reduces their output too.
The best case feasible market allocations are given by the two optimization methods (maximize output vs. consumption), which yield exactly the same predictions on the aggregate and the industry level. This is true even though the two optimization methods are not equivalent. 5 The two optimization methods have the highest output, but they still amplify the initial supply shocks to reduce the output from about 69% to 63% in Germany and from 67% to 53% in Spain.
All the other feasible market allocations, obtained from the rationing algorithms, lie substantially below the best case scenarios. The wide range of predicted outcomes is the most striking aspect of Fig. 1. Both the random rationing scheme and the priority rationing scheme essentially collapse the entire economy. Proportional rationing substantially collapses the economy (with an output below 20% of normal for all countries) and the mixed scheme reduces output for Germany and Spain by more than 70% and about 60% for Italy. Interestingly, all feasible market allocations lie close to the identity line, suggesting similar impacts to output and consumption. On a sectoral level, we find the overall orderings of economic impacts are highly correlated across methods and countries, despite a few pronounced differences. An interesting example is Forestry (A02) which represents the only industry that experiences less adverse impacts under proportional rationing compared to mixed rationing. Due to being non-essential and having a low Remote Labor Index (Appendix A, Table 3), forestry is the industry with the largest supply shocks. Thus, it virtually always faces stronger supply constraints than demand constraints. In case of no prioritization of industries, Forestry receives less demand and thus creates smaller input bottlenecks for downstream industries. This, in turn, leads to smaller input bottlenecks for Forestry as its downstream industries can be found upstream as well.
There is also substantial variation in how close industries are to their theoretical maximum value as determined by the optimization method. When considering the proportional rationing algorithm in Italy, for example, the output levels of the best faring industries (such as Education (P85) or Telecommunications (J61)) reach around 30% of their theoretical maximum. On the other hand, the hardest hit industry, Accommodation-Food (I), is only at a 5% level of what is possible. Thus, Accommodation-Food is not only hit extremely hard by direct shocks, but also experiences large higher-order effects through the rationing dynamics. Fig. 1 makes it clear that the behavioral assumptions imposed on suppliers matter enormously for economic impact predictions. In fact, results vary more across alternative assumptions than across countries.
In the absence of further modeling refinements (such as inventories, adaptive behavior, substitution effects), shock amplification is always pronounced if basic national accounting identities are required to hold. But the actual extent of shock amplification depends strongly on how input bottlenecks are created and passed on downstream in the supply chain.

Shock magnitude effects
We next investigate the sensitivity of economic impact predictions with respect to shock magnitude and network connectedness. While we have seen in Section 4.3 that different assumptions on rationing behavior can lead to entirely different estimates of impact, it is not clear whether these results are specific to the three datasets considered. We therefore conduct a series of simulation experiments to gain a better understanding of the generality of the results.
First, we investigate how the estimates of the various methods depend on the magnitude of shocks. To do this, we rescale supply and demand shocks and we apply the optimization methods and the rationing algorithms to the new shock data. We then redo this analysis for various shock scales. To better differentiate between the qualitative effects of demand and supply shock propagation, we allow for different scaling factors for demand and supply constraints, i.e.
where α S , α D ∈ [0, 1]. Fig. 2(a) shows aggregate output levels for all cases when only demand shocks are scaled between zero and one and when there are no further supply constraints being present (α S = 0, α D ∈ [0, 1]). 6 It becomes evident that predictions made by the rationing algorithms and the optimization methods are identical and scale linearly with the demand shock magnitude. Thus, the rationing algorithms do not differ with respect to upstream shock propagation and always arrive at the optimal solution in absence of further supply side constrictions.  Figure 2: Economic impact as a function of shock magnitude. (a) Aggregate gross output levels as a function of scaling only demand shocks between zero and one (α S = 0, α D ∈ [0, 1]). All methods yield the same economic impact estimates which scale linearly with α S . The black horizontal line indicates that there is no adverse economic impact from supply side constraints. (b) Aggregate gross output levels as a function of scaling only supply shocks between zero and one (α D = 0, α S ∈ [0, 1]). The Random rationing line represents the average taken from 100 samples and the shades indicate the interquartile range. We do not distinguish further between the two maximization methods as results are almost identical.
The picture becomes very different when rescaling only supply shocks and turning off demand shocks (α D = 0, α S ∈ [0, 1]) as demonstrated in Fig. 2(b). Here, the direct impact reduces gross output linearly as the shock magnitude is increased and puts an upper bound to the solutions of the methods considered here. When there are no shocks, α S = 0, all methods recover the empirical IO data as expected. For small shocks we observe that estimated impacts are very similar across different methods, but the proportional rationing algorithm consistently returns the smallest output values. The results of the other algorithms (mixed, priority, random) lie between those proportional rationing and optimization predictions, and are identical for small shocks up to about α S = 0.5. As α S is increased further they deviate dramatically. Under the priority algorithm even a small increase in α S causes the economy to collapse. The random algorithm also causes the economy to collapse, though more slowly, and the mixed algorithm is substantially better. Fig. 2 thus makes clear that the ranking of the impact assessment methods as seen in Fig. 1 is not generic, but strongly depends on the shock magnitude. If there are only small supply shocks present, a priority rationing rule is better than proportional rationing. In this case most of the demand of downstream industries can be met and small shocks only propagate to few customers. In a proportional rationing setup, on the other hand, shocks are passed on to every customer. Despite small shock magnitudes, the wider breadth of shock propagation leads to comparatively larger aggregate impacts.
In contrast, priority rationing exacerbates shock propagation compared to proportional rationing in case of large supply shocks. If industries are severely output constrained and ration based on a priority rule, the demand of several customers' might not be satisfied at all. The Leontief production function, in turn, implies a complete shutdown of these downstream industries due to the input bottlenecks created. More input bottlenecks will be created in further rounds of shock propagation, potentially causing massive collapses. If supply shocks are that large, shock amplification is milder if passed on proportionally to customers. While here every customer experiences some shocks from a constrained supplier, this effect is outweighed by the fact that proportional rationing avoids the creation of even larger idiosyncratic input bottlenecks.

Network density
Intuitively, the extent of shock propagation not only depends on the size of initial shocks but also on how industries are connected with each other. If the production network is dense, i.e. most of the potential links are present, idiosyncratic shocks will spread out very quickly to many other industries in the network. In contrast, if the network is sparse, shock propagation might be more local, at least initially, and takes more steps to spread out in the network.
We therefore conduct an experiment where we again apply the different shock propagation mechanisms to the data, but control for the IO network density. We do this in the following way. First, we randomly eliminate a given number of links in the intermediate consumption matrix Z. 7 We only consider deleting links instead of adding links since the aggregate IO networks we are using are highly dense ( ij 1 {z ij >0} /n 2 > 99%). Note that setting a link z ij > 0 equal to zero without changing final consumption values reduces total output of supplier i, since the accounting identity x i = j z ij + f i has to hold. The output of customer j will not be affected if we assume that the reduction in intermediate consumption is absorbed by a respective increase of j's value added (which does not affect the simulations). After deleting nodes we thus rebalance the economic system by adjusting gross output of the relevant industries such that the basic national accounting identity is satisfied. Next, we recompute the technical coefficient matrix A, the Leontief matrix L and the vector of productive constraints x max to initialize the optimization and rationing simulations. We repeat this procedure 50 times for a given level of density and explore the whole range of possible density values.
We visualize aggregate output levels predicted by the various impact assessment methods as a function of network density in Fig. 3. The plot again confirms that the observed ranking of methods in Fig. 1 is not generic but is strongly affected by the network density. It becomes clear that shock amplification is comparatively small if the network is very sparse. On the other hand, if the network is very dense, as the empirical data would suggest, economic impacts are substantial for all cases. In particular, the gap between the optimal solution and the bottom-up rationing approaches widens with higher network density. Interestingly, the minimal amplification of direct shocks also increases with higher density values, although the size of this effect is rather small.  Figure 3: Economic impact as a function of network density. The network density is changed by randomly eliminating links in the IO network. Solid lines are predicted output values obtained from averaging over 50 samples and shades indicate the interquartile range. Since random rationing is stochastic by itself, we apply this algorithm 50 times to every network sample and take averages and quantiles over the full (pooled) density-specific sample. The actual data corresponds to the very right of the x-axis, as indicated by the diamonds.
If industries have only few suppliers and customers, proportional rationing yields by far the most pessimistic predictions of aggregate impact. If there are many connections among industries, on the contrary, proportional rationing mitigates shock propagation dynamics compared to priority and random rationing. Shock amplification is always mildest if industries use a mixed proportional/priority rationing rule, although even in this case economic impacts increase substantially with higher density.
These results indicate that estimates of economic impact are highly sensitive with respect to the network structure which, in turn, often depends on the level of data aggregation. More aggregated data necessarily implies higher levels of density. For example, industrylevel links are the result of pooling many firm links. Firm-level production networks, on the other hand, are an aggregation of many individual contractual relationships and payments. Imagine applying the rationing mechanisms to a firm-level production network in two ways: first to the actual firm-level data and second to an industry aggregate of the same data. Our results suggest that predicted economic impacts could be substantially larger in the second case, despite using the same underlying data.
Our findings also point out that economic impact predictions can be sensitive with respect to data quality. Many disaggregate firm-level production network datasets are substantially biased, as they frequently include only specific supplier-customer relationships which are subject to specific reporting rules. Thus, we would expect real world production networks to be substantially denser than what the data suggests. Our analysis indicates that such biases could have important consequences for impact assessment.

Discussion
We have shown that existing IO models have difficulties in dealing with simultaneous supply and demand shocks. However, both types of shocks play an important role in situations such as natural disasters and during a pandemic. We have introduced a simple optimization method that allows us to find best case market allocations that are consistent with the exogenous shocks. To obtain more realistic, bottom-up impact estimates, we studied alternative rationing dynamics which differ in how suppliers serve customers in case of output constraints. Using IO data for Germany, Italy and Spain, we found that these bottom-up approaches lead to substantial amplifications of initial shocks, which are much higher than optimal solutions would suggest. We further established that different rationing assumptions can lead to dramatically different economic impact predictions. Moreover, these predictions are highly sensitive with respect to the magnitude of first-order shocks and the production network structure.
It is clear that adequate macroeconomic predictions of pandemic impacts require more sophisticated modeling techniques than the ones studied here. Yet the downside of more complicated models is that the underlying mechanisms of predictions can be difficult to isolate. We therefore studied relatively simple economic models to better carve out key mechanisms of shock propagation in twofold constrained production networks. The choice for simplicity in this study also entails limitations which are important to bear in mind. We did not depart from the assumption of industry-specific Leontief production functions throughout our analysis, although the choice of production function has been shown to be a key variable for impact assessment . While input substitutions might be limited in the short-run, fixed production recipes are nevertheless a strong assumption, in particular for the aggregate data considered here.
It is also important to stress that we did not take any adaptive behavior of economic agents into account and did not allow for the possibility of inventory buildup and depletion. By imposing feasible market solutions, we essentially forced the economy to converge into a new equilibrium. It is not clear, however, that a perturbed complex system such as national economies would quickly approach a new equilibrium state instead of following transient paths for an extended period. In general, we refrained from making the time dimension explicit, although we acknowledge its relevance for shock propagation dynamics.
Despite the caveats mentioned, our analysis makes clear that level of aggregation and data quality play an important role in aggregate predictions of shock amplification. Detailed and high-quality production network data are rare, necessitating researchers to study biased or aggregate data. Inevitably, this will affect the connectedness of economic agents and thus influence shock propagation mechanisms. For example, studies based on large-scale firm level databases report network density values well below 0.01% (Kumar et al., 2021;Borsos and Stancsics, 2020;Peydró et al., 2020;Demir et al., 2018;Huneeus, 2018;Spray, 2017). We should also mention that estimates of direct shocks to supply and demand are subject to large uncertainties. This could have important consequences for model predictions, due to the sensitivity of shock propagation mechanisms with respect to first-order shock magnitudes.
We find that the number of links between industries strongly influences how different behavior rules amplify direct shocks. The level of connectedness is a very simple aggregate network measure, and we would expect that further aspects, such as community structure, degree/strength heterogeneity or (dis-) assortative mixing, play an important role too. Understanding how alternative rationing assumptions interact with structural properties of complex networks would require more detailed production network data, e.g. at the firm level, and could be an interesting avenue for future research.
We conclude by stressing that our analysis is not constrained to pandemic shocks. While the Covid-19 pandemic is a main motivation of our study, simultaneous supply and demand constraints are ubiquitous features of any economy, in particular in the short run. Supply shocks are a prominent characteristic of many natural hazards (floods, earthquakes, hurricanes) and tools of mostly demand-driven IO analysis are frequently applied for impact assessment. Our results indicate that adequately modeling shock propagation in production networks will require a better integration of both types of economic constraints. Inoue, H. and Todo, Y. (2020), 'The propagation of economic impacts through supply chains: The     Table 3: Industry-specific supply shock details. xi denotes gross output per industry as share of aggregate output. S i is the total supply shock per industry. ei is the extent to which an industry is considered as essential following government policies. RLIi is the Remote Labor Index.

B Details on mixed endogenous/exogenous modeling
A core motivation to study shock propagation based on alternative, bottom-up approaches was our observation that existing methods such as the mixed endogenous/exogenous model (MEEM) yields infeasible solution when applied to pandemic shocks. In the MEEM the n industries are divided into two groups. The first group is the set of n s supply constrained industries and the second group the n d demand-constrained industries (we have n s +n d = n). We can use this setup to partition Eq. (4) into where superscripts s and d denote supply and demand constrained industries, respectively. The matrix block A sd indicates the input recipes of demand constrained customers with respect to output constrained suppliers and analogously for the other blocks. In this framework vectors f s and x d are endogenous and f d and x s exogenous. Rearranging Eq. (24) such that all endogenous variables appear on the left-hand side and all exogenous variables on the right-hand side, yields (for details see Miller and Blair (2009), 621-633).
To apply the MEEM in the pandemic context, we categorize industries into a demand and a supply constrained group based on which shock is larger. If the supply shock of an industry exceeds its demand shock in absolute terms, we treat this industry as supply constrained and vice versa. The shock magnitudes for supply and demand for each industry are given as where d SS i denotes the total supply shock and f DS i the demand shock. If x SS i > f DS i , we consider this industry as supply constrained and we will use its gross output values on the right hand side of Eq. (25). Otherwise we treat it as demand constrained.
Following this approach, we apply the MEEM to the IO data of Germany, Italy and Spain by calibrating it to the estimated pandemic supply and demand shocks. As shown in Fig. 4, the MEEM does not yield a feasible solution for any of the three countries. Violations of feasibility conditions are most frequent for Spain, which faces the largest shocks to supply and demand. The model does not compute any negative final consumption values for Germany, but still allocates final consumption values to industries which are larger than f max i . Note that the results obtained by the MEEM are out of the solution space delimited by the exogenous constraints on output and consumption. Thus, these results are difficult to interpret in this context and we thus refrain from comparing them more systematically with the results shown in the main text. q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q q   The MEEM can yield infeasible economic allocations and it depends on the context whether negative final consumption values are meaningful or not (Miller and Blair, 2009, p. 628). To see why the MEEM can give negative final consumption values, let us consider the output-constrained part of Eq. (25), which can be rewritten as (28) Note that the vector (A ds x s + f d ) is always non-negative by definition, as is every element of the matrix A sd [I − A dd ] −1 . (This is clear from invoking the Hawkins-Simon conditions).
Thus, for f s ≥ 0, [I − A ss ]x s must be non-negative and larger than the part to the right of the minus in Eq. (28). However, this term can be negative for supply shocks that are sufficiently heterogeneous. For example, consider the case of an economy with only two supply-constrained industries without self-loops, i and j. Any supply shocks which lead to x max i < a ss ij x max j yield negative final consumption values for industry i. This demonstrates that the MEEM framework is unlikely to yield plausible solutions in the current context.
The MEEM can also lead to final consumption values that lie above any given prespecified upper limit of consumption f max i . Let us again consider an example of two industries, i and j, where i is supply constrained and j is demand constrained. If industry i only supplies industry j and final consumers and industry j only supplies to final consumers, it can be verified that Thus, in case industry i is only slightly supply constrained (supply shocks are only slightly larger than demand shocks) and industry j faces comparatively serious demand constraints, the MEEM would compute larger final consumption values for industry i than are possible. The supply and demand shocks do not need to be large for the MEEM to generate infeasible solutions. To show this we scale down the size of the supply and demand shocks by varying a parameter α ∈ [0, 1] to obtain new maximum output and consumption values, according to Since we scale demand and supply shocks by the same proportion this does not change which industries are supply or demand constrained. Fig. 5 shows the MEEM results for varying directs shocks. If α = 0, there is no direct shock, resulting in a feasible market allocation since in this case the MEEM simply recovers the pre-shock economy. This is indicated by the green colors at the very left of all three panels. But even for very small α > 0 we obtain infeasible solutions for all three countries as shown by the gray colors. If we increase shock sizes further, it becomes more likely that the model computes negative final consumptions values as can be seen from the transition of red colors into gray when following the x-axis from left to right.

C Details on shock magnitude effects
In the main text we have shown the effect of scaling either supply or demand shocks on aggregate output. We also explored shock amplification effects when scaling both, supply and demand shocks, simultaneously. Fig. 6 shows the effect of different shock magnitudes on aggregate output and final consumption values. Results are fairly similar for aggregate values of output and consumption and are also in qualitative agreement with the results presented in Fig. 2.

D Details on network density
In Section 4.3.2 we removed links randomly and repeated this procedure multiple times for any desired network density value. While random edge removal is one possible approach, other procedures could be followed too. A natural alternative to random edge deletion is to first delete small links. While the high aggregation of the data results in almost complete graphs, link sizes are highly heterogeneous, implying the existence of many very small links (McNerney et al., 2013;Cerina et al., 2015). It could be argued that many of these links are rather an artifact of data aggregation instead of encoding a fixed production recipe. We therefore repeat the procedure of Section 4.3.2 but eliminate smaller before larger links to achieve a given level of network density. Doing this results in Fig. 7 which indicates qualitatively similar results as Fig. 3 of the main text.  The elimination of existing IO links changes key properties of the underlying economic system. As discussed in Section 4.3.2, removing intermediate consumption values will reduce aggregate output. Figs. 8(a) and 8(b) visualize the relationship between output and network density following the random link and "smallest-first" removal approach, respectively. Similarly, the ratio intermediate consumption over aggregate output will be reduced as a consequence. A density value equal to zero means that there is no intermediate consumption left and firms only use primary factors as inputs in production. Fig. 8 also shows that the average output multiplier decreases when making the network sparser, although not necessarily monotonously. Overall, the economic indicators change fairly linearly with respect to network density if links are randomly removed, whereas these relationships are highly nonlinear if smaller edges are eliminated before larger ones. The network density is changed by eliminating smaller before larger links (corresponding to Fig. 7). Multiplier refers to the (unweighted) average multiplier of the economy, ij lij/n, after rebalancing as percentage of the initial economy. Intermediate denotes the share of intermediate consumption in total output, ij zij/ i xi after rebalancing the economy. Output is total output after rebalancing divided by initial total output.