In what follows, we draw on these techniques to model contagion stemming from unexpected shocks in complex nancial networks with arbitrary structure, and then use numerical simulations to illustrate and clarify the intuition underpinning our analytical results. Our framework explicitly accounts for the nature and scale of aggregate and idiosyncratic shocks and allows asset prices to interact with balance sheets. The complex network structure and interactions between nancial intermediaries make for non-linear system dynamics, whereby contagion risk can be highly sensitive to small changes in parameters. We analyse this feature of our model by isolating the probability and spread of contagion when claims and obligations are interlinked. In.