Finance managers started getting into technology stocks to hedge against inflation and Fed rate hikes, CNBC’s Jim Cramer said Tuesday.

Rising raw costs drove inflation up 5.4% last month, the largest increase in consumer prices in more than a decade.

This sparked concerns among some investors that the Federal Reserve might hike interest rates earlier than planned to fight inflation, Cramer said.

“If you want an industry that is immune to both inflation and a Fed-induced slowdown, then it is big-cap technology,” said the moderator of “Mad Money” after the market closed.

“Hypergrowth tech stocks are actually what works best during a slowdown.”

Despite the inflation figures, the market had hardly reacted as Wall Street expected the consumer price index to rise, said Cramer. The major US averages all retreated from the previous day’s record closing, with the Dow Jones Industrial Average falling more than 100 points.

Investors also keep an eye on the start of the profitable season.

Many companies cannot afford to pass their higher costs on to consumers because people are rebelling. Likewise, not everyone can handle a sudden rise in interest rates, which is what many asset managers rely on. Cramer thought that was unlikely.

“I do not think so [Fed Chair Jerome] Powell will change his mind, but there are many money managers who disagree, ”he said [inflation] Numbers like this, they sell a lot of other things and buy technology. “

It explains a breakout in trading with big tech names like Google parent Alphabet and Microsoft, the software giant. Their stores are not tailored to changes in inflation, including spikes in gas, plastics, packaging and other prices, Cramer said.

Alphabet shares rose 0.29% to close at $ 2,546.83 while Microsoft closed at $ 280.98, up 1.3% on the session.

Apple, which makes a range of devices, can be adversely affected by higher material costs. But the brand is selling and those costs can be covered by their customers, Cramer said. Apple stock was up 0.8% on Tuesday to $ 145.64.

Cramer said a stock like PepsiCo is an exception to the rule in the consumer staples space. While the company faces higher input costs, including packaging and shipping, it can pass those on to consumers in the form of higher prices for beverages, chips and other products, he said.

Pepsi stock rose 2.3% to close at $ 152.96 after the company released a strong earnings report and raised its outlook.

Disclosure: Cramer’s nonprofit trust owns shares of Microsoft, Apple, and Alphabet.

Disclaimer of Liability

Questions for Cramer?
Call Cramer at 1-800-743-CNBC

Would you like to dive deep into Cramer’s world? Open it!
Mad Money Twitter – Jim Cramer Twitter – Facebook – Instagram

Questions, comments, suggestions about the “Mad Money” website? madcap@cnbc.com