What happened

Shares of Micron Technology (NASDAQ:MU) gained 16.3% in July, according to data from S&P Global Market Intelligence. Last month saw the memory-chip maker's stock continue to gain ground following its better-than-expected third-quarter release and outlook in June.

MU Chart

MU data by YCharts.

Micron reported third-quarter earnings on June 25, with both sales and earnings for the period coming in ahead of the average analysts' targets. The stock also benefited from news late in June of a potential workaround to a ban on doing business with Huawei, and that a Toshiba plant that manufactures NAND memory chips for Western Digital had gone offline due to a power outage and would result in a significant reduction of flash-memory chip production.

A Micron 5200 series solid state drive.

Image source: Micron.

So what

Micron stock benefited from a string of good news at the end of June that created momentum that carried through to July. The company revealed in its conference call on June 25 that it had partially resumed sending chips to Huawei despite the ban on dealing with the company put in place by the U.S. Commerce Department, stating that it had reviewed the ban and determined that some of its products were not subject to the restriction. The Commerce Department subsequently revealed that it would review requests for product exemptions from the ban. Huawei is one of China's largest device manufacturers and one of Micron's biggest customers. The memory specialist generated 57% of its 2018 revenue from the Chinese market, so periods in which trade disputes appear to be deescalating can create significant momentum for its stock.

Factors suggesting a reduction of NAND supply glut and momentum for the broader market allowed Micron stock to follow up its roughly 18% stock price gains in June with another month of double-digit gains in July.

Now what

Micron stock is down roughly 5% in August's trading amid sell-offs for the broader market stemming from another period of escalating tensions in the trade standoff between the U.S. and China.

MU Chart

MU data by YCharts.

For the fourth quarter, Micron's midpoint targets are guiding for sales of $4.5 billion (representing a 46% decline compared to the prior-year period), a gross margin of 29% (down from 61% in the prior-year period), and midpoint adjusted earnings per share of $0.45 (down 87% year over year). 

The company's shares currently trade at roughly seven times this year's expected earnings.

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.