Troublesome times call for a modicum of protection, but you can hold on to your capital gains without pulling out of the market totally and stuffing the cash in your mattress. Here, MoneyShow editor-at-large Howard R. Gold explains three strategies, each slightly more complex than the last, for ensuring your keep your profits.

Worried about the market? I am, at least for now.

Stock and commodities markets have sold off after months of advances and rampant speculation, especially in oil and silver.

After Wednesday’s rally, the S&P 500 index was down 1.7% from its April 29 highs, while the Russell 2000 small-cap index lost 3.7% from its record closing high of 865.29. Brent crude has tumbled 10.8% from its closing high of $125.90 a barrel at the end of April.

And silver has lost nearly a third of its value from its April 29 peak of almost $50 an ounce, giving up most of its gains for the year. Gold, which had a more modest rise this year, is 5% off its nominal record high of $1,576 an ounce.

What’s going on?

  • Exchanges boosted margin requirements for silver and oil, squeezing out speculators.
  • The US dollar has gained ground, particularly against the euro, reversing months of decline.
  • The imminent end of the Federal Reserve’s latest “quantitative easing” program (QE2) and the approach of the historically weak summer season have gotten some investors jittery.

I wrote about these issues a month ago, when I said the markets could face a big challenge.

At first, stocks appeared to have “passed” my tests: The S&P 500 hit recent new highs, and the Russell 2000 surpassed its June 2007 record.

But they quickly retreated, briefly dropping below their 50-day moving averages for the S&P and the Nasdaq Composite index.

Stocks may rally again...and even though I don’t think the current bull market is over, I’m concerned that a big correction could wipe out some hard-earned gains. Another flare-up in the European debt crisis or the political games being played over extending the US debt ceiling could rattle markets in the months ahead.

If you’re like me and you’re nicely ahead after having hung in through the worst of the bear market and financial crisis, you, too, may want to lock in some profits.

Here are three fairly simple ways to do it. I think every investor can follow these strategies; you just need to figure out which one, or combination, is best for you.

1. Sell in May and Go Away
If you have some profits, there’s only one way to keep them: sell. I don’t mean sell everything—just take some money off the table. That could take the sting out of future losses, and give you the psychological wherewithal to ride out the rest of whatever correction we see.

How? Figure out your cost basis (major fund companies and brokerage firms provide this) and then sell the amount that represents your profits on the stock or fund you own. Or, sell the amount of the original investment and let your profits run. Either way, you’ll have some real money in your pocket instead of paper gains.

If you’re retired, you can sell 4% of your total portfolio value—enough to cover one year’s withdrawal from your retirement savings. Or, if you have kids in school, sell enough to cover a year’s tuition and fees (in a non-retirement account).

NEXT: Stop Losses and a Simple Options Strategy

|pagebreak|

2. Use Stop-Loss Orders Wisely
Another way to protect your profits is to place a stop-loss order with your broker that lets you sell a stock or exchange-traded fund at a particular price.

Let’s say you bought 100 shares of Apple (AAPL) at around $200 a share. That means at the stock’s recent peak, you had profits of around $16,000. You can protect some of those profits by putting in a stop-loss order in at, say, $330—which marks a decline of 10% from the high—or $310, about a 15% drop.

Or you can use a trailing stop-loss order. Set a percentage below the current price of the stock to trigger a sale; if the stock suddenly takes off, the price at which a sale is triggered will rise with it.

So, if you have a trailing stop order for Apple at 10% below the current price, and the stock goes to $400, the stop-loss sale would be triggered if the shares then fell back to $360, allowing you to lock in more profits.

Here’s another plus: Stop-loss orders are free until a sale is actually executed, and then you pay ordinary brokerage commissions. But use stop losses only for the shares you want to sell, not for your whole position, unless you want to liquidate it. You can also use stop-loss orders for exchange-traded funds you own.

One drawback: During extreme sell-offs, like last year’s flash crash, a stop-loss order “turns into a market order at the best available price,” said Marty Kearney, senior instructor at the Chicago Board Options Exchange. Caveat emptor.

3. Buy Put Protection
If you’re comfortable with options, this is a good alternative.

Let’s say once again that you own 100 shares of Apple. If “you’re worried about Apple really being clobbered” in a big market correction, said Kearney, then “buy a protective put.”

An Apple $300 put option expiring in October would cost $10.50; one contract, costing $1,050, will give you protection for 100 shares. (Options expiring earlier tend to be cheaper, but as they approach expiration, their value can drop rapidly. If the underlying stock or index doesn’t hit your strike price by the expiration date, the option expires worthless.)

Or you can hedge your entire stock position by buying put options on ETFs that track larger indexes like the S&P 500 or the Russell 2000. Options maven Bernie Schaeffer, chairman and chief executive officer of Schaeffer’s Investment Research, suggested this in a recent interview with me. (Click here to watch.)

The “protection trade,” he said, is very popular, and can be a form of catastrophic insurance against a market crash.

“If you can stomach a move down to 1,200 [in the S&P], you can save some dollars by buying put protection that...would protect you on a move below 1,100, or even in the extreme, a move below 1,000,” he explained.

“Buy as little protection as you can, because it can get expensive,” he said, recommending longer-dated, out-of-the-money options.

A January 2012 120 put option on the SPDR S&P 500 (SPY), which would pay off if the S&P fell below 1,200, changed hands at $4.25 on Wednesday. Ten contracts would cost $4,250 at current prices—less than 5% of a $100,000 stock portfolio.

That’s the maximum percentage Schaeffer recommended for purchasing protection; he said 2% to 3% of your portfolio is sufficient. January 2012 115 and 110 put options are considerably cheaper than the 120s.

If put options aren’t for you—and you’ll need to monitor them carefully—you can use stop losses or outright sales to protect yourself against a correction.

Who knows which way the market will go in the coming weeks and months? But taking profits from time to time may help you stick with stocks and benefit from the rallies, too.

Buying flood insurance during a heat wave can be a very good move.

Howard R. Gold is editor at large for MoneyShow.com and a columnist for MarketWatch. Follow him on Twitter @howardrgold and read his commentary and watch his videos on www.howardrgold.com. His new political blog, The Independent Agenda, debuts soon.