After all the damage the bear market has done to retirement portfolios over the past two years, those who are in or near retirement are struggling to figure out how to get their finances back up to full strength. Although solutions to some retirees' problems won't be easy to find, you can set up your investments to make the most of what you have left.

Taking on too much risk
Unfortunately, what many older investors learned during 2008 and 2009 was that they had invested far more aggressively than they perhaps should have and had taken on much more risk than they thought they had. Part of this was likely just a natural reaction to a bull market that lasted nearly five years; it's always easy to forget just how risky stocks can be when you've gone for a long time without seeing a major correction, let alone a full bear market.

But if you weren't careful, you may have gotten your money snagged up in other ways. Many of those who relied on target date mutual funds, for instance, got a nasty surprise as they learned just how aggressive some of those funds actually were -- even the ones designed for those in or near retirement.

Build the right retirement portfolio
Especially in a tough environment, you need to be smart about your investments. Let's take a closer look at some of the keys to a strong retirement portfolio:

1. Most retirees need stocks.
As ill-timed as last year's terrible stock market performance was for seniors, many people have drawn the wrong conclusions from the downturn. Keeping some of your money in stocks is not a mistake, even for retirees who are extremely averse to risk.

Here's why: The biggest threat to retirees living on fixed incomes is the steady erosion of purchasing power because of inflation. Most conservative investments, such as bonds and bank CDs, not only pay low interest rates right now but also give investors absolutely no protection from inflation. With constant income and no growth, these investments doom their owners to a gradual decline in their standard of living. And inflation-indexed investments like TIPS, while keeping up with inflation, pay even less in income and again provide little additional growth.

In contrast, certain types of companies can benefit from inflation. If consumer goods companies like Kellogg (NYSE:K) and Target (NYSE:TGT) can raise prices in response to inflation, then they'll preserve their profit margins even when their own internal costs rise. Commodities stocks like Titanium Metals (NYSE:TIE) and BHP Billiton (NYSE:BHP) benefit directly from increasing raw materials prices. So while stocks expose you to the threat of bear markets, you still need them to address a different type of risk: that posed by inflation.

2. You can't predict where the next bull market will be.
Historically, different investments have cycled in and out of the top spot for returns. But predicting which particular investment will be at the top of the class in any given year is impossible.

So far this year, for example, emerging-markets stocks have done extremely well. Share prices of companies like Petroleo Brasileiro (NYSE:PBR), Vale (NYSE:VALE), and Baidu (NASDAQ:BIDU) have each risen 50% or more since the beginning of the year, dwarfing the S&P 500's advance of less than 6%. But if you got spooked out of emerging markets after last year's big loss, then you've missed out on that portion of your overall portfolio's potential gains. Only by keeping a constant allocation across different market sectors can you assure yourself of being invested in whatever the top sector happens to be.

3. Have a cushion.
More than anything, the stock market's crash reminded retirees how valuable a cash cushion can be. Although you'll hate getting next to no interest in a bank account when stocks are soaring, the flexibility you get from not having to sell when stocks fall is well worth the cost.

As painful as they are, bear markets aren't something you can afford to avoid at all costs, even if you've already retired. The best way to balance all the risks of retirement is with a diversified set of investments. Combined with a strong cash cushion, a strong portfolio will help you ride out downturns and give you the retirement you've always dreamed of.

For more on making the most of your retirement:

Fill in the blanks with specific recommendations of great investments in our Rule Your Retirement newsletter. Click here to start your free 30-day trial today.

Fool contributor Dan Caplinger believes most retirees will end up better off than they think right now. He doesn't own shares of the companies mentioned in this article.

Baidu is a Motley Fool Rule Breakers recommendation, Titanium Metals is a Stock Advisor selection, and Petroleo Brasileiro is an Income Investor recommendation. Try any of our Foolish newsletters today, free for 30 days. The Fool's disclosure policy won't quit on you.