This country has no government and 3% growth

Tourists flock to Spain, Portugal, to avoid terrorism risk
Tourists flock to Spain, Portugal, to avoid terrorism risk

The summer is coming to an end, but the Spanish economy is still basking in the sun.

New data shows Spain's economy has been growing at an annual rate of more than 3% for the last 15 months.

This marks a sustained and stunning comeback for a country that was brought to its knees four years ago when Spanish banks had to be bailed out following a big housing market collapse.

And the country is motoring despite not having a functioning government since late 2015.

So how come Spain is doing so well while countries like Italy and France are floundering? Here's an overview:

No government? No problem!

Gridlock in parliament means Spain has only a caretaker government. Voters face a third general election in quick succession later this year, but in the meantime the economy is moving along quite nicely.

Economic reforms introduced by former prime minister Mariano Rajoy have helped the country bounce back from a serious recession. The changes made it easier for companies to hire and fire, and set wages.

Plus, government spending in many areas has continued unabated because no one has the authority to reign in it. That could mean trouble ahead as borrowing rises, but for now it's helping.

"Not only has the economy been on autopilot, but it's gotten a boost from the fact that fiscal policy is looser than it otherwise should have been," said Stephen Brown, a European economist at Capital Economics in London.

Tourist-astic

Spain is having a great year for tourism, with visitor numbers up 11% in the first seven months of the year.

This is partly because tourists are avoiding France, Turkey and Egypt, which have all suffered a series of terrorist attacks.

The influx of tourists has created more jobs. Unemployment recently dipped below 20% after peaking above 26% in 2013, and jobs in tourism have offered lower skilled workers a chance to find employment again.

Brown estimates that the jump in tourism added nearly one percentage point to Spanish growth.

Consumer comeback

Spanish consumers are also feeling more confident about their finances, meaning they're more likely to spend.

Rising employment certainly helps. And even though there's been limited wage growth, that's offset by falling oil prices, said Brown.

On top of that, more people are taking out mortgages, encouraged by record low interest rates.

The Spanish Mortgage Association recently reported that new mortgages for homes were up 24% in the first half of 2016 compared to the same period in 2015.

Personal Finance

LendingTree

CNNMoney Sponsors