The U.S. congressional standoff that shut down the federal government for the first time in 17 years is a buying opportunity for stock investors, if history is any guide, Bloomberg reported.

The Standard & Poor's 500 Index has risen 11 percent on average in the 12 months following a government shutdown, according to data compiled by Bloomberg on the 12 instances since 1976. That compares with an average return of 9 percent over 12 months. In all the cases, the U.S. equity benchmark was higher by the end of the next two years.

While the S&P 500 has fallen seven of the past eight days on concern the political deadlock over the U.S. budget and debt limit will hurt the economy, investors at Raymond James Financial and PNC Wealth Management say equities will recover as profits rise.

Analysts' forecasts show earnings will increase at the fastest pace in two years during the fourth quarter. More than 300 companies in the S&P 500 are scheduled to report results this month, according to data compiled by Bloomberg.