New York: US stocks pared gains as financial markets remained volatile amid a spate of mixed earnings and fresh data showing cracks in the housing market. Treasuries fell and the dollar rose.

The S&P 500 Index clung to an advance, while the Nasdaq 100 Index slumped anew as megacaps from to Microsoft continued to retreat from summer records. The broader index is looking to halt an October rout that’s left it on the cusp of a correction. GE swung between gains and losses after sinking to the lowest in nine years on disappointing results. Take-Two Interactive and Under Armour surged on strong earnings, while Chesapeake Energy tumbled on deal news. Facebook reports after the markets close.

US stock investors remain on edge as the S&P 500 hurtles towards its worst monthly performance since the bull market began. Largely stellar earnings have not provided any relief to selling that began amid concern that rising rates will crimp economic growth and lead to a slowdown in corporate profit gains. US-China trade talks are set to be a focus for investors in coming weeks, with a looming Trump-Xi meeting at the G-20 summit scheduled for next month.

President Donald Trump on Tuesday blamed Democrats for what he called a market “pause," as the party is favoured to win control of the House in next week’s midterm election. A week ago, the president blamed the Federal Reserve.

“The largest risks are the trade war and rising rates," said Michael O’Rourke, JonesTrading’s chief market strategist. “When it comes to the midterm elections, most people are looking at them optimistically in the sense that usually after midterms the stock market rallies. The stock market is going to do what it’s going to do whether you vote Republican or Democrat."

The Stoxx Europe 600 Index struggled to sustain momentum from Asia — it opened higher after good earnings for BP Plc and Volkswagen AG, but corporate results were mixed overall and it swung between gains and losses. The euro edged down after underwhelming economic data.

The MSCI Asia Pacific Index halted a five-day losing streak after President Donald Trump held out the possibility of a trade deal with China, even as his administration prepares for a possible expansion of tariffs. China’s stocks climbed as authorities said they’d encourage long-term funds to invest. The yuan was little changed after earlier hitting its weakest against the greenback in a decade.

Elsewhere, 10-year Treasury yields climbed back up past 3.10%, while oil dropped below $67 a barrel in New York.