Copyright CNBC

CNBC's Jim Cramer analyzed Monday's session, saying stocks — especially tech names — managed to rebound from last week as Wall Street sees an end to the government shutdown. "With the government potentially about to reopen, it's back to business as usual, and that means the data center stocks come roaring back," he said. The indexes climbed during the session, with the Dow Jones Industrial Average finishing up 0.81%, the S&P 500 adding 1.54% and the tech-heavy Nasdaq Composite gaining 2.27%. After weeks of deadlock, lawmakers took steps towards reaching a deal that would pass a federal funding bill and end the shutdown. The market suffered last week in part because investors worried about the ongoing government shutdown, Cramer suggested, which was crippling air travel and weakening consumer confidence. The shutdown could wreck GDP growth during the holidays, he added, which is large part of the economy. But at the first sign of a deal, Cramer continued, money came "pouring back into the stock market." Cramer also noted that many investors last week grew wary of the enormous valuations of certain artificial intelligence stocks, including industry leaders Nvidia and Palantir . But stocks related to the data center popped on Monday, with Nvidia jumping 5.79% and Palantir adding 8.81%. Cramer suggested some of these companies saw gains because it seems that hyperscalers won't stop AI buildout for fear "they'll be left in the dust by competition." "As much as the stock market seems nuts, it's not as nuts as you think," he said. "That's what everyone who shorted the AI plays found out today."