The investment bank posted quarterly earnings of $4.88 a share on revenue of $8.17 billion.