By Anora Mahmudova and Barbara Kollmeyer, MarketWatch

NEW YORK (MarketWatch) -- U.S. stocks edged higher on Thursday with the modest gains pushing the S&P 500 into record territory for the second straight day this week.

Investors digested a deluge of earnings reports as well as mixed economic data.

Ahead of the opening bell, weekly jobless claims came in far better than expected, as the number of people claiming benefits fell to the lowest level since February 2006, but June's pace of new-home sales hit a three-month low while the May number was revised down significantly.

The S&P 500 (SPX) rose 3.5 points, or 0.2%, to 1,990.54, after setting a fresh intraday record. The Dow Jones Industrial Average (DJI) added 19 points, or 0.1%, to 17,105.61. The Nasdaq Composite (RIXF) gained 8 points, or 0.2%, to 4,481.64.

Follow MarketWatch's live blog of today's stock-market action.

Colin Cieszynski, chief market strategist at CMC Markets, says markets had a pretty good run so far with the main benchmarks reaching all-time or multi-year records, which make them vulnerable for corrections.

"Markets are already at lofty levels and we need more good news to keep going higher. Today's economic and corporate news have been mixed. Earnings so far have supported the market, but there is cautious optimism among investors as we are entering historically weak months," Cieszynski said.

In earnings news, shares of Facebook(FB) jumped 5.6% action after profit and sales beat expectations.

Ford(F) shares rose 1.5% after the car maker beat earnings expectations.

General Motors Co. (GM.XX) profit sank 80% as the auto maker was hit by recalls. Adjusted earnings matched analyst expectations. Shares were 2.8% lower in premarket.

Among the decliners, Shares of TripAdvisor Inc. (TRIP) sank 11% and Angie's List Inc. (ANGI) tumbled 22% after those companies separately reported late Wednesday.

Among the early reporters Caterpillar Inc. (CAT) shares dropped 3.3% after the maker of manufacturing equipment said sales fell short of expectations in the second quarter, but the company raised its earnings outlook again.

For more on Thursday's notable movers, read our Mover & Shakers column.

In economic news, sales of new single-family homes fell by more than expected in June to the slowest pace in three months, with drops across the country, according to government data released Thursday.

The number of unemployed workers applying for jobless benefits tumbled in the most recent weekly data to the lowest level in more than eight years, signaling that employers are letting go of very few workers.

Outside of a loss for the Nikkei 225 index , Asian stocks rose across the board Thursday with a 1.2% gain for the China Shanghai Composite , after a preliminary reading of Chinese manufacturing data from HSBC hit an 18-month high. European stocks gained across the board amid a big earnings day there.

Crude-oil (CLU4) edged lower along with gold prices (GCQ4), while the dollar (DXY) steadied.

More must-reads from MarketWatch:

Why the S&P rally is nothing to get freaked out about, in one graph

EU set to ban trading in Russian stocks: FT

Goldman's 'golden cross' appears at the perfect time

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

Caterpillar (NYSE:CAT)
Historical Stock Chart
From Feb 2024 to Mar 2024 Click Here for more Caterpillar Charts.
Caterpillar (NYSE:CAT)
Historical Stock Chart
From Mar 2023 to Mar 2024 Click Here for more Caterpillar Charts.