TOKYO (AP) — Japanese technology investor SoftBank Group Corp. reported on Friday a 3 trillion yen ($21 billion) profit for the July-September quarter, a sharp reversal from its loss a year ago.

After its 398 billion yen loss a year earlier, quarterly sales rose to 1.6 trillion yen ($11 billion) from 1.5 trillion yen, it said.

Tokyo-based SoftBank Group tends to have fluctuating and complex financial results because it invests in an array of companies, and their stock prices have shifted lately, depending on various global factors.

Among the factors boosting its bottom line were profits from prepaid contracts using Alibaba shares, reduction of interest-bearing debt and investment gains, SoftBank said. The settling of prepaid shares in e-commerce giant Alibaba alone brought in more than 4 trillion yen ($28 billion).

SoftBank invests in hundreds of companies, including mobile carrier SoftBank, web services provider Yahoo and vehicle-for-hire company Didi.

It also is involved in the Vision Fund that includes other global investors.

While its holdings in Alibaba worked as a plus for its bottom line, its Vision Fund investments hurt, according to SoftBank.

Vision Fund One recorded gains on some investments such as Uber Technologies but had losses on others including Door Dash. Vision Fund Two racked up losses because of the share price decline of WeWork, SoftBank said in a statement.

Uncertainties remain, including soaring material costs and higher interest rates in the U.S., said Chief Financial Officer Yoshimitsu Goto. The weakening yen against the U.S. dollar worked as a plus overall for SoftBank, at least on the books, he said.

He said an initial public offering of U.K.-based Arm is still in the works. SoftBank owns Arm, a leader in chip design.

“We remain on the defensive for now, taking a conservative view, although we plan to go on the offensive some day,” Goto said of the company’s investment plans.

___

Yuri Kageyama is on Twitter https://twitter.com/yurikageyama