What happened

Shares of Western Digital (NASDAQ:WDC) stock closed 9.3% higher on Thursday, capping a two-day run that's seen the hard-drive and solid-state memory-maker gain 13.8% -- but it's the reason why that may surprise you:

Investment banker KeyBanc published a report on Wednesday advising that DRAM memory prices in October declined "4.7% month-over-month and [was] up 11% year-over-year." NAND prices are "down 10.4% month-over-month and down 52% year-over-year, with pricing now below mid-2016 levels," said the analyst in a note covered by TheFly.com.

Signposts pointing to SSD and HDD

Computer memory pricing is going one way this year  -- but could go the other way next year. Image source: Getty Images.

So what

But doesn't Western Digital make DRAM and NAND memory, you ask? And doesn't a decline in pricing of those products mean Western Digital stands to see lower revenue and weaker profits?

Well yes, it does, and yes, it does. But here's the thing: In its report, KeyBanc emphasized that the declines in "contract pricing" it's seeing are only "as expected." And while it's true that KeyBanc forecasts these "declines to accelerate in Q4 and Q1," it does not believe we will see "extreme price declines."

Now what

Moreover, if you can be patient, it's likely that prices will "stabilize" toward the back end of 2019. At that point, "strong demand tailwinds" should kick in for both DRAM and NAND, leading to at least a few more years of stronger pricing that will give Western Digital "plenty of opportunity to profit."

Investors today are proving the old adage true that "the market is forward-looking," looking past near-term weakness and buying Western Digital stock in hopes of longer-term growth.

Rich Smith has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.