Using vast sums of borrowed money , Goldman Sachs , Morgan Stanley and other investment banks bought and sold mortgage-backed securities and other complex financial products , reaping astronomical profits that helped pay for outsized bonuses for executives .