Joy Global (JOY) seems to have lost favor with the Street. Goldman Sachs has downgraded the stock from buy to neutral, and analysts expect the company's bottom line to shrink 19% this year.

So, should you look elsewhere and give Joy a miss, or should you get your hands on the stock while it's still cheap? Decide only after you learn about the three factors, or numbers, that rule Joy Global's destiny.

67% at stake
Joy Global gets roughly two-thirds of its sales from coal-mining customers, which explains the company's struggle to grow its top and bottom lines over the past year or so. The dire state of the coal industry is also the biggest reason why Joy toned down its full-year guidance recently.

Thoughts about where the coal market is headed are divided right now. Demand for coal plunged last year as electric utilities shifted to natural gas, a cheaper alternative. With natural gas prices moving up in recent months, coal producers are heaving a sigh of relief. One of the top coal companies, Arch Coal (NYSE: ACI), delivered a record quarter recently, fueling optimism among investors. If natural gas prices head higher, coal usage could surge.

Nevertheless, unless major mining companies accelerate their investments, Joy will find it hard to sell them equipment. Unfortunately, Joy thinks it might be "at least" another year before miners start spending more. Joy's projection looks reasonable, given miners' current focus on cutting costs instead of expanding.

Rio Tinto (RIO 0.54%), for instance, has already ruled out any major project over the next couple of years. It is scaling back exploration spending by $750 million this year, and plans to spend only on priority projects in a bid to lower operating costs by $5 billion through 2014. Rio even plans to sell off some coal assets in Australia.

Worse yet, the U.S. Environmental Protection Agency's Mercury and Air Toxics Standards will enact stringent new emission regulations in 2015, which could push several coal producers out of business.

Simply put, Joy's reliance on coal is a major concern. The best way out, if it wants to stay in business, will be either to reduce dependence on coal, or look beyond the domestic market for sales. The second option seems more viable for now, and Joy is already making headway.

55% in neutral gear
Markets outside the U.S. contributed 55% to Joy Global's total sales last year. Joy aims to increase the percentage share further in the near future, which is great news especially as miners head for international markets. Arch Coal recently signed long-term deals to exploit opportunities in these markets to fill the gap in domestic demand.

As fellow Fool Matt DiLallo pointed out, coal remains the chosen fuel in markets like China and India, and will continue to be so. Joy Global is particularly bullish on China, the largest coal- consuming nation in the world, which is why it acquired China-based mining-equipment maker IMM in December 2011. But competition is stiff as rival Caterpillar (CAT 0.07%) eyes a leadership position in the market. Caterpillar acquired Bucyrus International in 2011 primarily because Bucyrus was getting 40% of its revenue from the Asia-Pacific region alone.

Yet, Joy seems to have an upper hand in this contest, since it gets nearly 18% of sales from China. Compare that to Caterpillar, which derives just about 3% of its current sales from that country. Moreover, unlike Caterpillar, which suffered losses worth half a billion dollars because of accounting misconduct at recently acquired Chinese company ERA Mining Machinery, Joy has reported no such incident with IMM so far.

The problem is that the Chinese coal market is in pretty bad shape as supply continues to exceed demand, but things could improve soon. For the four months through April, China's coal imports were 25% higher while power consumption grew 5% year over year. Rio Tinto even expects to sell record iron ore amounts to China this year. As demand in the Middle Kingdom picks up and idled plants get back to work, orders for Joy's equipment -- both original and aftermarket -- should gather steam. In fact, the aftermarket business could be Joy's strongest weapon in a downturn.

52% looks safe
Few investors know that 52% of Joy's revenue last year came from aftermarket sales: replacement parts, rebuilds, and maintenance and repair services. Even in an otherwise lackluster second quarter, Joy's aftermarket bookings increased 10% sequentially. That proves how aftermarket sales are less prone to cyclical swings than original equipment.

Caterpillar, which doesn't provide separate numbers for its aftermarket sales, has started taking the business more seriously, as evidenced by its recent purchase of a used-equipment business, Cat Auction Services, from its dealers. Still, Joy can beat Caterpillar in this game, provided it nimbly exploits its strong foothold in the market. Looks like Joy knows what to do, because management already expects an even higher share of revenue from aftermarket sales next year.

The Foolish bottom line
Strong global presence and a resilient aftermarket business can help change Joy's fortunes, but only when the coal industry revives. Positive signals from China also need to be sustained a little longer to instill confidence among investors.

While I don't see any strong catalyst for Joy's stock in the near future, its downside could be limited as well, since the pessimism largely seems factored into its current price. The company is handling its inventory well, and doing a good job with margins. You might want to wait for stronger buy signals, but you shouldn't miss that opportunity when it comes.

To stay updated on Joy Global's news and analysis, click here to add it to your stock watchlist.