Before I go further, let me define the protagonists here. “Managed funds” are run by stock pickers who make bets on which stocks will do the best. But “index funds” run on autopilot, tracking the rise and fall of a particular market index. The most popular funds follow Standard & Poor’s 500-stock index of leading companies. Total Market funds follow the Wilshire 5000, a proxy for the entire market. Small-stock funds might follow the Russell 2000 or the MSCI Small Cap Index.

I asked Vanguard, the leading purveyor of index funds, to compare the indexes with the managed mutual funds over 30 months of what we hope will be the late bear market. Turns out they’re running about even. A little more than half the diversified, large-cap managed funds beat the S&P 500. They didn’t make money, mind you, they just lost a little less. But growth-stock managers didn’t fare nearly as well. Almost two thirds of them fell below S&P’s growth-stock index. Out of 10 fund categories, the indexers won six while the managers won four. In another bear market, that could reverse.

If index funds are a tossup, why bother to buy them? For three good reasons.

First, index funds are low-cost, or should be. Vanguard charges 0.18 percent annually for its S&P 500 fund and 0.2 percent for Total Market. Fidelity’s Total Market costs 0.25 percent, with a $15,000 minimum investment. The Schwab 1000 goes for 0.51 percent. Managed funds cost far more–an average of 1.61 percent (1.75 percent for small-cap funds). A recent study by S&P found that five-year stock-market cycles favor indexers–mainly due to their low cost. Over that period, for example, Vanguard’s S&P fund outperformed 69 percent of similar managed funds. In another study, Richard Ennis and Michael Sebastian of Ennis Knupp & Associates in Chicago found that a small-cap index beat the average managed fund over the 10 years ending in 2001.

Second, index funds have an edge when the market first turns up. They’re always fully invested in stocks, so all your money instantly participates in the market’s gain. Managers, by contrast, might have hoarded cash, to invest more slowly. Over the past 12 months, Vanguard’s S&P 500 fund outperformed 80 percent of its managed competitors. (When markets turn down, being fully invested hinders an index fund, but not enough to put it out of the game.)

Third, there are always managed funds that beat the indexes over various periods of time. But you can’t tell in advance which they’re going to be. You need low-cost funds with great stock pickers–a rare commodity. The majority will fall behind.

The big, diversified funds, such as Total Market or funds linked to the S&P 500, are also highly tax-efficient. They don’t have to change their investments much, so they generate little in the way of taxable gains.

That’s not true, however, for targeted funds, such as those linked to the growth, value or small-cap indexes. They have to say “hasta la vista, baby” when stocks move out of their investment universe. A small-cap fund, for example, must sell stocks that get too big, which can dump unexpected gains on taxable investors. Taxes are a fund investor’s largest expense, says Larry Swedroe, author of “The Successful Investor Today.” The prospectus shows after-tax returns, in the highest bracket, so look.

Basically, targeted index funds aren’t a clever choice. They perform well enough, but the constant taxes and turnover slash your total return. What’s more, you’re making a bet on which part of the market will do the best–and you might be wrong. These funds take you away from “the basic wisdom of owning the entire market,” says Vanguard founder John Bogle.

To ease the cost problem, Vanguard now pegs seven of its targeted funds to indexes newly created by Morgan Stanley Capital International. For technical reasons, it’s going to take longer for stocks to move out of one fund’s universe and into another’s. This should reduce stock turnover and trim capital gains you might have to report on your tax return. If you’re working with an independent investment adviser, he or she should be using funds from Dimensional Fund Advisors, which also keep costs, taxes and turnover low.

As money returns to the market, relatively more is moving toward managed funds. “They attract people with shorter time horizons,” says Vanguard’s indexing guru, Gus Sauter–the same investors who fled the funds before. Indexers tend to have longer time horizons, so they buy and hold.

Yes, I’m still an indexer. You can’t beat the market over long periods of time. The question raised by the bear is whether to buy and always hold. In any frenzy (such as the mini tech bubble today), it’s smart to sell and put some profits in your purse.