The settlement caps a lengthy and arduous negotiations process between the firm and the Securities and Exchange Commission and the New York Stock Exchange and makes Bear the last major Wall Street firm to pay fines in connection with improper fund trading practices first uncovered by Eliot Spitzer , the New York attorney general , in 2003 .