NAVIGATING Greece's banks through the shoals of economic crisis is a labour worthy of Heracles. With merely mortal powers, the executives running the country's biggest banks have not done too bad a job. They entered the crisis with relatively prudent balance-sheets and several raised capital earlier this year, when markets were more forgiving. They are also starting to band together to cut costs and plump up their capital cushions.

On August 29th investors cheered the merger of the country's second- and third-largest banks, Eurobank EFG and Alphabank, to form what will be Greece's biggest. They also managed to secure a promise of an investment from Qatar and announced plans to issue shares to raise capital.

The news prompted a sharp rally in Greek banking shares, which jumped by almost 30% as investors forecast more mergers. Although the euphoria was ephemeral—shares fell the following day—the deal may do something to help stabilise an embattled financial system.

The big advantages of the deal are that it will allow the banks to cut costs, mainly by trimming their branch network, and thus to improve capital ratios. Executives say that within three years the merged bank will reduce its annual costs by €650m ($936m). That would be enough to restore it to profitability if there were no further write-downs on its holdings of Greek government bonds.

Yet talk of profitability looks ambitious given the bleak economic outlook. The two banks posted an alarming rise in bad loans during the first half of the year. Executives say things have improved since, but the trend will not go properly into reverse as long as the Greek economy keeps contracting. Deposits have been flowing out of the system, in part because Greeks are running down their savings to make ends meet. That bodes ill for loan losses, too.

The risk of a big shock still looms as well. There are worries about whether enough holders of Greek government bonds will take part in the private-sector bail-out package agreed in July for it to take effect. This week the interest rate on one-year government bonds surged to 60%, suggesting that many investors think a default is imminent. Despite their best efforts, Greek banks still risk being swamped.