The Dow Jones Industrial Average rose 260 points as Caterpillar outperformed. The Nasdaq Composite climbed 1 percent to an all-time high, breaking above 8,000 points for the first time, as Facebook, Amazon, Netflix and Alphabet rose. The S&P 500 gained 0.8 percent to hit a record high with materials and financials as the best-performing sectors.
"The market has been buffeted with a lot of headwinds lately, and the biggest one is trade," said Art Hogan, chief market strategist at B. Riley FBR. "If you were to take trade out of the picture, you would have a smoother ride higher in this market."
President Donald Trump said the deal would be called The United States-Mexico Trade agreement, leaving behind the 24-year-old NAFTA name. "The name NAFTA has a bad connotation because the United States was hurt very badly by NAFTA," he said. Trump added that the deal with Mexico is also very special for farmers and manufacturers. U.S. Trade Representative Robert Lighthizer said the deal must be approved by Congress before being implemented.
Trump tweeted earlier on Monday that a deal with Mexico was "looking good."
Shares of Caterpillar and Boeing rose 2.8 percent and 1.3 percent, respectively. Their stocks are considered trade bellwethers because of their large exposure to overseas markets. Shares of Ford, General Motors and Fiat Chrysler also rose.
The Mexican peso rose 1.2 percent against the dollar.
Dan McMahon, director of equity trading at Raymond James, said the positive trade news "allows for more room to run" in the market, but noted that equities are also benefiting from a typically slow time in the year. "There's nothing [else] going on today," he said.
Investors have been grappling with trade worries over the past few months as the U.S. takes a more protectionist stance toward its economy and trade deals under the Trump administration. The U.S. has slapped tariffs on billions of dollars worth in Mexican and Chinese imports, to which Mexico and China have retaliated.
Bank shares surged, led by gains in Goldman Sachs, Morgan Stanley, Citigroup and J.P. Morgan Chase. Goldman rose 3.4 percent while Morgan Stanley jumped 3.8 percent. Citigroup advanced 2.6 percent and J.P. Morgan climbed 2 percent. The SPDR S&P Bank exchange-traded fund (KBE) rose 0.7 percent.
Global markets were also buoyed by comments from Federal Reserve Chair Jerome Powell. He said he sees "further, gradual" rate hikes ahead. The Fed chief said at the Jackson Hole Symposium in Wyoming that the central bank would likely continue with its policy tightening if the economy continued to strengthen.
Powell's comments lifted the S&P 500 and Nasdaq composite indexes to record highs in Friday's trading session. In Europe, the Stoxx 600 index rose 0.5 percent on Monday, while the German Dax climbed 1.2 percent.
In Asia, China's central bank, the People's Bank of China (PBOC), reintroduced a policy adjustment aimed at supporting the yuan. The move, coupled with Powell's comments, sent the Shanghai Composite up by 1.9 percent overnight.
Tesla shares dropped 2 percent after CEO Elon Musk gave up efforts to take the company private.