Bank of America Corp. (NYSE:BAC), the second-largest U.S. bank by assets, should see upbeat earnings on Wednesday as progress on cost-cutting and capital ratios offset continuing legal uncertainty.

Analysts polled by Thomson Reuters expect earnings of 26 cents per share, on slightly lower quarterly revenues of $21 billion and better profits of $3 billion. That’s way up from EPS of three cents a year ago. The bank reports on Wednesday, before markets open.

The bank has made “significant progress” on slimming costs, despite a challenging revenue backdrop, wrote Nomura analysts in a Jan. 8 note, as they opened coverage with a “Buy” rating on the stock.

BAC also has the most to gain among its major banking peers like JPMorgan Chase & Co. (NYSE:JPM) and Citigroup, Inc. (NYSE:C), from interest rate changes, the analysts said. Bank of America could gain 15 percent in EPS if rates shift up by 1 percent, while others banks could gain 5 to 8 percent.

The financial services firm has enjoyed serious cost savings from its 2011 Project New BAC cost-cutting scheme, designed to save $8 billion by 2015, partly by shedding thousands of jobs. Modest growth in its loan business, alongside lower credit costs, is likely to boost earnings from this past quarter through to 2016, said Nomura.

Societe Generale analysts add that Bank of America is likely to do well by regulatory capital cushion tests, writing that BAC’s capital ratios are “trending in the right direction.” U.S. and European regulators will renew tests in 2014 to ensure that big banks have enough capital to withstand dismal economic situations, in rules imposed after the financial crisis.

Looming behind positive notes, though, is a pending $8.5 billion legal settlement over mortgage mis-selling with the Federal Housing Finance Agency, yet to be approved by courts. The settlement is among the largest by banks over claims stemming from the financial crisis, though it’s smaller than the record $13 billion JPMorgan paid to the Justice Department over similar claims in 2013.

“Litigation risk remains elevated, and if BAC’s pending $8.5bn settlement is not green-lighted by the courts, our loss estimates for private-label litigation could increase meaningfully,” wrote Nomura analysts.

Bank of America received $45 billion in federal bailout funds through the Troubled Asset Relief Program, which it eventually repaid. The Charlotte, N.C.,-based company paid $3.8 billion in litigation expenses for the nine months ended Sept. 30, 2013, it said in its most recent earnings, up $500 million from a year ago. Morningstar Inc. (NASDAQ:MORN) estimates that BAC and its later-acquired units originated more than $2 trillion in mortgages from 2004 to 2008, a sizable shadow that has continually haunted the massive diversified bank.

More broadly, the bank may struggle from integrating all of its diverse businesses. The company is active in consumer and commercial lending, proprietary trading, investment banking and wealth management, among other markets. Its investment banking fees could fall due to weakness in debt capital markets, which could slow in 2014, though BAC’s net interest income should rise from 2012 lows.

Bank of America Revenue By Business Unit, 2010-2016, Nomura Research Bank of America Revenue By Business Unit, 2010-2016, Nomura Research, Jan 8 2014 Photo: Nomura Research, Jan 8 2014

“The struggles associated with integrating all of these businesses are not yet complete,” wrote Morningstar analyst Jim Sinegal in a Dec. 30 note. Management hasn’t yet proved that it can grow promising businesses and follow through on earlier strategies, he said.

Bank of America has sold $70 billion of non-core assets since 2010, however, according to a presentation by CEO Brian Moynihan at a Goldman Sachs Group Inc. (NYSE:GS) banking conference on Dec. 10.

Overall, major banks are expected to have grown deposits to record levels in the fourth quarter, even as numerous one-time charges and gains distract investors, according to Barclays PLC (LON:BARC). Money from trading, mortgages and securities is likely to be lower, while asset management and investing banking fees are likely to gain.

Professional money managers have piled into the U.S. financial sector in late 2013 and early 2014, after the sector made major contributions to repeated stock market records in 2013. BAC was among the 20 stocks in the S&P500 with the highest returns in 2013.

The company agreed to pay big government-backed lender Freddie Mac $404 million to resolve outstanding mortgage claims related to loans made to Freddie Mac from 2000 to 2009, it said in December.

Bank of America inked a deal with Earthport (AIM:EP), an international remittances provider, in the fourth quarter and developed a quirky new “green bond” designed to promote renewable energy and energy efficiency.

The $178 billion market-cap Bank of America is deemed a systemically important financial institution and will attract regular scrutiny from U.S. regulators. Securities regulators approved the Volcker Rule in the fourth quarter, which limits proprietary trading by banks, though this is expected to hurt BAC slightly less than rivals like Goldman Sachs.

Analysts are mixed on the stock, according to Thomson Reuters data. Seventeen of 33 analysts recommend that investors “Hold” the stock, while the company is rated “Buy” or better by 12 analysts. It’s rated “Sell” or worse by four experts.

Bank of America operates in more than 40 countries, with 51 million customers and about 5,200 retail branches.