Financial stocks and related exchange traded funds have lagged behind the broader markets, but with profits surging to near-record levels, the sector could be turning around.

Year-to-date, the Financial Select Sector SPDR (NYSEArca: XLF), the largest U.S. financial sector ETF, has gained 3.2%, while the Vanguard Financials ETF (NYSEArca: VFH) is up 3.2 and iShares U.S. Financials ETF (NYSEArca: IYF) rose 2.7%. Meanwhile, the S&P 500 index is 5.8% higher. [BofA Breathes Some Life Into Bank ETFs]

The banking industry is looking rosier after delivering its second-highest profit in at least 23 years for the three months ended June 30, despite wading through billions in legal charges, low interest rates  and a drop in trading and mortgage banking revenue, the Wall Street Journal reports. [Post-Crisis Regulations Weigh on Financial ETFs]

“The second quarter was an inflection point in the profitability story for banks,” SunTrust analyst Eric Wasserstrom said in the article. “The bad is starting to bottom out, the good is starting to gain momentum.”

Bolstering bank industry returns, borrower’s steadily improving credit quality of provided a steady stream of returns. Banks have set aside lower provisions for loans and leases that could turn bad. Consequently, provision expenses dipped $6.59 billion over the second quarter from $7.61 billion in the first quarter and $8.53 billion in the second quarter of 2013.

Additionally, loan growth rose to its fastest quarterly clip since the end of the financial crisis. According to the Federal Reserve, the average loans and leases expanded 7.7% over the second quarter from the first three months, compared to 1.7% for the same period year-over-year.