By Victor Reklaitis and Barbara Kollmeyer, MarketWatch

NEW YORK (MarketWatch)--U.S. stocks advanced Thursday afternoon, as the S&P 500 worked for a fourth straight day of gains and stayed on track for a record close.

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 7 points, or 0.4%, to 1,993 after hitting an intraday record at 1,993.55. The benchmark index is on pace to finish above its July 24 all-time closing high of 1,987.98. (Read more: Why a new all-time high doesn't mean a crash is due http://blogs.marketwatch.com/thetell/2014/08/21/no-new-all-time-highs-dont-mean-the-market-is-due-for-a-crash/.)

The Dow Jones Industrial Average (DJI) rose 87 points, or 0.5%, to 17,066, 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 points, or 0.1%, to 4,531.

Today's market-moving economic data: An August reading for the Philadelphia Fed index, a manufacturing gauge, came in at 28, besting forecasts for 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 Fed chief 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, rising 6.2% and 4.8%, respectively, after each company posted quarterly profit that topped expectations. Follow the day's notable stock moves here.

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

Shares of retailer Gap Inc. (GPS) shed 0.3% 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)

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.

Subscribe to WSJ: http://online.wsj.com?mod=djnwires

Dollar Tree (NASDAQ:DLTR)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more Dollar Tree Charts.
Dollar Tree (NASDAQ:DLTR)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more Dollar Tree Charts.