Piper Jaffray Cos. posted a $20.3 million profit in the third quarter with year-over-year revenue up 39 percent, the company announced Wednesday.

The Minneapolis-based investment banker and asset manager had a year ago posted a third quarter loss of $3.4 million, but has embarked on cost-cutting in 2012.

The firm said in April it would trim its workforce by 2 to 3 percent and also review its office-space needs. In August, the company said it would shut down its Hong Kong capital markets business.

"In the third quarter, our continuing operations performed well and we are pleased with our results," said Andrew S. Duff, chairman and chief executive officer, in a statement. "Our performance reflects robust fixed income institutional brokerage revenues--particularly strategic trading, our decision to exit the Hong Kong capital markets business, additional cost reductions taking effect, and solid market share in public finance and public equity offerings."

Compensation and benefits expenses for the company were $78.7 million, up 30 percent compared to the third quarter of 2011, due to improved financial results.

The firm's capital markets business drove revenue growth on the quarter, churning out $115.2 million in sales thanks to growth in fixed income financing and fixed income institutional brokerage revenue. Trading in mortgage-backed securities was a big driver.

Net revenue for the firm in the third quarter was $133 million. Stock in the company was trading at $26.53 per share at market close Tuesday.