NEW YORK — Wall Street’s biggest banks are set to complete their best two years in investment banking and trading, buoyed by 2010 results likely to be the second-highest ever.

The five largest US firms by investment-banking and trading revenue — Goldman Sachs Group, JPMorgan Chase & Co., Bank of America Corp., Citigroup Inc., and Morgan Stanley — are apt to have a better fourth quarter than the previous two periods, according to data compiled by Bloomberg. Even if this quarter only matches the third, the banks’ revenue will top that of any year except 2009.

The five banks took a combined $135 billion from the Troubled Asset Relief Program and borrowed billions more from the Federal Reserve in 2008 and 2009. Since then, they have benefited from low interest rates and the Fed’s purchases of fixed-income securities.

The banks may begin to return more of their profits to shareholders. The Fed issued guidelines last month on how it will decide whether large banks may increase dividends and buy back shares.

The banks don’t all report profit from investment banking and trading, so the only way to compare those businesses is to look at revenue.

© Copyright 2010 Globe Newspaper Company.