Up roughly 170% over the past 12 months, shares of memory chip maker Micron Technology (MU -3.78%) look like some of the most impressive in all of tech.

However, the picture changes dramatically if you zoom out to  consider Micron's medium-term history, as the following chart nicely illustrates.

MU Chart

MU data by YCharts

Thanks to its famously volatile business model, Micron can be a tech trader's favorite stock. Thankfully for shareholders today, the company appears to be in the midst of a continued cycle of strengthening in the memory market, which should help the company's financial performance continue to rebound in the near term, as its recent earnings blowout certainly demonstrated.

Inside Micron's earnings beat

In virtually every regard, Micron's recent fiscal second-quarter 2017 was a resounding success. The company produced $4.65 billion in sales, largely in line with analysts' estimates. On the bottom line though, Micron generated $0.90 in adjusted EPS, better than the average expectation of $0.86 per share.  However, more so than the top- and bottom-line numbers, it is Micron's margin expansion that speaks to the momentum currently driving the company. See for yourself.

MetricQ2 FY 2017% of SalesQ1 FY 2017% of Sales
Net sales $4.6 billion 100% $3.9 billion 100%
Gross profit $1.7 billion 38%

$1.0 billion

26%
Operating income $1.1 billion 25% $438 million 11%
Net Income attributable to shareholders $1.0 billion 22% $335 million 8%

Data Source: Micron Technology Investor Relations 

It's no secret that prices of the memory chips Micron produces have been climbing for some time. With small changes in pricing driving disproportionate gains in profitability, the operating leverage inherent in Micron's business model was reflected again in the company's most recent quarter; an 11% increase in sales led to a 207% increase in profits.

Better yet, the momentum should extend into the coming quarters. In reaction to its impressive earnings beat, a number of Wall Street analysts raised their earnings estimates for the company: Micron's average 2017 EPS estimates have steadily risen from $1.68 per share 90 days ago to $3.03 per share after the company's March 23 report.  As long as memory prices remain on the up-and-up, times should remain fat for Micron shareholders. However, it's important to remember that changes in memory prices drive the company's financial performance, for better and for worse.

A semiconductor die-cutting machine working on an assembly line in one of Micron Technology's factories

Image Source: Micron Technology 

Live by the sword, die by the sword

The key takeaway anyone considering investing in Micron needs to understand is that the company and its financial results are largely beholden to the prices for DRAM and NAND flash memory. Even as the market has consolidated into a three-horse race between Micron, Samsung (NASDAQOTH: SSNLF), and SK Hynix,  changes in supply and demand can trigger swings in memory chip prices, and by extension, Micron's profitability and stock price.  In fact, the  gyrations of memory prices can be seen clearly just by looking at Micron's quarterly results over the past decade.

MU Revenue (Quarterly) Chart

MU Revenue (Quarterly) data by YCharts

In discussing his company's latest results, soon-to-be-retired CEO Mark Durcan said in an interview with Barron's, as reported by The Wall Street Journal, "As best we can tell, there is not a big new wave of supply coming." This is because the components required to mass produce memory chips require significant lead time to produce and install in their own right. For now, this appears to be one of those happy periods for Micron when demand outstrips supply.

However, some research analysts are beginning to question how long that condition can continue before aggressive rivals -- Samsung in particular -- move to capture more profits and market share by adding to production capacity. Saying almost exactly that, Bernstein analyst Mark Newman sounded a somewhat cautionary note in his commentary on Micron's recent earnings beat (via Barron's). "We expect this strong pricing to continue in DRAM through the end of CY17 as supply growth in DRAM remains relatively muted this year," Newman said. "We worry more about NAND oversupply later this CY17 due to Samsung's aggressive supply additions and potential oversupply and price weakness later this year."

To be sure, times are good right now, and the company looks laughably cheap at just 5 times forward earnings estimates. However, the current strength in memory chip prices doesn't change the commodity-like nature of the industry. The intense competition between the market's three largest players will continue. Eventually, some catalyst, either industry-specific or macroeconomic, will again put pressure on memory chip prices. So enjoy it while it last, Micron investors, but always keep in mind that the party cannot last forever, which makes locking in some profits seem like a sensible idea for those holding this stock today.