View of Wall street icon. © Grant Faint, Photographer

If opinions about the direction of stocks didn't differ, there wouldn't be a market. But as market indexes continue to climb to record highs, the dichotomy seems greater than usual. Is the stock market a bubble or a bargain?

As usual on Wall Street, the answer depends on a number of variables, the most important of which is your investing time frame. For investors with a long-term view, share prices, while hardly in bargain territory, are reasonable. Stocks may not be as cheap as they once were, but they are not yet overvalued, let alone in bubble territory. Here's why:

1. Price-to-earnings ratios aren't overblown.

No argument, investors have bid up the amount they're willing to pay for each share of corporate earnings. A year ago, the Standard & Poor's 500 Index ($INX) commanded a price that was just over 13 times the average estimated per-share earnings of its constituents for the year ahead. Now, the S&P trades at 15 times estimated 2014 profits. But that's just about the average, going back 30 years, and it's less than the average of 16.5 of the past 15 years. Since 1996, P/Es have ranged from 10.5 to more than 25.

Given accelerating economic growth, low inflation, rock-solid corporate balance sheets and improving sentiment among stock investors, the current average P/E is reasonable, say the bulls. It could even go higher. It's only normal that we would have a period of expansion after earnings multiples compressed throughout the first decade of this century. A P/E of 18, however, should give you pause; 20 would be a waving red flag.

2. The bull market isn't as old as it looks.

Stock prices bottomed on March 9, 2009, in the aftermath of the financial crisis. From that day through Nov. 12, stocks soared 161 percent (189 percent, including dividends).

In terms of both longevity -- the advance is approaching its fifth anniversary -- and the rise in stock prices, this bull market is above average. But what if you were to date the bottom of the market a different way -- not based on when prices hit their lows, but when other market yardsticks did, such as price-earnings ratios or price-to-book-value (assets minus liabilities) ratios?

Using those yardsticks, says market strategist Jeffrey Saut, of Raymond James Wealth Management, the market didn't reach bottom until November 2011. That would make the bull just two years old. There is precedent for Saut's market-dating mechanism. Recall the period from 1966 to 1982, when the market traded in a relatively narrow range. The low in prices came in 1974, but the valuation low didn't arrive until August 1982 -- and that marked the beginning of a five-year bull market.

3. Overvaluation is relative.

Parts of the market do indeed qualify as overpriced, while others are still reasonably priced. Shares of companies that cater to consumers -- both those that sell the stuff we use every day (from soap to soda) and those that sell non-necessities (think retailers and restaurants) -- are expensive. So are the stocks of utilities and the like that serve as high-yielding bond surrogates, which have attracted investors in droves since the financial crisis ended.

"I'm staying away from defensive stocks and pure yield -- consumer staples, telecom and utilities," says Mike Wilson, chief investment officer at Morgan Stanley Wealth Management. "You won't lose your shirt, but they're expensive if you believe interest rates will grind higher."

You'll find better values in health care, as well as in stocks that swing with the economy, such as energy, manufacturing, industrial and technology companies. Large-company stocks are better deals than stretched small-company shares; choose shares of globally diversified companies over U.S.-focused firms. Globally diversified firms, which normally command higher P/Es than their U.S.-focused counterparts, are selling at their lowest valuations in a decade, according to BofA Merrill Lynch Global Research.

But if your time horizon is short, watch out.

We're overdue for a correction. The last breather that the bull took ended in October 2011, and stock prices are up some 60 percent since then. If history is a guide, it looks like the market will sail through the December holidays on a high note, says Sam Stovall, the chief market strategist at Standard & Poor's. The market's fundamental underpinnings are strong. The economy is expanding, inflation is low and corporate earnings are growing.

But there are some signs of froth in share prices. Chief among them is the recent, rapid acceleration of money flowing into stock mutual funds and exchange-traded funds. In October, those funds took in $53 billion more than came out, according to market research firm TrimTabs. That's the fourth-highest monthly net inflow on record.

The market for initial stock offerings is also heating up, paced by the much-ballyhooed debut of Twitter (TWTR), which soared nearly 75 percent its first day out of the gate. Investor sentiment, often a contrarian indicator, is increasingly bullish, with 46 percent of investors polled by the American Association of Individual Investors in the bullish camp, compared with a long-term average of 39 percent.

Those may be signs that the bull market has gotten a little ahead of itself. A pullback (losses of 5 to 10 percent) or a correction (up to 20 percent) would not be surprising. But longer-term, this bull has room to run.

Click here to become a fan of MSN Money on Facebook

More from Kiplinger's: