By Trevor Hunnicutt

NEW YORK (Reuters) - Reluctant investors warmed to stocks in October, stockpiling $19.3 billion in U.S.-based equity funds, marking the first month of positive inflows for the funds since May, when they took in $31.8 billion, Lipper data showed on Thursday.

The massive inflows come as third-quarter earnings seem to validate the strong market gains for stocks this year, with earnings estimated to have risen 7.7 percent over the year prior, according to Thomson Reuters I/B/E/S. The S&P 500 is up 17 percent this year, including dividends.

For their part, money market funds, where investors park cash, recorded withdrawals of $21.3 billion in the latest week ended Wednesday, as investors put money to work in equities.

Some investors still expressed concern that traders are chasing lofty markets.

But Garth Nisbet, a senior portfolio manager at Wells Fargo & Co's asset management unit, said the economy is thriving and that there is more upside to come.

"There's two things that destroy wealth: market timing and bearishness," he said, referring to market skeptics. "This is a fairly market-friendly environment."

U.S.-based stock mutual funds and exchange-traded funds (ETFs) pulled in $3.6 billion during their fourth straight week of inflows. Domestic stock fund inflows of $2.2 billion for the week were the largest since August, according to Lipper.

Nisbet said it is possible that technology stocks are due for a pullback following "aggressive" gains, led by Inc, and that rising U.S. wages may chip away at corporate profits.

Bond funds, popular for most of this year, saw their appeal fade a bit. Taxable-bond funds took in their 17th straight week of inflows, but just $678 million, down from the nearly $3 billion-a-week average this year.

High-yield bond funds posted $1.2 billion in withdrawals, the most since August this year. Treasury fund outflows of $887 million were the largest since August 2016.

Among developed markets outside the United States, investors favored Japan over Europe. Japanese stock inflows were the largest since February at $501 million, while European equity funds outflows of $404 million were the largest since September, according to Thomson Reuters' Lipper unit.

(Reporting by Trevor Hunnicutt; Editing by Jennifer Ablan)