Stocks tumbled yesterday on the news of an imminent government shutdown, but now that the U.S. government has actually shut down, stocks are starting to rally.

On Monday, the S&P 500 (Indexsp:INX) fell 0.6 percent, the Dow 30 (INDEXDJX: .DJI) fell 0.8 percent and Nasdaq (INDEXNASDAQ:.IXIC) fell 0.3 percent. But on Tuesday they mostly made up for Monday's losses. So is a government shutdown a cause for investors to worry?

This isn’t the first time the U.S. government has shut down. Historical evidence suggests that government shutdowns don’t really affect equities all that much. In fact, if you look at the S&P 500 performance around the last 17 U.S. government shutdowns, the index rallied in eight of the instances.

In fact, the median performance of the S&P 500 a month after the conclusion of the shutdowns was a rise of 0.7 percent.

Here’s a detailed look at how the S&P 500 performed before, during and after the last 17 U.S. government shutdowns:

SP shutdowns-01
Here’s how the S&P 500 fared in past U.S. government shutdowns: IBTimes/Lisa Mahapatra