Following the destruction of the second Death Star (a much bigger version, at a cost of $419 quintillion) and the fall of the Galactic Empire, I presumed there would be an immediate default on imperial debt, a drop in asset valuations (comparable to equities after Sept. 11) and a potential for cascading defaults in the financial sector. Because the financial system in “Star Wars” lacked any meaningful regulation, the resulting financial crisis was larger than I ever imagined. Without a financial bailout of 20 percent of the entire galactic economy, the victory of the Rebel Alliance would cause a galactic depression that would compare to the Great Depression, or worse.

When the Rebel Alliance emerged victorious in “Return of the Jedi” and, presumably, chose to repudiate the imperial debts from both Death Stars, there would have been a drop of nearly 8.5 percent in gross galactic product (G.G.P.), according to my analysis, an almost sure path to economic depression. In only 40 percent of my simulations, the financial system absorbed this shock to the banking sector. However, the other 60 percent of cases set off a systemic crisis that crippled the galactic economy.

Did the Rebel Alliance foresee the economic consequences of destroying the second Death Star and take steps to mitigate an economic collapse? Without intelligent economic policy, a bailout of 15 percent to 20 percent of G.G.P. would have been necessary simply to limit the galactic economic fallout to something comparable to the gross domestic product decline at the heart of the Great Recession.

Fortunately, “Star Wars” is a work of fiction. Unfortunately, as we witnessed in 2008, financial systemic risk is a very real threat to the economic well-being of the United States and the world. As with a medical epidemic, understanding the causes, symptoms and progression of a contagious event is necessary to prevent economic illness. Financial contagion is the spreading of losses of individual institutions to other firms, and ultimately to the whole economy. That contagion can occur through local or global interactions: for example, locally through direct financial obligations, and globally to any bank through the impact on asset prices.

BECAUSE of the large cost to society, it is important that we accurately model what occurs in a systemic crisis. This is why my model of the “Star Wars” economy — a system of mathematical equations — is not entirely silly. Financial-contagion models provide a glimpse into how the financial sector can affect the health of the entire economy. Just as I made simplifying assumptions to price the Death Star, researchers construct mathematical models (in all fields) by looking at the world and translating what they observe into mathematical formulas.