Citigroup Inc. (C) - Get Report  shares rose as the bank said its fourth quarter earnings exceeded analysts' expectations, not counting a $18.3 billion loss it took to write down the value of tax credits saved up following its massive government bailout in 2008.

It was the New York-based company's biggest loss in a decade, triggered by U.S. lawmakers' passage in December of a cut in the U.S. corporate tax rate to 21% from 35%. The lower tax rate means that Citigroup will pay lower taxes going forward but also means a big chunk of the credits are likely to go unused.

The quarterly loss more than wiped out the New York-based bank's net income during the first nine months of the year, the bank said Tuesday in a statement. Excluding the charge, fourth-quarter earnings per share were $1.28, exceeding analysts' average estimate of $1.22 in a FactSet survey. The shares rose 75 cents, or 1%, to $77.52 in Tuesday morning trading about an hour after the market opened.

Citigroup's $45 billion taxpayer bailout in 2008 kept the bank afloat, allowing it to survive despite massive losses that would have sunk other companies. The losses resulted in the creation of "deferred tax assets," or DTAs, a type of credit that allows companies to apply past losses to current earnings to cancel out taxes.

Michael Corbat, who took over as CEO in late 2012, had touted the DTAs during his first year in office as a competitive advantage over peers, arguing that they gave the bank "the ability to, in essence, generate excess capital." The one-time charge to write down the DTAs and record the impact of other tax-related issues came to $22 billion.

"Citigroup is wrapping up its sins of the past decade and a half into one big charge of $20 billion," said Mike Mayo, a Wells Fargo analyst who had argued since the financial crisis that the company should write down the DTAs for the sake of conservative accounting. "But it's important for the bank not to forget why those DTAs were there in the first place."

Late last year, Citigroup went so far as to hire John Dugan, a former U.S. comptroller of the currency who worked behind the scenes to orchestrate the bailout, as a board member.   

The big charge wasn't a surprise to most investors, since Citigroup Chief Financial Officer John Gerspach had disclosed the likely amount during a conference call late last year. For the full 2017, the bank had a net loss of $6.2 billion. 

On a conference call Tuesday with reporters, Gerspach said that the tax cuts should provide a big boost to Citigroup this year and beyond. The bank expects an effective tax rate in 2018 of about 25%; prior to passage of the new law, executives were assuming a 32% rate. 

As a result, Citigroup's profitability is expected to surge -- helping the bank to meet targets it has failed repeatedly to hit. 

In March 2013, Corbat set a goal of getting the so-called return on tangible common equity -- a key profitability ratio  -- to at least 10% within two years. The company missed the target in 2015 and 2016 and fell short again in 2017, at 8.1%.

Thanks to the tax cuts, the ratio should jump by a full 2 percentage points in 2018, getting the figure up to around 10.5%, Gerspach said. Additional profits could come if the legislative stimulates economic growth, as promised by President Donald Trump. 

"We believe it will be a significant long-term positive for Citi," Gerspach said of the tax legislation. 

The tax-related costs in the fourth quarter coincided with a steep downturn in the bank's juggernaut bond-trading division, which like rival Wall Street firms was plagued throughout 2017 by a spell of unusually low price swings in financial markets. The low-volatility environment has kept investors on the sidelines and left few opportunities for traders at banks to score gains on daily market moves.

Revenue in the fixed-income division, which encompasses trading in government bonds as well as corporate debt securities and currencies, tumbled by 18% from a year earlier to $2.41 billion.

The fourth quarter's doldrums contrasted with those in late 2016, when President Donald Trump's surprise election victory sent investors scrambling to reshape their portfolios for the prospect of big tax cuts -- resulting in big trading profits for Wall Street firms.

Citigroup's drop in fixed-income revenue stemmed from "continued low volatility, as well as the comparison to a more robust trading environment in the prior year as a result of the U.S. elections." 

Last week, JPMorgan Chase & Co. (JPM) - Get Report , the biggest U.S. bank, said that fourth-quarter fixed-income revenue tumbled by 34% from a year earlier. Other big Wall Street firms, including Bank of America Corp. (BAC) - Get Report , Goldman Sachs Group Inc. (GS) - Get Report and Morgan Stanley (MS) - Get Report , are scheduled to post results for the period later this week.

Citigroup's results were further marred by an "episodic loss in derivatives" related to a single unidentified client. That loss, of $130 million, contributed to a 23% decline in the bank's stock-trading revenue.  

On the conference call with reporters, Gerspach said the bank had provided a "margin loan," in which a bank extends credit to an investor or trader to buy securities such as stocks, with the underlying assets pledged as collateral. Such loans can be very profitable because the financing is typically extended in an amount well below the value of the collateral, leaving a safety cushion that's supposed to protect the lender. 

"There were some derivatives associated with that," he said. "We needed to seize the margin. That caused a credit event." 

Gerspach said that the big loss was the first in that business in nine years and isn't a symptom of a broader breakdown in controls at the bank. 

"This is pretty much a very isolated incident due to a whole series of factors," Gerspach said. 

More of What's Trending on TheStreet: