NOT for the first time, the message from the stockmarket looks clear. Japan's sickly banks are at last on the mend. The price of shares in Mizuho, the biggest, jumped by a third in two weeks, and is now five times its record low, set in April. The next three—Sumitomo Mitsui Financial Group (SMFG), Mitsubishi Tokyo Financial Group (MTFG) and UFJ—have enjoyed similar leaps. Even Resona, the number five, which received ¥2 trillion ($17 billion) from the government in May (and still thinks it lost ¥1 trillion or more in the six months to September 30th), has seen its share price triple since the bail-out.

Resona's rescue, which cost shareholders nothing, signalled that the government would not let any top banks (or big borrowers) collapse. It sparked a general stockmarket rally, helped along by evidence of economic recovery in Japan, though it was no surprise that banks thought too big to fail proved especially popular. First, foreign institutions bought; then locals switched from bonds to equities. Investors who were late to the rally seem to have given bank shares an extra fillip, buying them because their ups and downs amplify those of the economy. As the yen has climbed recently, bank shares have done well again, as investors have turned away from exporters and towards domestic stocks, such as banks and retailers.

In addition, banks have been making rosy profit forecasts for the half-year ending on September 30th. MTFG has almost quadrupled its net profit forecast, to ¥270 billion. On October 6th, Mizuho raised its estimate from ¥100 billion to ¥230 billion. Two days later, SMFG revised its forecast from ¥80 billion to ¥130 billion. UFJ is expected to follow suit.

Banks made big profits by selling bonds in the spring. Now that the stockmarket has risen, they can count unrealised share-price gains too. Their profits also include one-off tax refunds from the Tokyo city government. MTFG and Mizuho say that the mild economic upturn seems to have helped stem the flow of bad loans. MTFG has even cut its general reserves against loans to weak borrowers, on the assumption that the improving economy will have helped their finances.

Despite all this, there are good reasons for caution. Jason Rogers, of Barclays Capital in Tokyo, gives warning that Japan's banks have merely moved back from near crisis a year ago to a more even keel. Their operating environment remains weak. Land prices are still falling and bankruptcies are still high. Arguably, says Mr Rogers, the health of the small and medium-sized businesses that make up 70% of banks' corporate loans is continuing to deteriorate. Hironari Nozaki of HSBC Securities points out that loan demand remains weak, banks are charging too little interest, given the risk, and banks' fee-based businesses are barely growing.

Although bad loans are being disposed of more speedily, their quantity remains enormous. What is more, much of the recent reduction in bad debts is accounted for by the forgiving of some loans to big, “zombie” firms. Instead of removing the living dead from their books, banks continue to support them with credit lines or fresh loans, which analysts think will probably turn sour in a couple of years. The fact that Resona's new management seems to have discovered another ¥1 trillion or so of bad loans since May is one sign that Japanese banks' difficulties are far from over.