Goldman Sachs says it has sold $ 5 billion in stocks to help repay emergency funds it received from the U.S. government .