As rising costs crimp corporate profits and curb consumer demand, certain stocks have a track record of performing well during periods of faster inflation. Inflation is at generational highs. The April consumer price index jumped 8.3% from the prior year, about a 40-year high. A pair of disappointing quarterly reports this week from big-box retailers revealed the effects of inflation on corporate results. Target on Wednesday posted first-quarter earnings much lower than Wall Street estimates, while Walmart ‘s report on Tuesday also missed expectations. The two companies cited higher fuel costs and mounting inventories as consumers tighten up their discretionary spending. To find stocks to meet the moment, Bank of America looked for S & P 500 companies whose share price performances have historically corresponded with a rise in inflation. The bank shared its findings with clients in a research note earlier this month. Take a look at 10 of Bank of America’s pro-inflation stock picks. A number of names on the list are energy and materials stocks. They tend to benefit from rising commodity prices, which have climbed this year as the war in Ukraine disrupts global supplies. Occidental Petroleum is one energy name to make Bank of America’s pro-inflation list. The stock is the best performing in the S & P 500 this year by far, more than doubling in 2022. The oil giant is also a favorite of Warren Buffett’s Berkshire Hathaway , which built a $12 billion stake in Occidental as of the end of the first quarter . Fertilizer stock Mosaic , another notable outperformer this year, also made Bank of America’s screen. Shares are up 67% this year, versus the S & P 500’s 14% decline. Caterpillar also weathers inflation well, according to Bank of America. The machinery and equipment maker is beating the market this year, up 3%. Other stocks in the screen include Nucor , Deere and Apple . Bank of America also highlighted an “anti-inflation screen” of stocks whose relative performance tends to suffer when inflation picks up. Sure enough, Walmart appears on the firm’s anti-inflation list, along with Amazon , Best Buy and Home Depot . — CNBC’s Michael Bloom contributed reporting.