Big market rallies are great -- unless you're stuck on the sidelines. But fortunately, even if you've missed out on some of the big gains that stocks have seen in the past year, it's not too late to get in on the action.

Put on your rally caps
After a long pause during much of the year, stocks have returned to rally mode in the past few months. Since the beginning of September, the S&P 500 is up 16% and has reached highs not seen since before the market meltdown two years ago. A combination of rampant pessimism going into the traditionally weak fall season plus the Federal Reserve's emergency measures to inject liquidity into the financial system via quantitative easing arguably forced stock prices higher.

All of that sounds perfect if you have your money in the stock market. But if you've been waiting for clearer signs of an economic recovery before putting your money at risk, stocks that are hitting multiyear highs present you with a dilemma: Is the next bull market just getting started, or have you already missed the biggest gains you're likely to see?

Finding value
The answer to that question is simple: It depends. Specifically, some stocks have indeed gotten to the point where they're overvalued -- perhaps ridiculously so in some cases. Just yesterday, UBS downgraded shares of Las Vegas Sands (NYSE: LVS), citing valuation as a concern after the stock has tripled just since February. At a multiple of 50 times expected earnings for the year, value investors would likely shy away from the casino operator's shares at this point.

On the other hand, some stocks haven't participated in the rally. That may make them seem like perfect candidates for new money -- but before you immediately jump in, you need to find out why they haven't gone up. Often, you'll find fundamental reasons behind a stock that lags behind in an up market. Unless those inherent problems resolve themselves, then a stock's underperformance can continue for a long time, frustrating those who keep waiting for a catalyst to boost their returns.

What you really want are stocks that have participated in the rally but haven't gotten ahead of themselves. That way, you can be reasonably sure there aren't any basic problems with the businesses, but the shares aren't necessarily too toppy.

Room to run
So with that in mind, I went in search of stocks that have both seen strong gains and still trade at reasonable valuations. Here are the best candidates I found:

Stock

52-Week Return

Current P/E Ratio

Ford Motor (NYSE: F)

91.1%

9.0

Altria Group (NYSE: MO)

32.8%

14.4

Freeport-McMoRan Copper & Gold (NYSE: FCX)

25.8%

12.8

SanDisk (Nasdaq: SNDK)

81.7%

8.2

Veeco Instruments (Nasdaq: VECO)

71.8%

10.0

TriQuint Semiconductor (Nasdaq: TQNT)

93.1%

10.4

Source: Motley Fool CAPS.

As you can see, these stocks range from well-known household names to up-and-coming small-cap companies. Ford has not only come back from the dead but sees its success continuing to accelerate with the coming launch of the new Focus. Altria, meanwhile, chugs along with steady results year in and year out, and a knockout-gorgeous dividend yield. And Freeport is riding the wave of higher metals prices, which shows no signs of stopping.

The smaller companies have their own stories. SanDisk is in an essentially commoditized business, but it sports better margins than some of its main competitors. Veeco's exposure to LED lighting and solar energy put it squarely in two exciting industries. And radio chip maker TriQuint has scored success as a supplier for the iPhone and iPad.

It's not too late
Of course, just because these stocks have good prospects doesn't mean they're a sure thing. After a big market rally, there's no telling when the stock market could reverse direction, taking even the best values down with it.

Nevertheless, if you're sitting on the sidelines wondering whether there are any smart investments left, take a closer look at winners that still carry attractive valuations. The margin of safety you gain by sticking with good values can give you the best of both worlds no matter what the market does.

Need more winning ideas? We've got five great ones for you right now. Click here to get The Motley Fool's free report, 5 Stocks the Motley Fool Owns ... and You Should, Too.

Fool contributor Dan Caplinger knows big winners are seldom cheap. He doesn't own shares of the companies mentioned in this article. Ford Motor is a Motley Fool Stock Advisor pick. The Fool owns shares of Altria Group. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Fool's disclosure policy makes you a big winner.