Stock investors are faced with a growing problem: There just aren't that many attractively priced firms to buy right now. It isn't that we are on the precipice of another major economic decline and that stocks are painfully overpriced. It is simply that the market has run up and caught up with corporate fundamentals. Our analyst staff reckons that the median stock in the market is ever so slightly (1%) overvalued today. So does this mean that investors should abandon ship and start hoarding cash? We don't think so. But it does mean that security selection is becoming increasingly important.

In a very undervalued market (such as in March 2009) finding cheap stocks was like shooting fish in a barrel. Everything had sold off indiscriminately, leaving almost all sectors looking attractive. As it became clear that the economy was putting the credit crisis behind it, stocks of all stripes began to rally aggressively. Correlations between stocks were very high, and you could have made solid returns owning almost anything. Now that correlations are declining, individual security selection matters a lot more. But how do you know what stocks are going to hold up the best in this environment?

Look for Key Characteristics

Economic moats are a great place to start. Firms with sustainable competitive advantages have strong, proven business models. Their competitive positions are protected by structural factors that will in many cases take decades to erode. And they are generally less sensitive to the vagaries of economic cycles. These are the businesses that you want to own for decades to come and that are likely to hold up somewhat better in a downturn compared with lower-quality companies. For the more than 10 years Morningstar has been rating stocks, the largest peak-to-trough loss of a portfolio of all wide-moat stocks was 49% compared with 59% for all stocks. Taking valuation into account makes the difference even more dramatic. If you can't find any huge bargains, it makes sense to buy the best-quality fairly or slightly undervalued company you can.

The fair value uncertainty rating is another key metric. The uncertainty rating represents a Morningstar analyst's confidence in how tightly he or she can estimate the intrinsic worth of a company. Some firms have very predictable cash flows, and there is limited uncertainty about what the cash flows are going to look like during the next few years, while the future path of other firms is much less clear. Given that there are fewer prospects of something unexpected happening at firms with low uncertainty ratings, investors can feel more comfortable accepting a smaller margin of safety when buying stocks. Of course that doesn't mean you should accept no margin of safety at all. Buying a wide-moat, low-uncertainty firm that is trading an unrealistically high valuation isn't a great strategy. Even if stocks aren't incredibly cheap, finding shares that are at least somewhat undervalued remains important.

Be Prepared

If a company looks fundamentally attractive, but is currently too pricey, it could make sense to put it on your watchlist. With stocks fully valued, an unexpected event like a flare-up of the European debt crisis, a slowdown in the United States, or some other shock could send stocks lower. It makes sense to be prepared for any potential downturn and to already have a clear idea of where to put to work any dry powder you might have.

Not completely shunning stocks because they are fully valued is easier because the alternatives are not very attractive right now. The Federal Reserve's zero-interest-rate policy has left rates on cash looking incredibly meager. And even if you don't believe we are in the midst of a bond bubble, the threat or rising rates and inflation mean that returns from fixed income during the next decade are unlikely to replicate the returns of the previous 10 years.

However, this doesn't mean you should avoid those asset classes either in favor of equities. A well-thought-out asset-allocation plan remains important to meeting short and long-term financial goals. Stocks are, by their nature, volatile assets; on any given day (or any given year) there is no way to tell if the market is going to go up, down, or sideways. Over the long run, you should be rewarded for taking on these riskier assets, but you can't count on it in the short run. Money that is needed for current living expenses or to pay for an upcoming event, such as college tuition or a down payment, needs to be in a more stable asset class.

To that end, we used Morningstar's Premium Stock Screener to find names that are good for the long haul. We looked for wide-moat, low-uncertainty stocks that currently have a Morningstar Rating for stocks of 3 stars or higher. Run the screen for yourself. Below are three stocks that passed.

Novartis (NVS)

In an industry plagued by stagnant growth, Novartis is well-positioned with diversified operating platforms and an industry-leading number of new potential blockbuster drugs. Strong intellectual property supporting multi-billion-dollar products, combined with an abundance of late-pipeline products, creates a wide economic moat. While the late 2012 patent loss on Diovan and manufacturing problems in the consumer division will weigh on near-term growth, the company's strong strategic position should lead to steady long-term growth.

Coca-Cola (KO)

Coca-Cola's wide economic moat is bolstered by its bevy of powerhouse brands and its extensive distribution network, which enables the company to deliver its products to consumers in more than 200 countries. While declining consumption of carbonated beverages in North America will serve as a near-term headwind for Coke, we believe international markets will provide plenty of growth opportunities in the long term. Absent any strategic missteps, we view Coca-Cola as a safe haven in an uncertain economic environment, given that the firm has one of the widest moats in our consumer coverage universe.

McDonald's (MCD)

McDonald's remains resilient despite an increasingly challenging environment for restaurant operators. Although we doubt the firm can duplicate the almost 1,500 basis points of operating margin expansion it posted during the last five years, we are optimistic that it is capable of generating superior returns on invested capital over an extended horizon. Our confidence stems from unrivaled scale advantages, an incredibly strong brand, a cohesive franchisee system, and ample international growth opportunities. We don't expect these qualities to abate anytime soon, thus earning McDonald's the widest economic moat in the restaurant category.