U.S. Capitol is seen shortly after beginning of the Government shutdown in Washington, U.S., January 20, 2018.

The U.S. government shut down on Saturday, and that could spell some trouble for the stock market this week before investors eventually shrug it off as political noise and bid shares higher, history shows.

CNBC analysis using Kensho found that the fell an average of 0.3 percent one week after the government closed its doors. But the benchmark index didn't always fall, trading positively 40 percent of the time one week after a shutdown.

One of the best-performing assets one week after a shutdown has been the Cboe Volatility Index, also known as the VIX and considered the best gauge of fear in the market. It traded positive 75 percent of the time one week after a shutdown and averaged a return of 9.7 percent.

Stocks opened lower on Monday. The Dow Jones industrial average declined 56 points, while the S&P 500 traded just below the flatline.

Concerns of a shutdown increased volatility in stocks last week. Last Tuesday, the Dow erased a 283-point gain. The S&P 500 also saw its advances evaporate, closing 0.4 percent lower after rising as much as 0.8 percent in that session.

Congress needed to pass a spending bill by the end of Friday to avoid a government shutdown. A point of contention between Republicans and Democrats is an immigration bill that Democrats want to pass.

On Sunday, however, Republican lawmakers were getting behind a plan that would keep the government funded through Feb. 8. Meanwhile, some Democrats are preparing to give immigration concessions to the GOP.

This is the first U.S. government shutdown since 2013.

But the pullback in stocks after a government shutdown is often short-lived, history shows. The S&P 500 averaged a return of 2.1 percent a month after a shutdown and traded positive 80 percent of the time.

The VIX, meanwhile, averaged a return of just 0.9 percent a month after a government shutdown.

"Anyone with capital markets experience knows that US government shutdowns are largely meaningless in the context of financial asset values," said Nicholas Colas, co-founder of DataTrek Research. "Getting sucked into a series of seemingly ominous headlines that smarter players already understand is a typical rookie trading mistake."

Disclosure: NBCUniversal, parent of CNBC, is a minority investor in Kensho.