"Be fearful when others are greedy and greedy only when others are fearful."
-- Warren Buffett

Trying to time the market is almost always a fool's errand. If time has shown one thing, it's this: it's damn near impossible to predict the future.

But that information doesn't stop many of us -- myself included -- from trying to make sure we get the best deals possible. Recently, I've been monitoring two different metrics, and they're both saying the same thing: Investors are getting greedy! If we buy into Buffett's sage advice, it may not be the best time to invest.

Shiller index
Oftentimes, we use the market's price-to-earnings ratio to determine how cheap or expensive stocks are. At the end of 2011, the S&P 500 was trading at 14.5 times trailing earnings. Given that averages are usually around 15 or 16, this seems great.

But Yale professor Robert Shiller begs to differ. Instead of just using the past 12 months to measure P/E, Shiller created a measure he dubbed the cyclically adjusted price-to-earnings ratio. In essence, CAPE takes into account the inflation-adjusted earnings of the past 10 years in order to smooth out the cyclicality of the market. Here's what the market's CAPE has looked like since 1881.

Source: www.multpl.com.

Shiller's index indicates that the average CAPE is 16.4, which means that the market is overvalued by over 29%. Even when we adjust the average CAPE to reflect the fact that dividend yields aren't as hefty as they used to be -- which I calculated here -- we still see the market as being overvalued, this time by 8.4%.

Investor attitudes
The week before New Year's Day, major media outlets were reporting on how investors were more uncertain of the future than they ever had been before. The data point they were referring to was the weekly Sentiment Survey conducted by the American Association of Individual Investors, which indicated that 38% of investors were neutral as to where the market was headed. This was the highest level "neutral" had been at in years.

Things have changed dramatically. Whereas only a third of investors were bullish on the stock market two weeks ago, this week has seen that number rise to close to 50%! As I've shown before, when the bullish sentiment breaches 50%, investors can usually expect piddling returns -- especially when compared to equal investments made when less than 30% of investors are bullish. Clearly, Buffett is right about timing.

Places to invest in now
But before you think Buffett would be dead-set against investing now, we need to take a closer look at what he's said. One of the great tragedies is that when this Buffett quote is cited, it isn't done so in its full context. Here's what he said, in full, in his 2004 letter to shareholders: "Investors should remember that excitement and expenses are their enemies. And if they insist on trying to time their participation in equities, they should try to be fearful when others are greedy and greedy only when others are fearful."

"And if they insist" are the big words here, as Buffett's saying that if we look at the merits of individual equities on a case-by-case basis, we're far more likely to make good investments.

Knowing that, I'm offering four stocks that I consider to be great deals right now, and one that two other Fools are drooling over.

Two of these selections are growth stocks that I think aren't being appreciated by the broader market, and three are dividend-paying stocks. As several Fools have recently noted, it always pays to invest in dividends.

MAKO Surgical (Nasdaq: MAKO)
My most recent pick for my Roth IRA, this company is well positioned to benefit from our aging population. MAKO's robotic surgery system -- dubbed Rio -- allows for minimally invasive procedures on both the knee and, more recently, the hip. Though shares jumped this week, they are still well below their 52-week high of $43.

IPG Photonics (Nasdaq: IPGP)
This laser maker has two advantages over its competition. First, they were the first-mover in the fiber-optic laser market. Second, they are vertically integrated, meaning that their diodes are processed in house, which helps cut down costs. However, because the lasers are primarily used in the highly cyclical manufacturing industry, and the state of the global economy is in doubt, shares are significantly off their highs of almost $79 from this summer.

Veolia Environment (NYSE: VE)
Selected by myself as this year's top dividend stock, Veolia is both a dividend and value play. This France-based company has its hands in both the waste and water management systems. Restructuring and a tough 2011 mean that this year's yield will likely be lower than the trailing 13.3% yield, but I still think it will be substantial.

Intel (Nasdaq: INTC)
The U.S.' biggest chipmaker is making inroads into mobile, and it doesn't hurt that they aren't outsourcing their brains, either. A dividend yield of 3.3%, which accounts for just 32% of earnings, is music to dividend-investors' ears.

Annaly Capital Management (NYSE: NLY)
Finally, two different Fools have put their own hard-earned cash behind this mortgage REIT. What could cause them to do that? How about a 14.2% dividend yield? No, your eyes aren't deceiving you; REITs are required to payout at least 90% of their earnings to remain tax-exempt, and both Dan Dzombak and Jim Royal believe this is a long-term winner.

Here at the Fool, we believe in transparency. That's why I've made CAPScalls on MAKO, IPG, Veolia, and Intel. You can check them out -- and see where my overall score places me -- right here on my profile.

More dividend ideas
And if you're interested in a few more dividend ideas, I suggest you check out our special free report on 11 Rock-Solid Dividends. These hand-selected stocks will likely do well no matter the market's valuation. You can get a copy of this report today, absolutely free!