I therefore start by describing a static version of the model where the network of trade relations between rms is xed. I refer to tom as the economy's matching function, which completely captures the extensive margin of rm-to-rm trade relations in the economy.

## Model environment

It is assumed that rm-to-rm trade relations are also temporally sticky in the following sense: at each date each relation with probability 1−ν gets the opportunity to be changed along the extended margin.12 I refer to this as the reset shock , and assumed to be independent across all rm pairs. 12That is, to be activated if previously inactive, and to be terminated if previously active.

## Dynamic market equilibrium

Note that although ξt is assumed to have a unit mean, rms in dynamic market equilibrium choose ratios based on realized values of ratio cost shocks. Therefore, finding the uniqueness of the solution of these equations and thus the dynamic market equilibrium is not trivial. Recall from Proposition 3 that the static market equilibrium is inefficient with respect to the social planner's allocation due to monopoly markups charged by rms.

The same static inefficiency characterizes the market equilibrium distribution in each period of the dynamic model. In section B.2 of the appendix, I show that the scheduler's solution is characterized by the following proposition. First, because of the monopoly markup distortion discussed in section 2.2.5, the static social value of a given relationship (measured by πSP) differs from the value of the prots by which the value relationship is sold of rms in market equilibrium.

## Data

Since the implementation term Ct potentially changes over time, the planner evaluates changes in the broad range of rm relationships accordingly. This effect appears through the Ct+sCt term in equation (3.18), but is absent in the RMs' decision-making processes about which relationships should be activated and terminated at any given date. I use Compustat data to measure the dynamic moments that are also used in the estimation.

Parametric assumptions

## Estimation procedure

Third, since the Capital IQ and Compustat data do not include trade transaction values from which substitution elasticities are typically estimated, I set the value of σ to 4, which is a typical value estimated in the literature.15. However, a potential indeterminacy arises from the fact that a large number of active relationships can also be rationalized in the model by a low value of the average relationship cost ψ. To avoid this indeterminacy in the estimation procedure, I therefore normalize α to a value arbitrarily close to but less than one, and instead rely on data to estimate the magnitude of average relationship costs.

This approach can be interpreted as assuming that the costs of relationship formation include not only the resources that must be devoted to managing that relationship, but also the costs of technological innovation - such as prototyping and customizing products - that are necessary to use the seller's goods. in the customer's production process. The average cost of the ratio ψ, which controls the overall level of connectivity in the production network, is in principle also directly related to the empirical average number of stages. However, this is complicated by the fact that degree counts are continuous in the model but discrete in the data.

## Estimation results

As with the empirical distribution of employment income, the employment distribution in the data set is well approximated by a log-normal distribution, which the model approximates. Finally, Figures 8 and 9 show t models of the assortativity match between rms, indicating whether larger and more connected rms are associated with rms that are also larger and more connected (positive matching) or with rms that are smaller and less connected (negative match). With the assumed parametric form for the ratio cost distribution, the model mimics the latter pattern, but not the former.17.

Starting from the steady-state of the model corresponding to the parameter values estimated above, I first group the set of rms in the economy by deciles of the rm size distribution. This allows us to separate the short-run eects of the shock (with the production network taken as xed) from its long-run eects (when endogenous ratio adjustments are taken into account). We now examine how the structure and dynamics of the production network have an impact on these welfare responses.

## Relationship heterogeneity

As might be expected, shocks to large rms have a much larger effect on household welfare than shocks to small rms. This can therefore be interpreted as a market model of production rather than the network model developed in this article. Market model simulations are then used to calculate the welfare effects of the same hypothetical rm-level shocks described above.

The main point from this analysis is that accounting for the heterogeneous distribution of relationships between RMs leads to lower predicted shock effects for small RMs and larger predicted shock effects for large RMs. In terms of magnitudes, the deviations of predicted welfare effects in network and market models can be large. The market model under-predicts the welfare effects of shocks to RMs in the largest decile by between 10%-20%, while over-predicts the welfare effects of shocks to RMs by even larger percentages.

## Supply chain heterogeneity

5.1), where Φ is the network productivity function before the shock, and the superscript (0) denotes the zero-order shock effect. Now, if only the rms directly affected by the shock change their intermediate input prices, the first-order change in network productivity is given by: . In other words, each iteration of the value function (already used to solve the model in the first place) successively captures the higher-order effects of downward or upward shock propagation.

Therefore, to quantify the importance of the heterogeneous positions of RMS in their respective supply chains, one can simply study the consequences of a shock at each stage of this iterative process. From this one can see that the rate at which shocks to fundamental characteristics decay downstream and upstream of a supply chain is determined by the values of µ1−σ and µ−σ, respectively.19 The downstream decay parameter µ1−σ strictly decreases in σ, and even for a value of σ as low as 2, the decay parameter is only as large as 0.5. Consequently, at reasonable values of σ, the higher order effects decay rapidly relative to the direct effect of the shock.

