Citigroup on Monday beat analysts' expectations for second-quarter profit and revenue on gains from the initial public offering of electronic bond trading platform Tradeweb.

The bank posted profit of $4.79 billion, or $1.95 per share, compared with the $1.80 estimate of analysts surveyed by Refinitiv. Excluding the impact of the IPO, the bank would have posted $1.83 per share in profit, fueled by lower taxes and a reduction in the number of outstanding shares.

Shares were almost unchanged at 10:28 a.m. in New York after climbing 1.1% in premarket trading.

While per-share profit surged 20% in the quarter, the company's revenue gain was more muted on declines in trading and investment banking revenue and losses on loan hedges. The bank said revenue climbed 2% to $18.76 billion, exceeding the $18.5 billion estimate, powered by a $350 million pretax gain on the Tradeweb IPO.

The results were a "slight beat," according to Mike Mayo, the veteran banks analyst working for Wells Fargo. He added in a research note that "while the results are unlikely to sway investors to immediately jump in to the stock, they nonetheless provide further validation that Citi continues to an upward glide path for improving returns further."

Citigroup was the first of the big U.S. banks to report second-quarter results, so investors were keen to see how its banking and trading operations performed during the period.

Last month, CFO Mark Mason said at a conference that trading revenue in the quarter would likely decline by a "mid-single-digit" percentage from a year ago.

That proved accurate, as trading revenue excluding the IPO windfall fell 5%, led by a 9% drop in equities trading revenue to $790 million. Fixed-income revenue rose 8% to $3.32 billion, but excluding the Tradeweb transaction, the bank would have posted a 4% decline in that division. Investment banking revenue dropped 10% to $1.28 billion.

"We navigated an uncertain environment successfully by executing our strategy, and by showing disciplined expense, credit and risk management," CEO Michael Corbat said in the earnings release.

Revenue in Citigroup's global consumer bank rose 3% to $8.5 billion as profit climbed 11% to $1.41 billion, compared to the $1.49 billion estimate of analysts surveyed by Factset.

The bank cut companywide expenses 2% to $10.5 billion, and its efficiency ratio improved to 56% from 58% a year ago. That beat the 57.3% estimate of analysts.

Shares of the New York-based bank climbed 38% this year, compared with a 16% gain of the KBW Bank Index.

Other banks should also benefit from the IPO of Tradeweb, whose investors included the biggest U.S. banks, such as Goldman Sachs and Bank of America. Tradeweb, founded in 1996, went public in April in what was then second-biggest IPO of the year.

Here's what Wall Street expected for Citigroup: