The stock market has hit record highs lately, and investors who still feel the lingering effects of the market's meltdown four years ago are finally starting to feel more comfortable with the idea of getting back into a more normal investing routine. But if you're thinking about getting back into the market now, you face a tough task: how to buy stock while minimizing the risk that a long-anticipated correction will bring nearly immediate losses to your portfolio.

Unfortunately, investing in the stock market involves unavoidable risk, and one of those risks is the chance that a bear market will cause short-term losses. But by choosing investments that offer true value and a margin of safety, you can learn how to buy stock in companies that are less likely to cause devastating damage to your portfolio over the long haul.

What's a stock really worth?
Investing greats like Warren Buffett and Benjamin Graham have long professed that as investors, you can't rely on the price that the market sets for shares of stock to reflect the actual value of the company underlying that stock. Because the stock market is subject to constant fluctuations based on a number of variables that include such things as supply-and-demand dynamics, macroeconomic trends, and demographic factors, share prices can deviate substantially from more objective methods of estimating value.

The biggest challenge that investors face is trying to figure out exactly what a stock's intrinsic value is. In some cases, we get assistance from the companies themselves when they provide their own book-value valuations. Buffett often refers to book value as a more accurate measure of the value of Berkshire Hathaway (BRK.A -0.28%) (BRK.B -0.68%), referring to gains and losses in book-value terms as his primary gauge of operations success or failure rather than looking at its stock price. Moreover, by authorizing Buffett to make repurchases of Berkshire shares whenever their price is less than 1.2 times book value, Berkshire's board of directors has recognized that while book value might not be an exact reflection of true value, it's a good starting point from which to assess whether shares are grossly undervalued enough to justify repurchases, given Buffett's traditional reluctance to engage in share buybacks.

Berkshire isn't the only company where book value plays an important role. In the mortgage REIT realm, the value of the investment portfolio for a given mortgage REIT reduced by the REIT's outstanding debt, sometimes referred to as net asset value rather than book value, gives valuable information about its relative valuation. Industry leader Annaly Capital (NLY -0.32%) currently sports a price-to-book ratio of 0.96 based on its most recently provided figures, reflecting in part investor skepticism about whether the REIT's agency-issued mortgage-backed securities will hold their value once the Federal Reserve stops making extensive bond purchases as part of its quantitative easing program. By contrast, Annaly's non-agency-issued counterpart, Chimera Investment (CIM -0.48%), sports a price-to-book ratio of nearly 1.1, indicating a significant premium to the REIT's stated net asset value that could be due to the fact that the Fed hasn't focused its efforts on the alternative securities that Chimera tends to choose for its portfolio.

Finding the most attractive stock in a given industry
Book value is just one way to estimate true intrinsic value, and just because a stock trades at or below book value doesn't prevent it from suffering losses. Plenty of stocks trade well below book value, with infamous insurance giant AIG (AIG 0.05%) being a particularly good example. Even after its recent rebound in light of its refocusing its business on its core insurance unit and selling off non-core assets, AIG still trades at just two-thirds of its book value. One risk with book value is that if the value of underlying assets doesn't match up with what's on a company's books, then valuations based on book value will be inherently misleading.

In general, though, you can compare book values across companies within the same industry to get a sense of which stocks have the highest valuations. If factors like outstanding growth or promising future earnings prospects are present, then higher valuations might well be justified. But if the difference is due only to investor popularity or other irrational reasons, then choosing the more reasonably priced stock is the best way to minimize losses if a downturn happens.

Don't ignore value
In deciding how to buy stock as safely as possible, be sure to pay attention to valuation. With stock markets at record highs, getting the right stock at the right price is more important than ever. It takes discipline to wait to find the most attractive stocks available, but if you succeed, then the value-investing model of buying stocks below intrinsic value will serve you well in the long run.