Greece is not yet out of the woods. But there is a credible path that could lead the country back into the sunlight. That’s the main conclusion of a week I have just spent in the country.

Although the economy will have a terrible 2013, next year should be better. But the outlook is fragile: political crisis could yet rear its ugly head, tax evasion is rife and there’s the risk of external shocks.

Look first at the good news. Antonis Samaras’ coalition government has held together surprisingly well since it came to power last June following a period of political chaos, despite pushing through extremely unpopular measures. Samaras’ centre-right New Democracy party is neck and neck in the opinion polls with the radical left Syriza, the main opposition party. Samaras hasn’t suffered the plunging support of Spain’s Mariano Rajoy or France’s Francois Hollande.

Largely as a result of Samaras’ effective government, the troika – the European Commission, the International Monetary Fund and the European Central Bank – last week gave Greece a thumbs-up in its latest progress report. More bailout funds, which so far total around 200 billion euros, will be disbursed.

Last year’s trauma, when it looked like Greece might quit the euro, and the ongoing austerity will cause the economy to shrink by another 5 percent or so this year, taking the cumulative decline to around 25 percent. Unemployment will probably rise to about 30 percent.

These are grim figures. But Athens now seems on course to achieve “primary balance” this year. In other words, it won’t have a budget deficit before interest payments. That means it probably won’t have to implement another round of austerity next year, so the economy won’t be struggling against that headwind.

Meanwhile, up to 50 billion euros of bailout cash is being used to recapitalise viable banks and shut down non-viable ones. The money is meant to fill a hole left by the steep losses on their government debt holdings and the avalanche of bad private-sector loans. It is tragic that this operation wasn’t completed at the start of the crisis, as the zombie banking system has exacerbated the slump. Still, better late than never.

The banks’ dependence on expensive emergency liquidity assistance (ELA) from the Greek central bank has also been slashed. It is now 22 billion euros, down from a peak of around 120 billion euros. Banks’ funding costs have fallen, theoretically allowing them to pass the benefit to clients.

Another 8.2 billion euros of bailout cash is being used to pay the government’s bills. Again, it is terrible this wasn’t done earlier. Athens’ failure to pay its bills has crushed many businesses. But again, if the money is disbursed rapidly, the private sector will get a breather.

The drive to improve competitiveness, mainly through much lower wage costs, is finally bearing fruit too. This is most visible in tourism, which accounts for 17 percent of GDP. Revenues are expected to jump 9 to 10 percent this year, according to the industry.

If Athens can hold the course, there’s also a good chance that the euro zone will agree to further lighten its debt load, which amounts to about 160 percent of GDP, by cutting the interest rate and lengthening the maturities of official loans. This was explicitly mentioned in the latest troika report. Debt relief would allow Athens to avoid further fiscal tightening.

However, the outlook isn’t all rosy. For a start, the political situation remains fragile. Even if the coalition hangs together, elections will probably be called by early 2015 at the latest. This is because Greece needs to choose a new president then and the constitution specifies that if a super-majority of MPs can’t agree on a candidate – which seems likely – a general election has to be called.

Many observers think Samaras could be tempted to call an even earlier election, especially if he thinks he can win. But such a gamble could backfire. Meanwhile, a Syriza-led government could lead to renewed friction with the troika and a decline in business confidence.

Samaras should also not be complacent about the country’s finances. While Athens is hitting its deficit targets, this is because spending is below target. Revenues are also below target, a consequence of the continued failure to crack down adequately on tax evasion. Doing so is vital, not least so that taxes on honest citizens don’t have to be raised further.

More generally, Samaras doesn’t seem to be doing enough to combat oligopolistic practices – perhaps because his party is closely associated with some of the country’s oligarchs. The troika should make clear that freeing up markets is essential for Greece’s competitiveness and progress on this front will be a key factor in determining whether to provide further debt relief.

Finally, there is the risk of external shocks. Athens has so far largely dodged the bullet from Cyprus, after Cypriot banks’ branches in Greece were ring-fenced from the deposit haircuts in Nicosia. Even so, trade with Cyprus will plummet and the confidence of Greek depositors has been somewhat shaken.

The real danger would be if the Cyprus crisis deteriorates to such an extent that Nicosia quit the euro. Contagion to Greece would then be harder to avoid.

That said, the outlook for Greece looks far better than it has for years. The country will probably make it.