Defense stocks took off on Monday after President Donald Trump signed a nearly $110 billion weapons deal with Saudi Arabia. The deal will be worth $350 billion over 10 years.

On Monday, Lockheed Martin closed up more than 1 percent and General Dynamics closed up about 1 percent. These stocks, along with Raytheon and Northrop Grumman, hit all-time highs earlier in the day.

Additionally, the iShares U.S. Aerospace & Defense ETF (ITA) closed nearly 1 percent higher.

Jet maker Boeing also signed a handful of deals with Saudi Arabia during Trump's weekend visit, involving the sale of military and passenger aircraft. Its stock closed up more than 1 percent.

These types of arms deals have caused defense stocks to rally in the past, according to CNBC analysis using Kensho.

One month after about 40 U.S.-Saudi Arabia arms deals — going back to 2009 — the iShares U.S. Aerospace & Defense ETF was up 3.3 percent, on average, almost double the return of the , according to data compiled by Kensho.

"The key, and as yet unknown, issue will be (1) when/if all the various items mentioned are put under contract and (2) when they are to be delivered," Cowen analyst Cai von Rumohr wrote in a note to clients.

"Given the generally extended period required to finalize foreign arms contracts, we'd expect little impact on 2017 results, with some potential benefit in 2018 and more in 2019," Rumohr said.

Lockheed Martin is slated to be the biggest potential winner after this news, with Raytheon being a "potential dark horse winner," should its Patriot missile be purchased, Rumohr said.

Trump's deal with the Saudis solidifies a decades-long alliance with the world's largest oil exporter and will be worth $350 billion over 10 years.

Lockheed Martin said in a statement that the deal "will directly contribute to [Saudi Arabia's] Vision 2030 by opening the door for thousands of highly skilled jobs in new economic sectors."

— CNBC's Javier David contributed to this report.

CNBC's parent NBCUniversal is a minority investor in Kensho.

Correction: President Donald Trump signed a nearly $110 billion weapons deal with Saudi Arabia. An earlier version misstated the figure.