NEW YORK (Reuters) - Wall Street advanced on Tuesday as third-quarter reporting season hit with a spate of upbeat earnings reports that brought buyers back to the equities market.

All three major U.S. stock averages gained ground in a broad-based rally, with the S&P 500 and the Nasdaq hitting their highest closing level in more than three weeks.

“Positive earnings are flowing through equity markets today, suggesting that things weren’t as bad as investors thought,” said Charlie Ripley, senior market strategist for Allianz Investment Management in Minneapolis.

“We’ve been in a headline-driven market over the last few months,” Ripley added. “But we’ve had progress lately, which has allowed investors switch their focus to more fundamental things like earnings and upcoming economic data.”

Adding to positive geopolitical developments, investors welcomed news that Britain and the European Union could reach a deal in time for a leaders’ summit this week.

Major financial firms JPMorgan Chase & Co JPM.N, Citigroup Inc C.N, Goldman Sachs Group Inc GS.N and Wells Fargo & Co WFC.N all posted results, as did healthcare giants Johnson & Johnson JNJ.N and UnitedHealth Group Inc UNH.N.

Among the big banks, JPMorgan Chase stock hit a record high after it handily beat estimates on bond trading and underwriting strength. Its shares were last up 3.0%.

Citigroup rose 1.4% following its profit beat.

Wells Fargo results were less upbeat, as its profit slid 26% due to sinking mortgage income and legal costs. Goldman Sachs’ profit miss was attributed to weak underwriting. Still, Wells Fargo rose 1.7%, while Goldman edged up 0.3%.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., October 9, 2019. REUTERS/Brendan McDermid

Prescription drug sales helped drive Johnson & Johnson’s upside surprise, while UnitedHealth raised its 2019 guidance on pharmacy benefit growth. Their shares closed up 1.6% and 8.2%, respectively.

Analysts currently expect S&P 500 third-quarter earnings to have contracted by 3% from last year, down from the 12.1% growth seen a year ago, according to Refinitiv data.

Of the 34 S&P 500 companies that have reported so far, 88.2% have come in above consensus estimates.

The Dow Jones Industrial Average .DJI rose 237.44 points, or 0.89%, to 27,024.8, the S&P 500 .SPX gained 29.53 points, or 1.00%, to 2,995.68 and the Nasdaq Composite .IXIC added 100.06 points, or 1.24%, to 8,148.71.

Among the 11 major sectors in the S&P 500, nine ended the session in positive territory, with healthcare .SPXHC, communications services .SPLRCL and financials .SPSY enjoying the largest percentage gains.

Blackrock Inc BLK.N, the world's largest asset manager, beat analyst estimates on strong inflows into its fixed income and cash management business, sending its stock up 2.4%.

In other news, shares of Roku Inc ROKU.O surged 11.5% after the announcing Apple Inc's AAPL.O TV app was available on its platform and Apple TV+ would be available after it was launched.

Bank of America BAC.N, expected to post results on Wednesday, rose 2.0% after a Bloomberg report that Warren Buffett' Berkshire Hathaway was seeking permission from the Federal Reserve to boost his stake in the bank above 10%.

Advancing issues outnumbered declining ones on the NYSE by a 1.88-to-1 ratio; on Nasdaq, a 2.56-to-1 ratio favored advancers.

The S&P 500 posted 17 new 52-week highs and no new lows; the Nasdaq Composite recorded 44 new highs and 68 new lows.

Volume on U.S. exchanges was 6.27 billion shares, compared with the 6.82 billion average over the last 20 trading days.