Warren Buffett’s Berkshire Hathaway reported a surge in profits in the first quarter as its investment portfolio swelled in size alongside a broad market rally and its businesses rebounded from the depths of the coronavirus crisis a year ago.

The company said on Saturday that it had swung to a profit of $11.7bn from a loss of $49.7bn a year earlier, on the back of shifts in its $282bn stock portfolio which includes big brands such as Apple and Bank of America.

Its core operating businesses, which include the insurer Geico, BNSF railroad and the Dairy Queen ice cream chain, also improved. Operating earnings from those businesses, Buffett’s preferred measure of Berkshire’s performance, rose 19.5 per cent from the year before to $7bn.

The company, often seen as a barometer of shifts in the wider US economy, benefited from a housing boom that has gripped much of the country. Sales across its building products unit, which includes modular home builder Clayton Homes and the paint maker Benjamin Moore, rose 16 per cent while the division’s pre-tax profits jumped by more than a third.

Berkshire said in its quarterly filing with US securities regulators that many of its subsidiaries “experienced significant recoveries” and “revenues and earnings in the first quarter of 2021 for these businesses were considerably higher than in the first quarter of 2020”.

Column chart of Berkshire annual return minus the total return of the S&P 500 (percentage points) showing Berkshire is ahead of the broader market, after trailing for 2 years

The company added it had passed on rising material costs to its clients as inflationary pressures build, a phenomenon that has led investors and the US Federal Reserve to begin an intense debate over how long price increases will persist.

Berkshire’s cash pile ballooned to $145.4bn from $138.3bn at the end of 2020.

The company disclosed that it had spent $6.6bn buying back its class A and B common stock, as it continued to direct much of its firepower towards share repurchases.

Financial accounts showed it was a net seller of stock in the quarter, underscoring the difficulty Buffett has had in finding attractive acquisition targets.

Shifts in the economy were evident in the performance of businesses owned by Berkshire.

Profits at BNSF rose 5 per cent, helped by higher freight volumes of consumer goods.

Column chart of Cash and cash equivalents ($bn) showing Berkshire Hathaway’s cash pile swelled to a near record

But the fall in demand for aircraft hit aerospace parts manufacturer Precision Castparts, which Berkshire wrote down in value last year amid the pandemic. Sales at Precision Castparts dropped 36 per cent, a trend Berkshire said would persist even as domestic air travel increased.

The winter freeze that hit Texas in February caused $460m in losses for two of Berkshire’s insurance units and also caused a drop in profitability at Lubrizol, its speciality chemicals business, which had to shut down several plants.

The results were reported hours before Buffett and a trio of Berkshire executives addressed the company’s shareholders at an annual meeting, at which the company warned on inflationary pressures and flagged a broader US economic recovery.

The pandemic has forced the company to hold the meeting virtually for a second consecutive year. The annual gathering took place in Los Angeles rather than Omaha, Nebraska, where the event typically draws tens of thousands of Berkshire shareholders who come to listen to Buffet’s investment and life advice.

Berkshire’s class A shares have climbed 18.6 per cent this year and closed on Friday at $412,500. The gain put the conglomerate ahead of the 11.8 per cent total return of the benchmark S&P 500, setting a path for Berkshire to eclipse the annual performance of the wider market for the first time since 2018.