The broad-based S&P 500 stock. index set a record high Monday, beginning July trading on a robust note as Wall Street. reacted to the U.S. and China agreeing at the G20 summit to restart trade talks..

Investor sentiment also rose on the unexpected but historic meeting between President Trump and North Korean leader Kim Jong Un.

Shortly after the opening bell, the S&P 500 hit an intraday high right, but shares slowly pared gains in the afternoon as Boeing stock declined following a report that federal prosecutors had subpoenaed records relating to the production of the 787 Dreamliner in South Carolina.

Semiconductor stocks paced gainers throughout the session on prospects that the Sino-American trade war could end soon.

U.S. benchmark oil prices surge nearly 3 percent higher to levels not seen in five weeks on the possibility rising demand due to improving U.S.-China trade relations, and reduced global supply due to an OPEC plan with Russia to extend production cuts into 2020.

The yield on the 10-year Treasury edged up to 2.03 percent. Bond prices and yield move in opposite directions.

In economic news, the U.S. economy's manufacturing sector expanded in June but at a slower pace than the previous month and the slowest pace overall since October 2016. The Institute for Supply Management (ISM) said its index of national factory activity fell to 51.7 from 52.1 the month before. The reading was just above expectations of 51 from a Reuters poll.

The Commerce Department said on Monday construction spending declined 0.8 percent, the biggest drop since last November. Data for April was revised to show construction outlays rising 0.4 percent instead of being unchanged as previously reported. Economists polled by Reuters had forecast construction spending would rise 0.1 percent in May.

Monday's gains continue the stellar performance for the first half of the year and the strongest June for stocks in decades.

The Dow Jones Industrial Average jumped 7.2 percent jump, the best since 1938, the S&P 500 added 6.9 percent, the strongest June since 1955 and the tech-heavy Nasdaq Composite 7.4 percent -- its best showing since 2000 as tracked by the Dow Jones Market Data Group.

Despite the first-half energy of the equity market, investors should keep expectations for similar gains in the second half of this year in check, LPL Senior Market Strategist Ryan Detrick said.

"We maintain a fair-value target on the S&P 500 of 3,000 in 2019. This great start to 2019 was nice for investors, but the second half of the year could be a bumpy ride, and we believe stocks may finish the year only a few percentage points from where they are currently," he said in a statement to FOX Business.

U.S. investors are heading into a shortened holiday week with markets closing early on Wednesday at 1 p.m. ET and full closure on Thursday in celebration of July 4th.

Stocks around the globe also reacted to the developments at the G20 meeting with gains. Read more at FOX Business