## Relationship dynamics

In simulations of the planner's solution to the same supply and demand shocks, short-term welfare is always weakly lower than long-term welfare. This article presents a new theory on how heterogeneous rms create and destroy trading relationships with each other, and how these rm-level decisions influence the structure of the production network and its evolution over time. The numerical analysis highlights how the structure and dynamics of the production network matter for the propagation of supply and demand shocks at the rm level, with three main conclusions.

Third, the dynamic propagation of shocks is quantitatively important, as the total effects of shocks at the rm level can die out significantly once the endogenous adjustment of the production network is taken into account. First, given that the model market equilibrium is shown to be inefficient, a natural question is whether there are market structures that lead to efficient outcomes. The endogenous formation of ties between players and coalitions: An application of Shapley value, in Roth, Al (ed.), The Shapley Value, Cambridge University Press.

Static algorithm

## Dynamic algorithm

If R > for some tolerance level, update guesses for network productivity and scaled quality functions according to Φˆ0 = ˜Φin ∆Hˆ∆. I will now discuss the computational algorithm used to solve the transition dynamics of the model as specified in Definition 2. The goal is to solve the transition path of the model to a possible steady state, which is indicated by the matching function denoted by mss.

Note that given the matching function mt, it is easy to solve the static market equilibrium at date t using the algorithm discussed in section A.1. IfR > for a given tolerance level, update the network productivity estimates and scaled quality functions according to Φˆ0t = ˜Φt and∆Hˆ∆. If Rπ > π for a given tolerance level π, update the estimates for the prot functions according to πˆt0 = ˜πt for all t∈n.

## Static eciency

Note that, given the guesses of future prot functions, step 3 of the algorithm has the same computational complexity as solving for the model's steady state, and this part of the computation can be sped up by the terminal guesses at the previous date to be used when initializing the guesses for the network characteristic functions in step 3(a). Furthermore, increasing the guess for Tˆ to Tˆ + 1 in step 5, the new guess for the prot functions at date Tˆ used in step 2 can be the previous terminal guesses for the prot functions up to that date is introduced, which also speeds up the calculation. With a grid size of Ngrid = 20 and tolerance levels = π = m = 10−4, the execution of the steady-state algorithm typically takes about 30 seconds, while solving a transition path such as that discussed in the main text usually takes about one hour on a standard computer.

Because estimating the parameters of the model only requires solutions for stationary equilibria, the complexity of implementing the dynamic algorithm does not play a role in the tractability of estimating the model. This tells us that the static market equilibrium allocation is identical to the planner's allocation if and only if the surcharges charged by all rms are equal to one. With an infinite elasticity of substitution σ, the static market equilibrium is therefore inefficient with respect to the planner's allocation due to the distortion of the monopoly mark-up.

## Dynamic eciency

To study the planner's dynamic optimization problem, let Vt(mt−1) denote the present value of discounted household utility at date under the planner's optimal dynamic allocation when the matching function in the previous period is given by mt−1. At each date t, the planner's choice about which relationships to activate and terminate is equivalent to a choice about the values {ξmax,t(χ, χ0)}(χ,χ0)∈Sχ2 , where ξmax,t(χ , χ0) species the maximum value of the idiosyncratic ratio cost shock component for which χ−χ0 rm pair relationships are assumed. The first step in solving the dynamic planner's problem is to find an expression for the derivative of Ut with respect to ξmax,t∗.

Note that equation (B.24) summarizes the effect of a change in the mass of connections between χ∗ − χ∗0 rm pairs on the network productivities of all rms downstream of the χ∗ rms.) Dierentiation equation (B .14 ) with respect to ξmax,t∗ and using (B.19) and (B.24), we then obtain:. B.26) Note that conditional on the characteristic functions of the network, π˜t differs from the prot function πt in the dynamic market equilibrium (given by equation (3.5)) only by a constant fraction µ−σ. The next step in solving the planner's problem is to derive an expression for the derivative of the continuation value Vt+1(mt) with respect to ξmax,t∗. By combining the equations (B.25) and (B.30) we can finally write the first-order condition with respect to ξmax,t χ, χ0.

## Calculation of moments

To estimate the main parameters of the model, a simulated method of moment engineering is used. Directed moments are calculated from both the data and the model, as discussed in section C.1. In the data, I first normalize the empirical in- and out-degree distributions by their means.

In the data, I first consider the set of positively scaled rms Stin for each year t Nyear−1}, where Nyear is the number of years of observations in the Compustat data. In addition, I also calculate the fraction of suppliers ρsup of each RM that are retained in year t+ 1. For relationship creation rates, moments are calculated from the data in the same way.

Optimization algorithm