Stocks posted solid gains Monday after the White House said it reached a preliminary agreement with Mexico on replacing the North American Free Trade Agreement. The Nasdaq composite index topped 8,000 points for the first time.

The trade deal is far from final, and few details were made public during trading hours Monday, but investors were encouraged that the countries are working toward a resolution.

The United States still needs to reach an understanding with Canada, the third party in the accord and the United States’ second-largest trading partner. Canada’s NAFTA negotiator, Foreign Minister Chrystia Freeland, is scheduled to fly to Washington on Tuesday to try to restart talks.

Automakers, which would stand to benefit from warmer trade relations between the U.S. and Mexico, rose sharply. Major exporters, including chemical and industrial companies, rose, and so did banks and technology firms.


“Most of this year has been a series of potentially negative events on trade, setting up barriers to trade,” said Craig Birk, chief investment officer for Personal Capital. “The market is welcoming anything that’s the opposite.”

Birk said investors were glad to get some good news on trade even though talks on a NAFTA replacement are likely to continue beyond the congressional elections this fall and into 2019.

The Standard & Poor’s 500 index climbed 22.05 points, or 0.8%, to 2,896.74. The Dow Jones industrial average jumped 259.29 points, or 1%, to 26,049.64. The Nasdaq composite advanced 71.92 points, or 0.9%, to 8,017.90. The Russell 2000 index of smaller-company stocks crept up 2.73 points, or 0.2%, to 1,728.41.

Among automakers, GM climbed 4.8% to $37.69 and Ford rose 3.2% to $9.99.


Construction equipment maker Caterpillar rose 2.8% to $142.04. Chemicals maker DowDuPont increased 2.3% to $70.81.

Alphabet, Google’s parent company, climbed 1.6% to $1,256.27. Online retailer Amazon rose 1.2% to $1,927.68.

Trade tensions are one reason the U.S. dollar’s value has been climbing this year, and on Monday, word that a revision of the NAFTA deal could be coming sent the dollar lower. The U.S. currency fell to 1.2965 Canadian dollars from 1.3029 late Friday and to 18.7338 Mexican pesos from 18.9249. It also fell to 111.10 yen from 111.20 yen. The euro rose to $1.1680 from $1.1625.

The S&P 500 has risen for seven of the last eight weeks, fueled by strong corporate earnings and growing optimism that the U.S. would work out its differences with several major trading partners. The benchmark index is up 6.6% since the end of June, and, like the Nasdaq and Russell, it’s trading at all-time highs.


Tesla fell 1.1% to $319.27 after chief executive and top shareholder Elon Musk said over the weekend that the maker of electric cars will remain a publicly traded company. Musk wrote in a Friday blog post that he gave up on a plan to take Tesla private, partly because investors didn’t support it.

Wall Street was stunned this month when Musk tweeted that he had secured funding to take Tesla private, and although the company’s stock jumped initially, investors remained skeptical. Musk said his proposal valued Tesla at $420 a share, and afterward the stock peaked at about $380 a share, close to an all-time high for Tesla but still well below the price he named.

Since then, the stock has tumbled as it became clear Musk hadn’t lined up funding for the deal. Now reports say regulators are looking into Musk’s tweets, including whether he described the potential deal accurately, among other issues for Tesla.

Bond prices slipped. The yield on the 10-year Treasury note rose to 2.84% from 2.82%. The increase in interest rates helped financial companies, and Goldman Sachs shares rose 3.2% to $242.60.


Utilities and other high-dividend companies fell. Investors consider those big dividend payers an alternative to bonds and often sell them when bond yields start to rise.

Benchmark U.S. crude edged up 0.2% to $68.87 a barrel in New York. Brent crude, which is used to price international oils, rose 0.5% to $76.21 a barrel in London.

Wholesale gasoline rose 0.6% to $2.09 a gallon. Heating oil rose 0.6% to $2.21 a gallon. Natural gas fell 1.4% to $2.88 per 1,000 cubic feet.

Gold rose 0.2% to $1,216 an ounce. Silver rose 0.4% to $14.86 an ounce. Copper ticked up 0.3% to $2.71.


UPDATES:

4:10 p.m.: This article was updated with closing prices, context and analyst comment.

This article was originally published at 7:15 a.m.