Warren Buffett's Berkshire Hathaway this weekend posted a $2.69 billion third-quarter loss as rising inflation, falling stock investments and a big loss from Hurricane Ian offset improvement in many of the conglomerate's businesses.
Operating profit nevertheless rose by 20%, topping analyst forecasts.
Berkshire benefited from increased demand and prices for new home sales, industrial products and energy.
The US Federal Reserve's inflation-fighting campaign also helped Berkshire generate more income from insurance investments.
Buffett's company took advantage of declining equity markets to add more stocks to its $306 billion portfolio, buying a net $3.7 billion and building a now 20.9% stake in Occidental Petroleum.
Berkshire also bought back more of its own stock but was cautious, repurchasing $1.05 billion, similar to the second quarter. It also bought back some stock in October.
The conservatism may reflect the "significant disruptions" that Berkshire said its several dozen businesses still see from supply chains and events beyond their control, such as the Covid-19 pandemic and Russia-Ukraine conflict.
Berkshire also said rising costs from fuel and accidents hurt respective results at two of its best-known businesses, the BNSF railroad and Geico auto insurer.
The quarterly net loss equaled $1,832 per Class A share, and compared with a profit of $10.34 billion, or $6,882 per share, a year earlier.
Results included $10.45 billion of losses from investments and derivatives, as the stock prices of many large Berkshire investments other than Apple fell.
Accounting rules require Berkshire to report such changes even if it buys and sells nothing. This causes large quarterly swings in results that Buffett says are usually meaningless.
Operating profit, meanwhile, rose to $7.76 billion, or about $5,294 per Class A share, from $6.47 billion, or $4,331 per share, a year earlier.
Results improved despite a $2.7 billion after-tax loss from Ian, a strong Category 4 hurricane that slammed into Florida on September 28. Revenue rose 9%, while expenses rose 7%.
Berkshire ended September with $109 billion of cash, up from $105.4 billion in June, though it spent $11.6 billion last month to buy the Alleghany Corp insurance business.

A strengthening US dollar led to $858m of third-quarter gains from Berkshire's non-dollar-denominated debt.
Meanwhile, the Fed's aggressive raising of short-term interest rates fueled a 21% increase in insurance investment income, with income from US Treasuries and other debt nearly tripling to $397m.
Profit at BNSF fell 6% as expenses jumped by one-third, including increases of 27% for compensation and 80% for fuel, some of which was passed on to customers through surcharges.
Geico suffered its fifth straight quarterly underwriting loss, losing $759m before taxes, reflecting more frequent and costly accident claims, rising used car prices and car parts shortages. Written premiums barely changed.
Seifert said Geico, run by Berkshire portfolio manager Todd Combs, has fared worse than many other auto insurers, and may suffer further erosion in underwriting if its "limited revenue growth and claims cost inflation" persists.
Offsetting the declines were profit increases of 6% from Berkshire Hathaway Energy and 20% from manufacturing, service and retail businesses including Clayton Homes, though rising mortgage rates will likely cut into future home sales.
Berkshire also said rising rates may significantly lower any reduction in shareholder equity resulting from an upcoming accounting change for some insurance contracts.
Buffett, 92, has run Berkshire since 1965.
Investors closely watch Berkshire because of his reputation, and because results often mirror broader economic trends.
The company also owns familiar consumer brands such as Dairy Queen, Duracell, Fruit of the Loom and See's Candies.