Gains from trade and the sovereign bond market The empirical literature shows that when sovereigns default trade volumes collapse, suggesting that trade openness of a country discourages defaults. I construct a simple two country model and show that this is not necessarily the case. Upon default, two opposing forces operate: an improvement in the terms of trade, which increases the sovereign's share of the gains from trade, and a reduction in the size of the total gains from trade. I show that under reasonable parameter values, the latter effect dominates: default costs are higher when the country is more open to trade. This leads to a lower interest rate in the sovereign bond market. By opening up to trade, the country enjoys not only the traditional gains from trade but also additional welfare gains, because the sovereign is now able to borrow more. Simple calibration implies that the additional gains are non-negligible in magnitude. This shows that a country may well achieve welfare gains in markets other than the goods trading market upon trade liberalization. Imperfect Competition and the Transmission of Shocks: The Network Matters (joint with Emmanuel Dhyne and Glenn Magerman) This paper studies the aggregate implications of the firm-to-firm production network structure. Using a dataset on all domestic transactions between Belgian firms, we establish two facts: firms charge higher markups if they have higher input shares within their customers, and firms experience larger churn of suppliers if they face a larger reduction in foreign goods' prices. Motivated by these two facts, we build a model where firms compete as oligopolies to supply inputs to each customer and where firms optimally choose their suppliers. The network structure becomes irrelevant in a benchmark case where we impose perfect competition and hold the network fixed. In this case, firm-level variables are sufficient to compute the welfare response to a large fall in import prices. Allowing for oligopolistic competition generates two counteracting forces within supplier-customer pairs. A supplier raises its markup to a customer when its costs decline, but it reduces the markup if other firms supplying the same customer receive the shock. Further, allowing for endogenous networks amplifies the impact of the shock as firms begin importing and begin sourcing from other firms exposed to the import shock. Due to the omission of these dynamics, the aggregate response in the benchmark case is less than one quarter of those in the full estimated model. Trade and Domestic Production Networks (joint with Felix Tintelnot, Magne Mogstad and Emmanuel Dhyne) We use administrative data from Belgium with information on domestic firm-to-firm sales and foreign trade transactions to study how international trade affects firm efficiency and real wages. The data allow us to construct the buyer-supplier network of the Belgian economy. We document that most firms that do not directly import or export still have large indirect exposure to foreign trade, and that a firm's output is affected by idiosyncratic shocks to its buyers and suppliers. These empirical findings motivate and guide the development of a model with domestic production networks and international trade. We obtain new sufficient statistics results for the effects of trade in a model with fixed network structure, and we develop a tractable model of endogenous domestic production networks. Comparing our results to those we obtain using existing approaches highlights the importance of data on and modeling of domestic production networks in studies of international trade.