JPMorgan Chase ( JPM) is poised to follow Goldman Sachs ( GS) with its own better-than-expected second-quarter results early Thursday morning.

Investors are already aware of two significant hits JPMorgan will take in the second quarter. The company warned it will take a $1.1 billion, or 27-cents-a-share, charge for the repayment of $25 billion in government bailout funds, and analysts have estimated it will pay an assessment of $725 million, or roughly 12 cents a share, to the Federal Deposit Insurance Corp. Still, investors should be confident JPMorgan can reap benefits from the depths of the financial crisis.

Goldman was also able to profit significantly from the turbulent markets, posting a $3.44 billion, or $4.93 a share, profit on Tuesday. That is more than 6% higher than the highest analyst estimate polled by Thomson Reuters. The consensus analyst estimate was a profit of $3.54 a share.

JPMorgan Chase was the only one of the big four commercial banks that was able to pay back the $25 billion in TARP funds this quarter. Chairman and CEO Jamie Dimon has been adamant that the company never needed the funds and JPMorgan reportedly has been quarreling with the government regarding the repurchase price of warrants associated with the government's preferred stake.

As a result of the charges, consensus estimates for JPMorgan Chase fall at just 4 cents a share. Prior to the announcement of the charge for the TARP repayment, analysts expected the firm to make 37 cents a share.

Meanwhile, Bank of America ( BAC) is expected to record a profit of 28 cents a share. Wells Fargo ( WFC) is expected to make 32 cents a share in the quarter. Citigroup ( C) is expected to post a loss of 31 cents in the quarter.

But analysts also predict JPMorgan Chase will boost its revenue by 40% from the year-earlier quarter to $25.89 billion, according to Thomson Reuters.

JPMorgan Chase shares were rising 5.1% late Wednesday to $36.47.

The true benefits of JPMorgan Chase's two big acquisitions last year -- investment firm Bear Stearns and retail banking outlet Washington Mutual -- are starting to shine through to the bank's bottom line. Both companies were purchased at fire sale prices last year at the behest of regulators.

"The strong earnings performance of Goldman Sachs' capital market operations in the second quarter suggests that JPMorgan's second quarter results may also be above expectations," Rochdale Securities analyst Richard Bove writes in a note. "JPMorgan is believed to be at the top of most league tables in the fixed income categories and it is developing a stronger position in equities. It may be the largest trader of derivatives in the world."

Bove also cited JPMorgan as the No. 1 lender that could meet the needs of the corporate markets and governments. It also can take advantage of the strong commodity markets as it "may be the largest gold trader in the world," he writes.

As seen by Goldman's performance in the quarter, JPMorgan Chase should benefit from improved performance in its investment bank due to strong capital markets activity.

Howard Chen, an analyst at Credit Suisse, estimates JPMorgan will bring in $5.5 billion in trading-related revenue, due "predominantly by stronger core equity performance" compared to the first quarter, he writes in a recent note.

JPMorgan Chase was also one of the primary underwriters for the myriad of capital raises from the banks during the quarter, according to Bove. Credit Suisse's Chen expects investment banking fees to rise 20% to $1.7 billion.

On the retail side, JPMorgan Chase will benefit from a refinancing boom during the quarter that will boost mortgage banking results as well as previously strong reserve builds for trouble credit spots.

David Trone, an analyst at Fox-Pitt, Kelton Cochran Caronia Waller, estimates that the company's retail financial services arm will report a profit of $873 million, up 84% from the first quarter due to the strong mortgage banking and lower total credit costs.

Still, JPMorgan Chase is dealing with writedowns from its mortgage securities and leveraged loan exposure (albeit much lower than previous quarters) as well as continued losses primarily in home equity and credit cards. Although the company has already warned that it does not expect to post a profit in its cards division this year, June data released on Wednesday from the big banks and major credit card companies including American Express ( AXP), Capital One ( COF) and Discover Financial Services ( DFS), suggests that card delinquencies are starting to ever-so-slightly improve.

More from Stocks

What Will GM Do With Cruise -- and Is Its Stock Worth $55?

What Will GM Do With Cruise -- and Is Its Stock Worth $55?

3 Must Reads on the Market From TheStreet's Top Columnists

3 Must Reads on the Market From TheStreet's Top Columnists

This Should Be Your Retirement Savings Plan When the Stock Market Crashes

This Should Be Your Retirement Savings Plan When the Stock Market Crashes

3 Warren Buffett Stock Picks That Could Be Perfect for Your Retirement Portfolio

3 Warren Buffett Stock Picks That Could Be Perfect for Your Retirement Portfolio

Dow Finishes Lower as Nasdaq Posts New Record

Dow Finishes Lower as Nasdaq Posts New Record