IT IS always darkest before August. When policymakers head on vacation, risk-takers put their optimism on ice, retreat to cash, and leave markets to find their own level.

That’s how it’s looking in Europe anyway. Spain may be on the verge of losing market access. Any warm feelings its government generated with last week's new round of austerity were quickly washed away by mounting bad news on the economy, its regions’ finances, and its banks. European leaders, having announced plans to strengthen the European Stability Mechanism (ESM), can’t act on them until Germany’s constitutional court rules on their legality on September 12th. The European Central Bank remains on the sidelines.

It is easy to envision a downward spiral that results in multiple countries leaving the euro amidst a financial and economic meltdown. It is almost impossible to envision the opposite. But somebody has to.

In May, Peter Berezin of the Bank Credit Analyst adopted the viewpoint of someone looking back on the crisis from the year 2021, and described what today must seem like a hopelessly idyllic outcome:

In the end, the common currency survived. Indeed, over the past five years, growth has accelerated sharply and debt levels and borrowing spreads have continued to come down… While it was hard to imagine during the dark days of 2012, European stocks have outperformed all other major markets over the past decade.

How did Europe get there? The reports of BCA, a Montreal-based research shop, stand out for how incisively they diagnose the causes of the euro crisis and the plausibility of the scenarios they sketch for its resolution. Mr Berezin's June report accurately pinpoints the source of the crisis: persistently higher inflation and slower productivity growth in the periphery led to growing current account deficits with Germany. Ordinarily, such deficits are solved by devaluation. In a monetary union that's impossible; it requires either prolonged deflation in the periphery, systematically higher inflation in Germany, or default—either explicit, or via euro exit.

It is fear of this last outcome that is driving the periphery's vicious circle of rising bond yields, austerity, recession and deficits. Breaking that circle requires restoring risk-free status to peripheral government debt. That could be done via explicit debt mutualisation through Eurobonds (ie, Germany is on the hook for Italy’s debts) or the European Central Bank, with its unlimited buying power, becoming lender of last resort.

In Mr Berezin’s telling, things had to get much worse before they could get better. In the fall of 2012, Greece abrogated its bail-out agreement with the IMF, European Union and ECB, declared a moratorium on all external debt payments, and began paying domestic bills with IOUs that it then declared legal tender. The ECB cut off Greece’s banks, Greece responded with capital controls, and relabeled its IOUs “new drachmas” which quickly plunged to 35 euro cents. Bank runs immediately commenced throughout the periphery; bond yields in Spain shot over 7%; global stockmarkets cratered.

The ECB was finally forced to act to save the euro: it announced it would buy as many bonds as necessary to cap all sovereign yields at 6%, with the exception of Greece. The ECB never had to buy any bonds: investors no longer had any reason to sell since the ECB had taken insolvency off the table.

Just as important as the market consequences of the ECB actions were the macroeconomic ones: they succeeded in pushing inflation sharply higher in Germany, enabling the periphery to recover competitiveness and balance their current accounts. It was striking, Mr Berezin's writer from the future reflected, how complacent markets were about inflation in Germany in 2012: indexed bonds were forecasting inflation of 1.2% while unemployment was at a 20-year low, home prices were rising, and unions were negotiating fat wage increases. Many were so fixated on Germany’s reputation for monetary discipline they had forgotten its temporary bouts of inflation, most notably in the early 1990s. Higher inflation was “the price that West Germany paid for reunification. As it turned out, higher inflation was also the price that Germany paid for preserving the euro zone.”

A lot has happened since that was written in May. For one thing, Spain’s yields are now well over 7%. Earlier this month Dhaval Joshi of BCA issued an update. The key development, he writes, is that at the European summit last month, leaders acknowledged their monetary union won’t work as currently structured and they commited themselves to creating a fiscal and banking union (though not in so many words). But how? Eurobonds would require multiple treaty changes and take too long. Mr Joshi acknowledges the ECB’s opposition to large-scale bond buying “is almost religious”. Though soon able to buy sovereign debt, the ESM's firepower is limited to €500 billion. That problem would be solved if the ESM became a bank, giving it access to unlimited ECB liquidity. That's what Mr Joshi expects.

Today Ewald Nowotny, head of Austria’s central bank and an ECB council member, told Bloomberg he saw arguments in favour of giving the ESM a banking license. “There are also other arguments, but I would see this as an ongoing discussion.” It is too soon to say that Mr Nowotny’s remarks are a turning point; the ECB and Germany have previously opposed making the ESM a bank and lender of last resort. Even if that opposition is weakening, breaking it down altogether will take time that Europe may not have. Mr Joshi concludes the markets may have to riot more before policymakers take the necessary step. The time to buy European stocks and peripheral bonds isn’t here yet, he says: but he thinks it will arrive in the next 12 months. Is this possible? Perhaps. Is it optimistic? Definitely. So keep it in mind: it may help you through the dark, hot days ahead.