After two dismal performances in the Iowa caucuses and the New Hampshire primary, entrepreneur Andrew Yang has dropped out of the race for the Democratic presidential nomination. It makes for a quiet end to a campaign in which he spent tens of millions of dollars and successfully vaulted himself into the national spotlight despite his paucity of political experience.

Along the way, he injected some big ideas into the mainstream of Democratic debate — chief among them a universal basic income — and roused a movement of supporters big enough and enthusiastic enough to earn themselves a nickname: The Yang Gang.

But in the end, it wasn’t enough to make him president. So what next?

No sooner had Yang announced he was winding things up than the New York Post reported “Democratic consultants and other operatives throughout the Big Apple were buzzing” about his potential as a candidate for mayor of the nation’s largest city.

Yang hasn’t yet said he’s running — but it’s never too soon to weigh up what he’d be getting into.

Democratic candidates compete on the campaign trail: In pictures Show all 18 1 /18 Democratic candidates compete on the campaign trail: In pictures Democratic candidates compete on the campaign trail: In pictures Jessica Canicosa, a precinct captain for Bernie Sanders, waits to greet caucus voters at Liberty High School in Henderson, Nevada REUTERS Democratic candidates compete on the campaign trail: In pictures Hotel workers at the Bellagio in Las Vegas get to grips with voting papers during the Nevada caucuses AFP via Getty Images Democratic candidates compete on the campaign trail: In pictures A caricature of Bernie Sanders is projected on to a tree during a rally in Las Vegas EPA Democratic candidates compete on the campaign trail: In pictures A woman waits to have a photo taken with Elizabeth Warren during a town hall meeting in Las Vegas REUTERS Democratic candidates compete on the campaign trail: In pictures The threat of coronavirus and other germ-borne illnesses was on some voters' minds at the Democratic caucuses in Henderson, Nevada Getty Images Democratic candidates compete on the campaign trail: In pictures Former vice-president Joe Biden takes a selfie with a voter in Las Vegas ahead of the Nevada caucuses REUTERS Democratic candidates compete on the campaign trail: In pictures Amy Klobuchar changes her shoes backstage after giving a speech in Exeter, New Hampshire AFP/Getty Democratic candidates compete on the campaign trail: In pictures A warmly-wrapped-up dog attends an Elizabeth Warren event at Amherst Elementary School in Nashua, New Hampshire AFP/Getty Democratic candidates compete on the campaign trail: In pictures Bernie Sanders, who romped to victory in New Hampshire against Hillary Clinton in 2016, talks to the media in Manchester Getty Democratic candidates compete on the campaign trail: In pictures Joe Biden was hoping to improve on his poor showing in Iowa in the New Hampshire primary Reuters Democratic candidates compete on the campaign trail: In pictures Elizabeth Warren, renowned for giving time to supporters for selfies, works the crowd at the University of New Hampshire in Durham Getty Democratic candidates compete on the campaign trail: In pictures Joe Biden takes a selfie with a supporter and his child outside a campaign event in Somersworth, New Hampshire on 5 February Reuters Democratic candidates compete on the campaign trail: In pictures Elizabeth Warren and Bernie Sanders quarrel after a confrontation in a TV debate in which Sanders claimed that Warren was not telling the truth about a conversation in which she claimed he had said a woman could not win the presidency on 14 January AP Democratic candidates compete on the campaign trail: In pictures Supporter Pat Provencher listens to Pete Buttigieg in Laconia, New Hampshire on 4 February Getty Democratic candidates compete on the campaign trail: In pictures Pete Buttigieg speaks at a campaign event in Concord, New Hampshire while awaiting the results of the Iowa caucus Reuters Democratic candidates compete on the campaign trail: In pictures Elizabeth Warren is presented with a balloon effigy of herself at a campaign event in Nashua, New Hampshire on 5 February Reuters Democratic candidates compete on the campaign trail: In pictures A Trump supporter rides past a rally for Amy Klobuchar in Des Moines, Iowa on 14 January AP Democratic candidates compete on the campaign trail: In pictures A man holds up a sign criticising billionaires in the presidential race in front of Michael Bloomberg in Compton, Califronia. The former New York mayor skipped the first caucus in Iowa and instead campaigned in California on 3 February Reuters

The mayoralty of New York is one of the biggest jobs in the US. Taken alone, the city’s population would make it the twelfth largest state in the union, with the third-largest GDP (after California and Texas). For an ambitious former tech executive whose political instincts are a blend of the idealistic and the technocratic, it’s possibly the ideal job.

Assuming Yang ran for the job as a Democrat, he would have to compete in a primary against the unpopular two-term incumbent, Bill de Blasio, who also ran for the Democratic presidential nomination this year (he fared far worse than Yang, dropping out long before the primaries began).

When he was first elected in 2013, de Blasio was heralded as something of a standard-bearer for liberals, but he is now deeply unpopular for various reasons in a very liberal city — meaning he could be very vulnerable to a challenge from a high-profile “disruptive” candidate, particularly one able to attract the kind of media attention Yang has received.

Yang would be following in the footsteps of several towering figures in local (and indeed national) history. Among them are Ed Koch, who oversaw the city during the crime wave of the 1980s, and Rudy Giuliani, now Donald Trump’s personal lawyer, who is well known for using the ‘broken windows’ policy on crime, and famously took to the streets in the aftermath of 9/11.

But most conspicuous of all is another of this year’s Democratic presidential contenders. Michael Bloomberg succeeded Giuliani as mayor, initially as a Republican and then as an Independent; he reigned for 12 years, extending the office’s term limit in order to do so.

If Bloomberg’s campaign succeeds, it’ll might make the mayor’s office all the more tempting for those who, like Yang, probably still harbour dreams of being president. Then again, it’s not quite that simple.

Giuliani too tried to leverage his record as mayor to win the presidency; his campaign turned out to be an unmitigated (and very expensive) failure.

And as his presidential campaign ramps up, Bloomberg has found himself in hot water over his mayoral record: his former enthusiastic defence of stop-and-frisk police tactics has revolted much of the Democratic base, and, with a long way to go till the nomination is settled, he will struggle to shake the issue off.