Former Treasury Secretary Jack Lew spoke to Politico's Money podcast about President Donald Trump, the economy, and the 2016 election.

Lew said Trump has been "lucky so far" that no external shock has derailed the economy.

The Obama appointee also said there were a slew of geopolitical and economic issues that could cause a crisis for Trump in the coming year.

Former Treasury Secretary Jack Lew said he that President Donald Trump has been the beneficiary of luck so far with the economy — and he warned that sometimes, luck runs out.

In an interview with Politico's Ben White for the Politico Money podcast, Lew said the global economy had been incredibly resilient during the first year of Trump's presidency compared to many years under President Barack Obama, who appointed him to his former post.

"They’ve had a lot of luck so far," Lew said. "We, in our first few years and for a long time, there was a crisis that exploded that you just had to deal with."

Lew, who was also Obama's chief of staff from 2012 to 2013, said a variety of external issues could derail the economy and markets — Trump's protectionist trade policies, military conflict with North Korea, increasing federal deficits — that so far have not made a dent.

"The world is on the edge right now but is not breaking through on most of those issues," Lew told Politico. "The question is what happens if one of those crises actually switches from being potential to real."

In addition to talking about the global economy, Lew also looked back at the 2016 election, saying that he "had a bad feeling before the election" and recounting talking to Treasury Department staffers the next day.

"A lot of them who were younger than me hadn’t experienced crushing election outcomes," he said. "And the country survived and we survived and the pendulum swung back. You take two steps forward, you take a step back.”