NEW YORK ( TheStreet) -- U.S. banks managed to grow both earnings and revenues in the second quarter, though with several qualifications, according to a research note published late Thursday by analysts at Keefe, Bruyette & Woods. Perhaps the largest asterisk of all is that the sample includes just 36 banks, and it does not include "universal" banks JPMorgan Chase ( JPM), Citigroup ( C) or Bank of America ( BAC). These banks, which dwarf all the others (with the possible exception of Wells Fargo ( WFC)) generally saw revenues and earnings decline versus both the previous and year-ago quarters. Trust banks, such as Bank of New York Mellon ( BK), State Street Corp. ( STT) and Northern Trust Corp. ( NTRS) were also excluded. Included in the group were Wells, US Bancorp ( USB), PNC Financial ( PNC) as well as a sample of other large and mid-sized institutions. The group grew operating earnings by 24% versus a year ago and 6% versus the first quarter, though those numbers were boosted by reserve releases, KBW said. Operating revenues, meanwhile, grew by just 2% versus a year ago and 1% versus the first quarter. Twenty-six banks, or 72% beat consensus analyst expectations, though shrinking net interest margins (NIM) have been "an issue due to aggressive loan pricing,securities repricing, & less funding cost relief." KBW's analysts see asset quality continuing to improve, along with the strength of bank balance sheets. Deposits and loans both increased by 3% versus the second quarter of 2011 and 1% compared to the previous quarter, according to KBW's report. They were also disappointed with expense results, which were flat versus the previous quarter. The 36 banks were up 22.4% year to date prior to their second quarter earnings releases and gained an additional 0.3% on the date they released earnings. Bank stocks as a group have outperformed the broader stock market year to date, with SPDR KBW Regional Banking ( KRE) and SPDR KBW Bank ( KBE) up 10.93% and 8.51% respectively, versus a gain of 5.20% for the Dow Jones Industrial Average. -- Written by Dan Freed in New York. Follow this writer on Twitter.