The government shuts down. The economy unravels. Stocks plunge.
That may be Wall Street's worst fear, but history shows it's mostly overblown.
There have been 17 government shutdowns since 1976, ranging in length from one to 21 days. None has caused a market meltdown.
The average decline in the during a shutdown lasting 10 days or more is about 2.5 percent. For shutdowns lasting five days or fewer, the average decline is 1.4 percent.
"If they shut the government down for two days, the world's not going to stop revolving," says Ron Florance, deputy chief investment officer for Wells Fargo Private Bank.
Shutdowns may even offer a buying opportunity.
Investors should consider the improving outlook for the global economy instead of worrying about Washington.
This isn't August 2011, when the government hit the debt ceiling and the Dow Jones industrial average endured three weeks of triple-digit swings. Europe's economies are no longer is crisis and the U.S. recovery is farther along.
In fact, stocks rose 6.5 percent in the first three months of 2013 heading into the most recent government "crisis," the start of the automatic federal budget cuts, also referred to as the sequester.
(Read more: Why markets shouldpray for a government shutdown)
Still, investors this week have been warily eyeing Washington's budget negotiations. If a budget fails to pass, a government shutdown could start as soon as Tuesday. The stock market has fallen six of the past seven trading days. While the two percent decline over that stretch is modest, it shows that investors have been leery of buying stocks ahead of two big financial deadlines for U.S. government.
Congress needs to pass a funding bill to keep the government operating after Oct. 1, when the new fiscal year starts. There is also the nation's debt ceiling, which needs to be raised before Oct. 17.
Investors worry that a potential shutdown or default could damage consumer confidence and the U.S. economy.
During Ronald Reagan's presidency from 1981 to 1989, shutdowns were a fairly regular occurrence and the government faced a funding shortfall on eight occasions. However, none of those lasted more than three days and many of them occurred over a weekend. Since stocks don't trade over the weekend and the shutdowns were brief, investors had little reaction back then.
When shutdowns are prolonged and federal employees are out of work for weeks, the effect on the market is usually more negative. Under the Gerald Ford and Jimmy Carter administrations, when the government was shut down for 10 days or more, the average decline for the stock market was more than 3 percent during closures.
But in the last major pair of shutdowns, from November 1995 to January 1996, the stock market actually rose.
(Read more: Art Cashin: Expect a 'very tough Monday')
President Bill Clinton and the Republican House leader Newt Gingrich failed to agree on a plan to reduce the nation's budget deficit as well as cuts to Medicare premiums. As a result, the government shut twice over three months. First, it closed for five days between Nov. 13, 1995 and Nov. 19, 1995. Then a second shutdown lasted 21 days, from Dec. 15, 1995 to Jan. 6, 1996.
The S&P 500 rose 4 percent between Nov. 13 and Jan. 6, suggesting that investors were focused elsewhere. The stock market had just started its five-year, technology-fueled bull run, during which the S&P 500 more than doubled.
Even if the government shuts again, investors should take a long view because Europe and the U.S. are more stable than two years ago, says Dan Veru, chief investment officer of Palisade Capital Management.
"If things get really tricky, maybe there will be a three to five percent pullback," in stocks, Veru says.
Is it worth rearranging your stock investments? No.
Including this week's slight pullback, the S&P 500 is up 19 percent this year and just below its all-time high of 1,725.52 set Sept. 18.
On Friday, the index closed at 1,691.75.
"By the end of the year, when all of this blows by, stocks will be higher than they currently are," Veru says.
Shutdowns of more than 10 days:
— 1976 Shutdown:
From Sept 30 to Oct. 11 under President Ford. S&P 500 goes from 105.24 to 101.64.
— 1977 Shutdown:
From Sept. 30 to Oct. 13 under Carter. S&P 500 starts at 96.53 and ends at 93.46.
(Read more: Blackstone: We're in an 'epic credit bubble')
— 1978 Shutdown:
From Sept. 30 to Oct. 18 under Carter. S&P starts at 102.54 and ends at 100.49.
— 1979 Shutdown:
From Sept. 30 to Oct. 12 under Carter. S&P goes from 108.56 to 104.49.
— 1995-1996 Shutdown:
From Nov. 14 to Nov. 19, 1995, under Clinton, the S&P goes from 592.30 to 600.07. And from Dec. 15 to Jan. 6, 1996, the S&P goes from 616.92 to 616.71.
—By The Associated Press.