Financials Lead S&P 500 to New Closing High

U.S. stocks advanced Thursday, with the S&P 500 logging its fourth straight daily gain and closing at a record high.

Reports on existing-home sales and manufacturing topped forecasts, and expectations of dovish notes in Friday's speech from Federal Reserve Chairwoman Janet Yellen also boosted sentiment.

The S&P 500 (SPX) gained 5.86 points, or 0.3%, to finish at 1,992.37, topping its July 24 all-time closing high of 1,987.98 to set its 28th record close in 2014. During the session, the index hit an intraday record at 1,994.76. (Read more: Why a new all-time high doesn't mean a crash is due

The Dow Jones Industrial Average (DJI) rose 60.43 points, or 0.4%, to 17,039.56, as the blue-chip index moved back above 17,000 and held about 0.5% below its July 16 record close. The Nasdaq Composite (RIXF) rose 5.62 points, or 0.1%, to 4,532.10.

Today's market-moving economic data: An August reading for the Philadelphia Fed index, a manufacturing gauge, came in at 28, besting forecasts for a reading of 18, and a manufacturing gauge from Markit also jumped. Meanwhile, sales of existing homes rose 2.4% in July to 5.15 million, above expectations, and initial weekly jobless claims came in basically in line with forecasts.

Thursday's encouraging economic reports have provided a lift to U.S. stocks, said Kim Caughey Forrest, a portfolio manager and senior equity analyst at Fort Pitt Capital Group. The good news might have been bad news for the stock market, spurring worries the Fed could pull back sooner from its stimulus efforts, but the central bank has been offering "soothing words," she told MarketWatch.

""It looks like regardless of how long the Fed hawks are talking, the doves are winning at this point," Forrest said.

Investors further shrugged off the Fed minutes released Wednesday that showed some officials arguing the groundwork should be laid for raising interest rates sooner than expected. A hike is hardly imminent.

"It's still unlikely that it's going to be immediate and remains data dependent," said Brenda Kelly, chief market strategist at IG Markets, in emailed comments.

High hopes for Jackson Hole: Kelly and other strategists said not much will hold markets' attention ahead of Friday in Jackson Hole, Wyo., where Yellen and European Central Bank President Mario Draghi are scheduled to speak.

"Markets are making hay while the sun shines--possibly in a delusional manner based on previous equity moves in the run-up and aftermath of the Jackson Hole symposium," Kelly said. "Yellen, however, is not Bernanke, and she may offer some surprises."

Other strategists are sounding at least slightly cautious in the short term following the S&P 500's two-week uptrend.

"Despite hints by the FOMC that rate hikes may come sooner than widely anticipated, the S&P 500 appears to be on a mission to eclipse the 2,000 level before considering the consequences of an uncontrolled advance," said Sam Stovall, an equity strategist at S&P Capital IQ, in emailed comments.

Individual stocks: Hewlett-Packard Co. (HPQ) and Hormel Foods Corp.(HRL) were the biggest winners in the S&P 500 after each company posted quarterly profit that topped expectations.

EBay Inc. (EBAY) was another top performer in the S&P 500, gaining more than 4% in the wake of speculation it may spin off its PayPal business.

Shares of retailer Gap Inc. (GPS) edged higher in the lead up to quarterly earnings after the closing bell. What to look for

Dollar Tree Inc. (DLTR) shares were down 1.3% after reporting quarterly results and as Family Dollar Stores Inc. (FDO) reaffirmed its support for Dollar Tree's takeover bid, rejecting a rival offer from Dollar General Corp. (DG) Follow the day's notable stock moves here.

Other markets: The Stoxx Europe 600 closed higher as investors pushed aside a mixed bag of purchasing managers indexes. Disappointing Chinese manufacturing data weighed on Hong Kong stocks, with the Hang Seng snapping a four-session winning streak. Gold(GCZ4) settled lower, continuing to lose ground after the Fed minutes.