Image source: Micron Technology.

What: Shares of memory-chip maker Micron Technology (NASDAQ:MU) surged 18.3% in May, according to data provided by S&P Global Market Intelligence. News of slowing DRAM supply growth and an analyst upgrade triggered the rally.

So what: Micron has seen its revenue and profits tumble in recent quarters as oversupply in the DRAM market led to steep price declines. During Micron's fiscal second quarter, sales fell 30% year over year and the company posted a $97 million net loss.

With the PC market in decline and smartphone sales slowing, the worst-case scenario for Micron involves a prolonged period of weak prices and major losses. On May 18, Bernstein raised its price target on Micron to $11 per share, citing reports that Samsung was slowing its DRAM supply growth. Bernstein suggested that DRAM supply tightness could manifest itself by the second half of next year.

This news seemed to ease fears that Micron's situation wouldn't improve any time soon. During Micron's earnings conference call in March, CEO Mark Durcan stated that the company wouldn't cut its own production unless it saw negative cash margins. If all of the major competitors follow the same strategy, there would almost certainly be more pain ahead. But it now seems, at least according to Bernstein, that Samsung is taking its foot off the pedal.

Now what: It's impossible to consistently predict how DRAM prices will evolve, as analysts have been routinely wrong on this front. I don't think there's much point in making these predictions at all, and investors should largely ignore them. Micron will eventually recover as supply and demand come into balance. The timing is anyone's guess.

Micron is set to report its fiscal third-quarter results later this month, and its numbers and outlook will give investors a better picture of where the company stands. The market took an analyst upgrade a little too seriously in May, and those gains could be easily undone if the company's results tell a different story.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.