What happened

Shares of Western Digital (WDC -3.32%) gained 27.8% in June, according to data from S&P Global Market Intelligence. The stock rose following better-than-expected first-quarter earnings from fellow NAND flash memory supplier Micron Technology, a factory malfunction that may work to decrease the oversupply of NAND memory chips, and indications that trade tensions between the U.S. and China could be deescalating.

WDC Chart

WDC data by YCharts.

Suppliers of NAND have been struggling with inventory glut that has worked to depress prices, and Micron's earnings release and comments from management during its earnings call combined with Western Digital's factory outage seemed to indicate that the flash-memory market could be due for a rebound. A temporary trade truce also appeared to improve Western Digital's prospects with key Chinese partners, and its stock got a big boost on the confluence of news.

A 1 terabyte Western Digital Blue solid state drive

Image source: Western Digital.

So what

A power outage at a Toshiba (TOSBF) factory that produces NAND chips for Western Digital occurred on June 15. Western Digital expects that the outage will result in it producing six exabytes (six billion gigabytes) less flash memory this year, but a press release published by the company on June 27 indicates that the factory will resume production in time for its second quarter. The stock also jumped following Micron's better-than-expected first-quarter results, news that its competitor would be reducing its NAND production in response to oversupply, and indications that it had found a partial workaround on the ban to supplying chips for Huawei. 

While a facility outage significantly impacting production might normally be worrying news, investors appear to be interpreting it as a positive development that could help reduce supply glut for Western Digital and the overall flash-memory market. The outage at the Toshiba factory follows a similar power-related outage that occurred at a Samsung NAND production facility last year. 

Now what

Western Digital stock has continued to climb in July, with shares gaining roughly 8% in the month so far. Some of the gains may have come after a decision by the Trump administration to allow some companies to do business with Huawei.

WDC Chart

WDC data by YCharts.

Western Digital's outlook will continue to hinge on demand and pricing in the NAND flash memory market, and its ability to deal with major Chinese companies like Huawei amid fraught trade dynamics is another factor that's likely to significantly effect performance.

Shares now trade at roughly 13.5 times this year's expected earnings and have a 3.9% dividend yield.