After two solid years of gains for the stock market, retirement investors are feeling good again about their investments. But before you get overconfident about the prospects for your retirement nest egg, make sure you stay aware of all of the obstacles that stand between you and a comfortable retirement.

Happy days are here again?
2010 reinforced the idea that despite the occasional big bump in the road, investors can expect good long-term returns from the market. After a big bounce in 2009 from a terrible 2008, stocks again managed double-digit gains.

But as nice as strong years are, they create the danger of rising expectations. Just as investors came to rely on huge gains during the bull markets of late 1990s and from 2003 to 2007, so too could people forget the pains of the market meltdown and again expect strong gains to continue indefinitely. For years, investors counted on the long-heralded 10% average return for stocks as a dependable benchmark going forward -- only to run smack into the lost decade and its subpar returns.

A recent graphic from the New York Times goes further toward burying those high expectations. It shows how a basic stock index-based investment would have performed depending on which year you started investing and how long you left your money in stocks. But it also takes into account obstacles that many investors tend to downplay: inflation, taxes, and investing fees, all of which erode your returns over time.

What the Times found is that once you take all those things into account, a typical return for stocks is just 4% annually. Even worse, you can find several extended periods during which stocks failed to keep up with rising costs, making investors lose ground in terms of final purchasing power.

How to beat the barriers
In order to make the most of your money, you need to invest in a way that overcomes the obstacles of inflation, taxes, and fees. Let's take a look at some ways to do that.

Inflation affects all investments, but it hits bonds more than stocks. For bond investors, moving beyond traditional bonds to include the inflation-protected ETFs iShares Barclays TIPS Bond (NYSE: TIP) and/or SPDR DB International Government Inflation-Protected Bond (NYSE: WIP) can protect your fixed-income allocation from inflation erosion.

On the stock front, fight inflation by focusing on stocks that can endure higher prices and stay away from those that will be hurt by them. For instance, airlines Delta Air Lines (NYSE: DAL) and AMR (NYSE: AMR) will be endangered by inflation, as tough competition limits their ability to pass through higher costs of labor, fuel, and aircraft to consumers during inflationary periods. But blue-chip companies Coca-Cola (NYSE: KO), Nike (NYSE: NKE), and Apple (Nasdaq: AAPL) have strong brands that command premium prices over their competitors, giving them the leeway to raise prices during inflationary periods and avoid narrower margins that endanger profit growth.

The best way to beat taxes is to make prudent use of tax-favored investments. Traditional IRAs and 401(k)s let you get immediate tax relief through current deductions, while Roth IRAs give you tax-free treatment as long as your investments remain in your Roth account. Either one, though, keeps you from having to include investment income on your tax return, saving you money for the remainder of your career. In addition, other strategies like holding stocks for the long term can reduce the amount of capital gains tax you incur in any given year.

As for fees, cutting costs is relatively simple. If you prefer mutual funds or ETFs, building a core of low-cost index-tracking investments can cut annual expenses dramatically, letting you keep more of your funds' gross return. With individual stocks, picking the right discount broker can reduce commissions and thereby leave you more money to invest.

You can still win
Many investors got disillusioned during the market meltdown, but you shouldn't give up with your investing. Even with more modest returns after taking various frictional costs into account, you can still reach your goals with discipline and a smart investing strategy that makes realistic assumptions about what the future is likely to bring.

Winning investments are an essential component of a smart financial strategy for your retirement. Read all about it by clicking here to see the Fool's new special report, "The 7 Secrets to Salvage Your Retirement Today."