Warren Buffett’s company more than quadrupled its third-quarter profits because of a huge paper gain in the value of its investments, although its insurance and railroad businesses also improved.

Notably, Buffett’s company bought back nearly $1 billion in stock during the quarter — the first time that’s happened in years — a possible sign that the world’s most famous investor has been unable to find attractive investments to purchase.

Berkshire Hathaway Inc. said Saturday that it earned $18.54 billion, or $7.52 per Class B share. That’s up from last year’s $2.47 billion, or $1.65 per B share, when insurance losses from several hurricanes hurt results.

Buffett has long said Berkshire’s operating earnings offer a better view of quarterly performance because they exclude investments and derivatives, which can vary widely.

By that measure, Berkshire reported operating earnings of $6.88 billion, or about $2.79 per Class B share. That’s up from $3.44 billion, or about $1.40 per B share.

The Omaha-based company’s revenue grew to $63.45 billion in the quarter, which was up from $59.5 billion last year. Berkshire Hathaway officials do not typically comment on the company’s quarterly earnings.

“Overall, it’s a very strong report,” said Andy Kilpatrick, a retired stockbroker and author who wrote “Of Permanent Value: The Story of Warren Buffett.”

Berkshire’s insurance unit, which includes Geico and several large reinsurance firms, reported a $441 million underwriting profit in the quarter. That’s much better than last year’s $1.4 billion underwriting loss when hurricanes Harvey, Irma and Maria caused devastation and Mexico endured earthquakes.

Burlington Northern Santa Fe railroad added $1.4 billion to Berkshire’s quarterly profits, up from $1 billion a year ago. BNSF has hauled 5 percent more freight in the first nine months of the year, signaling that the economy remains strong.

The biggest swing in Berkshire’s quarterly profit came from an $11.5 billion gain in the value of its investments. A year ago, Berkshire reported only a $423 million investment gain. New accounting rules that took effect this year forced Berkshire to change the way it records the value of its investments.

During the quarter, Berkshire repurchased some of its own stock for the first time in several years after loosening its restrictions on the practice. Buffett spent $928 million to repurchase 225 Class A shares and 4.1 million Class B shares during the quarter.

Edward Jones analyst Jim Shanahan said investors will appreciate that Buffett followed through on the new buyback program and purchased shares.

“This will send a strong signal in equity markets,” Shanahan said.

But the fact that Berkshire is buying its own stock while holding more than $100 billion in cash and short-term investments is a reminder that Buffett hasn’t been able to find other large acquisitions and investments at attractive prices recently.

Berkshire Hathaway Inc. owns more than 90 companies, including the railroad and clothing, furniture and jewelry businesses. Its insurance and utility businesses typically account for more than half of the company’s net income. The company also has major investments in such companies as Apple, American Express, Coca-Cola and Wells Fargo & Co.

© The Associated Press. All rights reserved.