Stocks have moved up nicely in the past few months. So just as the smart thing to do during the worst of the market meltdown was to buck up and buy beaten-down stocks, right now you should be thinking the most about whether your portfolio is prepared for the next market downturn, whenever it may arrive.

The other side of the coin
When it comes to handling a market crash, many people turn to the advice of Warren Buffett: "Be greedy when others are fearful." Rather than dumping their stocks to avoid the pain of further losses, contrarian investors take advantage of opportunities to pick up attractive investments on the cheap.

As hard as that sounds, many investors find it relatively easy to avoid selling stocks after big losses. After all, the nightmare situation for many investors is selling a losing stock, only to watch it bounce back and recover to its former levels.

But many people forget the other part of Buffett's advice: "Be fearful when others are greedy." With stocks up roughly 20% since the beginning of September, greed is definitely running rampant among investors. But rather than getting caught up in the bull-market fever and convincing yourself that stocks can never go down again, the smarter move is to take stock of your situation and make some moves to make sure you're ready for whenever the stock market decides to head down again.

Remember to rebalance
Markets tend to run in cycles. Whether you're talking about different asset classes or different industries within the stock market, you'll find repeating patterns in which particular investments start doing well, gain popularity, and then give way to underperformance and make room for the next big investment fad. A good example of such a cycle was in financial stocks. During the boom years in the middle of the decade, financials sported strong dividends and healthy growth, fueled by an explosive housing market and easy money. Then the bottom fell out of the housing market, financial stocks collapsed, and investors went scurrying for safer stocks.

The way to profit from these cycles is to rebalance, selling from top-performing positions and replacing them with out-of-favor cheaper ones. So right now, Coach (NYSE: COH) and Nordstrom (NYSE: JWN) have seen their shares jump huge amounts from their lows two years ago, as luxury consumers come back into the market. Meanwhile, UnitedHealth (NYSE: UNH) and Wellpoint (NYSE: WLP) have struggled, as uncertainty about health-care reform kept them largely out of the rally. Eventually, though, luxury buyers will overextend themselves again, while the results of the recent election may well force investors to focus on the demographic trends favoring health-care stocks. Rebalancing now will put you in a better position to benefit from that trend reversal.

Diversify
On a related note, another smart thing to do when the markets are doing well is to identify any types of investments that may be missing from your portfolio. Ideally, you'll be able to add new positions to your portfolio before prices jump -- but even when you've missed out on gains, getting new exposure can reduce your overall risk.

For instance, commodities have performed extremely well during 2010, with several of the top-performing ETFs of the year related to commodity investments -- silver in particular. With prices having risen so high, it's probably not the time to buy shares of ProShares Ultra Silver (NYSE: AGQ) or other silver-related ETFs, but looking at other types of commodity exposure may make more sense. The broad commodity ETFs iShares GSCI Commodity-Indexed Trust (NYSE: GSG) and Elements Rogers International Commodity (NYSE: RJI) have their risks, but they give you exposure to a wide range of different commodities rather than just focusing on the high-flyers. That will help protect you when the next downturn comes.

Control your risk
Both of these strategies revolve around a central theme: making sure your portfolio reflects the amount of risk you want to take with your investments. When times are good, it's easy to let your risk level rise beyond where you're truly comfortable. By reining in your portfolio before your investments start to lose value, you'll be a in a better position to take a rational, reasoned approach toward making sure you're following the right strategy to reach your financial goals.

Being ready for downturns is just one way you need to optimize your retirement savings strategy. To learn more, click here and read the Fool's new special report, The 7 Secrets to Salvage Your Retirement Today.

Fool contributor Dan Caplinger is ready for anything. He doesn't own shares of the stocks or funds mentioned in this article. UnitedHealth Group and WellPoint are Motley Fool Inside Value choices. Coach and UnitedHealth Group are Motley Fool Stock Advisor recommendations. Motley Fool Options has recommended a diagonal call position on UnitedHealth Group. The Fool owns shares of Coach and UnitedHealth Group. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Fool's disclosure policyworks in bull markets and bear markets alike.