It's axiomatic in investing that a cheery consensus comes with a hefty price tag. Just because something is axiomatic doesn't necessarily mean that it's 100% true, but let's just say that axioms don't become that way for want of reinforcement. So while I don't recall a rending of garments and gnashing of teeth over the prospects for Starbucks (NASDAQ:SBUX) five years ago, the fact that its share price is many multiples higher now suggests that the extreme levels of glee over the company at the time weren't unwarranted.

Even companies that are obviously garbage have share prices. That means someone is out there buying it, while someone else is selling it. Sometimes I see trades going across the tape and think, "Who in the world is buying this?" With certain companies, you have to wonder what both the buyer and the seller were thinking.

Fortunately, you don't have to wonder too much. Whenever a purchase is made, the buyer is essentially saying, "There is no better place in the world for my money than right here," while the seller is coming to the exact opposite conclusion. This is what makes a market.

Here's an aside that I'd like to flesh out at some point: Have you ever noticed that the talking heads on television and print never, ever, ever ask guest money managers what they're selling right now? They always ask, "So, what are you buying?" The opposite question never gets asked. Man, I'd watch that show in a second.

The worst of times, the right times
It's pretty easy to determine which companies are the best. Krispy Kreme (NYSE:KKD) is king of the doughnut hill. Costco (NASDAQ:COST) is destroying the competition in warehouse sales. And so on. But since these cases are so easily made, it's pretty difficult to buy such companies at bargain prices. You're going to be purchasing a king-sized slug of future growth built into the stock no matter what. In some cases, this will work out OK. People who bought Starbucks five years ago bought a story stock, and the story not only came true, but it may have been undersold. None of this is to belittle these companies as investments, nor people who own them. They just have to count on the projections coming true.

But what about the unloved -- the companies that you hate? Investing in them takes some skill, and some discipline. Any company that isn't on its way to bankruptcy (thus usually causing its equity to be cancelled) is a buy at some price. Just as it's easy to name the companies that are doing the best, it's also easy to reel off the names of firms that the entire investing community just seems to hate. Yet, time and time again we've seen firms that have had maximum bad press turn out at that moment to be pretty good investments. Of course, sometimes it's darkest right before you fade to pitch black (read Enron, WorldCom, etc.). But not always.

I'll give you an example. This past year American Airlines' (NYSE:AMR) board approved retention bonuses for management even as the company's unions had approved billion-dollar salary reductions in order to stave off bankruptcy. None of these things were good, and American's parent company, AMR, had the stock price to prove it.

Yet those who bought in at that point have made enormous gains. I thought then as I think now that this company's management (some of whom left after the scandal) and, more importantly, its board didn't and doesn't deserve being entrusted with your shareholder dollar. But 1,000% gains mean those who took the view of buying what's hated at the time have been more than compensated for the risk of putting money in a flailing company with an unresponsive board competing in a sick industry.

The bad and the ugly
So, who are some of "the hateds" that might be good buys?

1. Janus (NYSE:JNS). On one hand, Janus deserved the poleaxing it got as a result of letting hedge funds trade in its mutual funds in a way that individual investors would not have been allowed to do. On the other hand, Janus isn't going away, and the blitzing its shares have taken as a result may have been overdone. As much as I dislike most mutual funds as investments, mutual fund companies have dynamite business economics. Janus is priced at a substantial discount to other fund companies, which on a whole I do not find to be overvalued.

2. Martha Stewart Living Omnimedia (NYSE:MSO). This is a longtime recommendation of David Gardner's Motley Fool Stock Advisor. He recommended it originally as Martha was being indicted for insider trading, and has reaffirmed his confidence since. Martha Stewart will no longer be the titular head of her eponymous company. But is there any question that she won't still be in charge? This will be like George Wallace's wife being elected governor of Alabama. Yeah, that's her chair, but it doesn't really matter. Martha Stewart Living Omnimedia has lost some of its cache following the scandal, so there is some loss of branding value -- an important consideration. But there is a loyal band of Marthoids out there, and they'll be waiting to see what the style guru has to say next.

3. Marsh & McLennan (NYSE:MMC). As the corporate parent of Putnam Investments, Marsh is another one of the bad boys in the mutual fund scandal. It is also one of the larger insurance brokers in America and has stepped in to make changes at Putnam very aggressively. We've all seen the reports of Putnam's management giving a wink-wink to the nefarious activities by its fund managers, so Marsh & McLennan's management and board were asleep at the wheel. But their response has been impressive, including changing compensation policies and adding a former prosecutor to the board of directors.

There are plenty of other companies that are despised. And yet, watch such market luminaries as Bill Miller at Legg Mason Value continue to snap up shares in "obvious losers" like Kodak (NYSE:EK), and you know that there is always a flip side to the story. Just like it's always 5 p.m. somewhere, almost every company is a bargain somewhere.

Fool on!
Bill Mann, TMFOtter on the Fool Discussion Boards

Bill Mann owns shares of Costco. The Motley Fool is investors writing for investors.