Tech stocks have been on fire over the past year, but few can match shares of Micron Technologies (NASDAQ:MU).

During a period when the tech-heavy Nasdaq Composite has outperformed the S&P 500 by roughly 10 percentage points, the massive rally in Micron's stock is something to behold.

MU Chart

MU data by YCharts

However, this chart doesn't tell the whole story when it comes to Micron shares. The company's business model can lead to impressive profits, but it can also swing to significant losses under the wrong circumstances.

Micron's revenue base: memory chips

Micron has a straightforward business model: It's one of the world's largest producers of memory chips, and its two central products consist of DRAM and non-volatile memory chips.

DRAM stands for "dynamic random access memory," and Micron sells its DRAM to manufacturers of computers, servers, networking devices, communications equipment, consumer electronics, and more. Micron's non-volatile memory segment almost exclusively sells what's called NAND Flash memory, a form of memory that's highly popular with mobile-device original equipment manufacturers, because it preserves whatever is encoded on it even when a device has no charge.

In terms of its revenue base, DRAM sales accounted for 58%, 64%, and 68% of Micron's total sales in 2016, 2015, and 2014, respectively. Over these same periods, NAND Flash revenue contributed 37%, 33%, and 27% to the company's top line. So although Micron's revenue model might be easy to understand, the company's financial performance is anything but clear-cut and consistent.

A machining tool helps assemble one of Micron Technologies' memory chips

Image source: Micron Technology 

Buyer beware

Although Micron shares have been on fire over the past year, a look over the past three years gives a fuller picture of its overall performance.

MU Chart

MU data by YCharts

The thing about Micron is that its various memory chips are effectively commodity goods. So not only does it have to compete against the likes of South Korean tech companies Samsung and SK Hynix, but industrywide prices are also set by open market spot prices, much in the way a commodity such as oil or gold is priced.

As is the case with all commodities, when demand exceeds supply, memory-chip makers can print profits. But when supply outpaces demand, memory makers can face significant revenue and profit declines, which is what happened to Micron last year.

MU Revenue (Quarterly) Chart

MU Revenue (Quarterly) data by YCharts

Weakness in memory-chip prices caused Micron's quarterly sales to contract by over $1 billion from early 2015 to mid-2016. This weakness, in turn, had horrific consequences for Micron's gross margin and overall profitability.

The company's finances have flipped back into the black, as pricing conditions have improved throughout the memory market. In fact, the company has beaten analyst expectations for three straight quarters. Moreover, of the 27 30 sell-side analysts who cover Micron stock, 19 rate its shares as a "buy," and eight call it a "strong buy." So my skepticism about Micron puts me in the minority.

But Fools are long-term investors, and we prefer to analyze potential holdings for their ability to generate consistent returns over a multi-year time horizon. Of course, most companies experience a certain degree of volatility, but Micron has demonstrated far more extreme boom-and-bust tendencies that the normal company. Times are flush for the memory-chip maker right now, but potential investors would do well to consider the stock's long-term trends.

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.