The S&P 500 (SNPINDEX:^GSPC) has been hitting records throughout 2013, rising most recently to a new all-time high of almost 1,800 on Friday. Many investors think that the market is overpriced, making it difficult to find attractive value stocks. Yet within the S&P 500, you can still find a few stocks that have missed out on this year's rally and still sport reasonable valuations, making them look relatively cheap in an increasingly pricey market. Let's take a closer look at Mosaic (NYSE:MOS), Deere (NYSE:DE), and Joy Global (NYSE:JOY) to see if they're smart stocks for 2014 or just value traps.

The carnage of commodities
All three of these stocks have something in common: They're all exposed to the commodity industry. In the case of Mosaic, the fertilizer company is best known for the big hit it took when a major potash cartel in Russia disintegrated, raising concerns about the potential for plunging prices that would further hurt the already struggling potash-fertilizer sub-segment. Deere's success comes largely from strong sales of farming equipment, with high crop prices supporting profits for agricultural enterprises that in turn can afford to spend money on yield-enhancing capital expenditures. Joy Global does much the same thing for the mining industry, with its equipment used to boost mining production and productivity.

As a result, all three of these stocks have suffered declines so far this year. They also bear low trailing earnings multiples, making them look attractive. But the big question each of them faces is whether their prospects will rebound, or whether their success in recent years will fade into the past as conditions keep presenting challenges.

Joy Global is probably the most troubled company of the three, given that the mining industry shows few signs of recovering. Prices of most major metals, including both precious metals like gold and silver as well as base industrial metals like copper and aluminum, remain extremely low. The danger, therefore, is that if Joy Global continues to see revenue decline and its backlogs wither away, it could eventually lead to sharply lower earnings -- thereby making its multiple rise for all the wrong reasons.

Deere, on the other hand, hasn't yet seen the same impacts as Joy Global, because it's concentrated in the stronger agricultural industry. Weakness in corn prices has led some analysts to foresee headwinds ahead for Deere, but after so many years of strength in farm commodities, farmers have largely been able to build up cushions of cash to provide for rainy days. That won't necessarily mean sustained purchases of ag equipment at previous levels, but it could keep demand up longer than in mining.

Mosaic is the company moving forward most aggressively, shifting gears and emphasizing its strength in the phosphate-fertilizer business by buying out the phosphate division of CF Industries (NYSE:CF) last month. Although Mosaic reported weak sales in its third-quarter report, it remains confident about the prospects for the fertilizer industry generally. Given rising prices for natural gas, Mosaic could benefit if advantages that nitrogen-based fertilizer companies have enjoyed over it and its fellow potash producers start to fade away.

Like most beaten-down companies, these three stocks are far from a sure thing. But with investors having low expectations, it will be easier for them to outperform than for high-flying rivals that already have big promises baked into their share prices. That could make them smart stocks for 2014 and beyond.