TECHNOLOGY giants are a bit like dinosaurs. Most do not adapt successfully to a new age—a “platform shift” in the lingo. A few make it through two and even three. But only a single company spans them all: IBM, which is more than a century old, having started as a maker of tabulating machines that were fed with punch cards.

Yet after 21 quarters with falling year-on-year revenues (see chart), doubts had been growing about whether IBM would manage the latest big shifts: the move into the cloud, meaning computing delivered as an online service; and the rise of artificial intelligence (AI), which is a label for all kinds of digital offerings based on insights extracted from reams of data. In May Warren Buffett, chief executive of Berkshire Hathaway, a holding company, announced that his firm had sold a third of its total stake in IBM, then valued at $13.5bn, saying that “I don’t value IBM the same way I did six years ago when I started buying.” Analysts were starting to wonder how long Ginni Rometty, the firm’s boss (pictured), would remain at the helm.

On October 17th, however, IBM’s quarterly results suggested that sceptics might just be wrong. Revenues slipped again, to $19.2bn, but they did so less than expected. The firm indicated that it could see growth return in the next quarter and its shares rose on October 18th by 8.9%, the biggest one-day gain since 2009. Could Big Blue, still one of the world’s largest information technology (IT) firms with nearly 390,000 employees, have turned the corner?

If big IT firms often fail to adapt to such shifts, it is because these changes require more than adopting new technology. They also force companies to question what they stand for, according to Michael Cusumano, a business professor at the Massachusetts Institute of Technology. The brand, the technical skills, how products and services are sold, must all be examined. Many firms choose to defend their existing domains instead.

After a near-death experience in the early 1990s, when sales of its mainframes collapsed, IBM seemed to have found a formula to stay ahead in technology. Under Louis Gerstner and Sam Palmisano, its former bosses, it quickly adapted to the internet and was one of the first big IT firms to back open-source software. It ditched businesses about to become commodities, such as personal computers and low-end servers. And it stuck to a financial “road map” telling investors how profitable it intended to be over the next five years. Nor did it hesitate to spend billions buying back stock to lift its earnings per share.

Yet this fixation on financial metrics (a stance that predated Ms Rometty) is a big reason why IBM had a late start in the cloud—a trend it had spotted earlier than many competitors. As a result, it is now an also-ran in cloud computing, at least in the part of it called the “public cloud”, or networks of big data centres shared by many firms. IBM is number three at best; Amazon and Microsoft lead the pack by some distance, benefiting from the growing number of firms moving applications into the cloud, rather than running them on their own computer systems. More than 40% of IBM’s revenues come from products and services that directly compete with public-cloud offerings, says Steve Milunovich of UBS, an investment bank.

IBM has tried to avoid the problem, being, for example, the first tech giant that went big on AI. Building on a technology called Watson, which in 2011 won “Jeopardy!”, an American quiz show, the firm two years later launched a new line of business to help organisations make predictions from patterns in their data. It promoted the effort heavily and invested billions, particularly in health care, for example to help hospitals to use patient data to gauge health risks. Yet progress has proved slow, mainly because it is often hard to make sense of patient records. The M.D. Anderson Cancer Centre in Houston earlier this year cancelled a Watson project after spending $60m because it was deemed not ready for clinical use. People in the field of AI are now dismissive of Watson, which in turn affects its ability to attract talent.

The slow take-off of the AI business makes managing the decline of old businesses while quickly growing the new ones even harder for IBM. In addition to the cloud and AI it is developing cyber-security, mobile services and offerings based on blockchains, special databases that also underlie Bitcoin, the cryptocurrency. “It’s like having to run up an escalator in the wrong direction”, says Frank Gens of IDC, a market-research firm.

For the past five years IBM has not been running fast enough, resulting in declining revenues. Now, according to its own measures, at least, it has enough upward momentum that it will no longer be slipping down. Revenues of what it calls “core business”, or sales of IBM products and services that are used in conventional computing, fell by 9% in the latest quarter, down from 11% in the previous one. By contrast, the firm’s “strategic imperatives”, which mainly include the cloud and AI, grew by 10%, up from 7%. These generate 45% of IBM’s business, up two percentage points from the previous quarter. “We are now exactly where we promised early this year we would be,” says Martin Schroeter, the firm’s chief financial officer.

Still, the company was in a similar place a year ago, only to see the decline of its old businesses accelerate and the growth of the new ones slow. This time the positive trends may continue, due to a seasonal effect around chief information officers needing to spend their budgets (last year revenue rose by $2.5bn from the third to the fourth quarter). Mr Schroeter expects the bump to be between $300m and $400m higher this time around, in part because a recently introduced new version of IBM’s mainframe has been selling well.

The real test will come later on, when the effect of the new mainframes wears off and IBM must still prove that it has reached an inflection point in its efforts to change. And that will not be easy. The old core will continue to decline. Notwithstanding the success of the new mainframe models, which specialise in thwarting hacking attacks, this computing franchise “is eroding”, in the words of Mr Milunovich, who expects it to continue to shrink by 3% annually. This will weaken the corporate edifice. According to some estimates, although mainframe sales generate only 2% of the firm’s revenues, related software and services account for a quarter of its revenues and more than two-fifths of its profit.

As for the new businesses, they seem to be gaining momentum, but how much is unclear. IBM includes many types of related products and services in its cloud revenue, even the “private” clouds it is building for customers on their premises. But it is the public cloud that has become the centre of gravity in IT and the main source of innovation, says Mr Gens. It is where new software and, increasingly, new hardware, such as specialised AI chips, are developed. Microsoft is now even building tools for developers in the public cloud so that they can experiment with quantum computers, which are much more powerful than conventional ones.

With AI the financial picture is similarly blurry. IBM does not reveal Watson’s profits. In July Jefferies, another investment bank, warned in a report that profits from IBM’s AI investments may in fact only barely cover their cost of capital. The firm itself says that AI is now woven like a “silver thread through all its products”, in the words of Mr Schroeter. It also says that more customers are using the technology to power new services, such as tax advice and automated customer support. And it has made certain AI products, such as speech recognition and translation, available as online services for other firms to combine them with their own offerings. But Amazon, Microsoft and many startups sell similar “cognitive services”, some of which are said to be better than IBM’s.

The new businesses may simply not be as profitable as the old ones. Mr Schroeter says that they are and that margins will fatten (profits were down 4.5% in the past quarter, to $2.73bn). This week’s bounce in IBM’s shares suggest that investors are giving Ms Rometty the benefit of the doubt. But the firm has yet to show that this optimism and the expectation of a successful turnaround are justified.