Financial advisers have long urged investors to avoid shifting in and out of the markets. But a few top-performing funds do exactly that.One of the winning funds was launched in 2003 when veteran portfolio manager Ralph Wanger made what seemed like a strange announcement. Stocks would churn up and down for the next decade, making little headway, he says. To serve investors in difficult times, Wanger introduced a fund with a peculiar name, Columbia Thermostat ( CTFAX). The new fund would start by having half its assets in stocks and half in bonds. Thermostat would automatically increase its allocation to stocks when they fell and became cheaper. When the S&P 500 rose, the fund would shift away from stocks and into bonds. By following this mechanical approach, Columbia Thermostat could make profits in markets that bounced up and down. "You should not be completely invested in equities all the time," Wanger said. Wanger's announcement was particularly noteworthy because he ranked as one of the top-returning managers of all time. For three decades, his Acorn fund outdid the S&P 500 by 3 percentage points annually. Wanger, who is now retired, achieved his record by buying and holding a broad basket of stocks. With the introduction of the Thermostat fund, he signaled a change in his buy-and-hold outlook. Thermostat was going against the principles of many financial advisers who stress that investors should hold stocks consistently -- and not try to forecast when markets will rise and fall.