Take one glance at Micron Technologies' (MU 2.55%) stock chart, and it's hard not to get excited. Over the past year, the memory-chip maker's stock has soared 170%. 

But historical context is sobering: Zoom out to the past three years, and Micron shares have gained a meager 4.7%, dramatically underperforming their benchmark, the Nasdaq Composite.

MU Chart

MU data by YCharts

Still, investors are right to be bullish on the company's prospects at the moment. And while I wouldn't necessarily call myself bullish on the stock, in the spirit of understanding the long-term pros and cons of any investment, let's review Micron and the factors that could derail its ongoing rally. Let's call it the bear case from a bull.

An exterior view of memory chip giant Micron Technologies' offices in California.

Image source: Micron Technology. 

What drove Micron's epic rally

How did Micron arrive at its current situation? More importantly, what drove the earlier implosion of its stock price that laid the foundation for the rally?

Let's start with the basics. Micron is one of the world's largest manufacturers of various types of memory semiconductors used in computers, smartphones, servers, and other similar items. The company largely sells two types of memory: DRAM and NAND. DRAM is common in computers and servers, and sales of this kind of memory chip made up 58% of Micron's sales last year. NAND memory is associated with mobile devices such as smartphones and tablets, and it comprised 37% of Micron's 2016 sales.  

The memory market is highly competitive, and memory chips are a commodity, so the key to making money in this space is to keep a tight grip on managing supply. Doing so involves making accurate predictions about what demand will look like in the PC, server, and mobile markets -- not an easy proposition. When memory demand is strong, companies enjoy pricing power and generate reasonable profits. But when demand softens, chip prices tend to crash across the industry, which can lead to dramatic losses among chipmakers.

That's what happened to Micron in 2016: Unexpected weakness in NAND and DRAM demand triggered an industrywide slump in chip average selling prices. Without the kind of diversified revenue stream to rely on that memory leader Samsung enjoys, the price declines annihilated Micron's profitability.

  Metric 201620152014
Total revenue $12,399   $16,192   $16,358  
Gross profit $2,505 $5,215 $5,437
Operating profit $168 $2,998 $3,087

Data source: Micron Technology 2016 10-K. Numbers in millions.  

Micron's stock has rallied over the past year because the market expects memory prices to rebound. The average sell-side analyst expects Micron's EPS to increase from $0.06 a year ago to $4.28 this year.  However, the key question is how sustainable this return to profitability will be for Micron.

What goes up...

The near-term fundamentals are in Micron's favor, but history argues in favor of caution. Over the past decade, Micron has had a checkered history in terms of generating consistent profits, even as sales have soared.

MU Revenue (Annual) Chart

MU Revenue (Annual) data by YCharts

More to the point, Micron has generated net losses in five of its past 10 fiscal years. Sometimes, such as during the financial criss, the losses seem understandable. However, weak chip demand caused Micron to lose roughly $1.2 billion in 2012, when the economy was recovering. The same could be said for 2016.

The bottom line is that investors need to know Micron has a track record of dramatic swings from profit to loss. That lesson seems to have been lost in the current bullishness around the stock.

In investing as in life, it pays to evaluate important decisions from as many angles as possible. To that end, Micron seems to have the wind at its back today, but history suggests things will change. Invest with caution.