Despite setbacks stemming from trading losses and difficult economic conditions, two of Wall Street’s largest banks on Wednesday set a positive tone to the finance sector’s fourth-quarter earnings announcements.

Goldman Sachs (GS) saw fourth-quarter 2012 profits nearly triple, to $2.89 billion from $1.01 a year ago, while JPMorgan Chase & Co. (JPM) reported a 53% rise in profits, to $5.69 billion from $3.73 billion a year ago. Both banks beat analysts’ expectations by a mile, with GS reporting quarterly earnings per share of $5.60 versus EPS estimates of $3.78 and JPM reporting EPS of $1.39 versus analyst estimates of $1.22.

In midafternoon trading, GS stock was up $5.65, or 4.17%, to $141.24 per share compared with Tuesday’s closing price of $135.59. JPM stock was up $0.22, or 0.46%, to $46.58 from Tuesday’s close of $46.35.

“While economic conditions remained challenging for much of last year,” said Goldman Sachs Chairman and CEO Lloyd Blankfein in a statement, “the strengths of our business model and client franchise, coupled with our focus on disciplined management, delivered solid performance for our shareholders.”

The value of Goldman’s own investments contributed to the firm’s first year of revenue growth since 2009, with net revenues totaling $34.16 billion for the year and $9.24 billion for the quarter, according to Goldman’s Q4 2012 release. But stock analyst Richard Staite of Atlantic Equities LLP told Bloomberg that he questioned the sustainability of Goldman’s investing and lending division, which makes investments with the firm’s money. Further, Staite said the firm’s compensation ratio was unsustainable, amounting to 38% of revenue compared with 42% a year ago.

“This is abnormally low,” Staite said. “I’d be very surprised if they can sustain this into 2013.”

JPMorgan enjoyed its third straight year of record profits thanks to lower set-asides for mortgage losses and higher mortgage loan demand, the bank said in its Q4 2012 release. Revenue for the quarter was $24.4 billion, up 10% compared with a year ago, while return on tangible common equity for the quarter was 15% compared with 11% in the prior year.

JPMorgan Chase & Co. CEO Jamie Dimon (Photo: AP)However, CEO Jamie Dimon (left) took a 50% hit to his pay, down to $11.5 million from $23.1 million last year, according to a bank filing made Wednesday. The pay cut was due to the “London Whale” trading fiasco that cost the global bank billions in losses, and for which Dimon bore “ultimate responsibility,” the bank’s board said.

Nevertheless, in the earnings announcement Dimon took an upbeat tone on the bank’s underlying performance.

“We continued to see favorable credit conditions across our wholesale loan portfolios and strong credit performance in our credit card portfolio, where charge-off rates remain at historic lows,” Dimon said in a statement. “The real estate portfolios, while at elevated levels of losses, continued to show improvement as the housing market and economy continued to recover. As a result, we reduced the related allowance for credit losses by $700 million in the fourth quarter.”

The set-aside for future losses is significantly lower than the average, which analysts estimate at about $1.5 billion.

In a hectic news day for Wall Street banks, The Associated Press also reported on Wednesday that Goldman Sachs and Morgan Stanley will pay a combined $557 million to settle federal complaints that they wrongfully foreclosed on homeowners who should have been allowed to stay in their homes.

See AdvisorOne’s Q4 2012 earnings calendar for the financial sector.