Traders have credited a number of recent developments for last week's all-time highs in the stock market, from expectations for additional central bank stimulus to the speedy resolution of Britain's contest for prime minister.

On Monday, Continental Resources founder Harold Hamm offered another explanation: the prospect that America will get a business-friendly president in Donald Trump.

The Dow Jones industrial average, , and Nasdaq all closed up about 1.5 percent or more last week and turned in their third consecutive week of gains.

"I think you could say that that's the Trump rally," Hamm told CNBC's "Squawk Box" on Monday in an interview from Cleveland, where he will give a speech at the Republican National Convention.

"Business people across the world are seeing the possibility of Donald Trump being president, and this is a big thing that I believe is inspiring people to put money here in America instead of Germany or other places where we have lot of things going on," said Hamm, Continental's CEO and chairman and an energy adviser to Trump.

Hamm said the United States is the safest place in the world to invest, and Trump will be a job creator.

But his view does not align with a recent Wall Street survey conducted by CNBC.

By 80 percent to 15 percent, respondents to the June CNBC Fed Survey think Hillary Clinton will win the election, virtually unchanged from the April survey. When it comes to whose policies are best for the stock market, Clinton bests Trump 38 percent to 25 percent.

Last week, Morgan Stanley said its research suggests Clinton will take the White House, Democrats will reclaim the Senate, and Republicans will hold Congress. Any policy changes will be incremental as government remains divided, in the bank's view.

And a new NBC News/Wall Street Journal poll found Clinton leading by 5 points, although the poll had a 3.1-point margin of error. The latest CNN/ORC poll gives Clinton a 7-point advantage, while the most recent ABC News/Washington Post poll sees Clinton with a narrow lead.

Hamm said the oil and gas industry had suffered death by a thousand cuts due to over-regulation under President Barack Obama.

The Obama administration has pushed through measures regulating hydraulic fracturing on government land and the release of methane from new and modified wells.

But U.S. oil production also surged throughout much of Obama's time in office, hitting a 45-year high of nearly 9.7 million barrels per day last year, before a roughly two-year price rout caused by oversupply forced exploration and production companies such as Hamm's Continental to scale back drilling.

Asked whether higher U.S. oil output would only make matters worse for American drillers, Hamm said future production would be needed and it underpinned the country's national security.

— CNBC's Steve Liesman contributed to this story.