NEW YORK ( TheStreet) -- I've been a contributor to TheStreet.com and RealMoney for more than a decade, during which time we've navigated two recessions. I've predicted two recessions and two recoveries on this site.

For decades, including most of the time I've been writing columns, the prevailing wisdom was that the way to sleep at night was to buy and hold stocks for the long term while ignoring market gyrations. But investors who had implicit faith in this philosophy of long-term investment had a rude awakening during the Great Recession. Even the remarkable rally from March's market low hasn't repaired all the damage to their investment portfolios.

In despair, many have concluded that the investment climate is just too uncertain to trust their hard-earned dollars to the vagaries of the stock market. That's a great pity because managing risk in a stock portfolio isn't as hard as most believe.

The simple fact is that the worst bear markets are normally associated with recessions. Therefore, you should sell your stocks in anticipation of a recession, and buy stocks ahead of a recovery.

Fortunately, good leading indices are designed to flag recessions and recoveries before they arrive. Not all leading indices are created equally, but the best can help avert much of the damage that recessions wreak on stock portfolios. The Economic Cycle Research Institute's leading indices are a case in point.

In mid-September 2000, for the first time in nearly a decade, ECRI warned publicly of a coming recession. (The column is at the right side of the page in the link above.) Then, in early February 2002, it made its economic recovery call. Six years later, in March 2008, ECRI announced that the economy was in recession -- a call that remained in force until April 2009, when it predicted a recovery this summer.

Mind you, these weren't stock-market calls, which ECRI doesn't make. (Full disclosure: On March 19, 2009, ECRI sent its clients what Grant's Interest Rate Observer described as a "table-pounding" missive: In Jim Grant's words, "The implication could not have been clearer that a market rally, when it started, would be no sucker's affair but the real McCoy.")

But it's still worth examining what would have happened to the value of a stock portfolio over the course of the past two recessions and recoveries if an investor had simply sold stocks on the day ECRI publicly predicted a recession and bought back stocks on the day ECRI publicly predicted an economic recovery. It's instructive to compare this to a long-term buy-and-hold strategy for the S&P 500.

The results are compelling. If you had started with $100 in stocks on the day in September 2000 when ECRI publicly warned of recession and followed the standard buy-and-hold strategy, those stocks would have been worth just $72 nine years later, at the end of September 2009.

Alternatively, suppose you had sold all your stocks on that very day in September 2000 and put the cash under your mattress until the day in early 2002 when ECRI announced a recovery, at which point you used all of that money to buy stocks. Then, suppose you once again sold all your stocks on the day in March 2008 that ECRI made its next recession call, and used all of that money to buy stocks on the day ECRI made its 2009 recovery call.

Following that simple buy-low, sell-high strategy, your stocks would be worth $148 at the end of September 2009 -- more than double what a buy-and-hold strategy would have given you. You can do the math -- over the nine-year period, you would have beaten the buy-and-hold returns by more than 8 percentage points a year, on average, and even more if you had put your cash in money market funds instead of your mattress.

Of course, this strategy would miss sizeable rallies and corrections. It's hardly the best possible way to manage money -- investment professionals with the time and resources to analyze an array of specialized state-of-the-art leading indicators should be able to do better still.

But the average person has little time to study the markets. For that person, the power of reliable leading indices of recession and recovery can spell the difference between a comfortable retirement and many extra years of work during his golden years.

We're now at a juncture where the importance of decent returns to repair many broken portfolios is painfully obvious. Yet, in such uncertain times, it's equally imperative to follow a low-risk strategy. The bottom line is that unless you decide to exit equities altogether, good leading indices should prove to be invaluable for navigating these treacherous economic shoals, with the economy likely to dip in and out of recession in the years to come.

Anirvan Banerji is the director of research for the Economic Cycle Research Institute, which was founded by Dr. Geoffrey H. Moore, creator of the original index of leading economic indicators (LEI) for the U.S. Department of Commerce. Banerji serves on the economic advisory panel for New York City, is the co-author of Beating the Business Cycle: How to Predict and Profit From Turning Points in the Economy and is the past president of the Forecasters Club of New York. Under no circumstances does the information in this column represent a recommendation to buy or sell stocks. While Banerji cannot provide investment advice or recommendations, he appreciates your feedback; click here to send him an email.

TheStreet.com has a revenue-sharing relationship with Amazon.com under which it receives a portion of the revenue from Amazon purchases by customers directed there from TheStreet.com.