CNBC's Jim Cramer on Monday said investors can get an idea of how the market could perform in the second quarter by understanding how the major averages rallied during the first quarter of the year.

The Nasdaq had the biggest gain — 16 percent — to open the year. The rallied 13.1 percent and the Dow Jones Industrial Average added 11 percent in the first quarter. The indexes all added more or less 1.2 percent during Monday's session.

"I think the stock market benefited from a dearth of new supply" due to the government shutdown, its impact on IPOs and the high-volume of company stock buyback programs, the "Mad Money" host said. "I think this market can go higher as long as we don't get overwhelmed with new supply from this wave of IPOs, because I think the valuations are still too low for so many stocks, like we see from the top five performers in the Dow."

It was a "fabulous windfall for investors" until Friday, Cramer said, when Lyft went public at $72 a share and traded as high as $88. The share price fell to nearly $69 at Monday's close.

"That action in Lyft is not a good sign for the stock market," he said. "We've got a trillion dollars' worth of private companies that are looking to have IPOs, and if their stocks act like Lyft's and no new money comes into the market, the supply of new stock will crush the averages."

Cramer took a look at the Dow's highest-performing stocks in the first quarter to predict the future.