Ellie Mae Inc. shares soared 19% in premarket trade Tuesday after the company said it has agreed to be acquired by private-equity firm Thoma Bravo in a deal with an equity value of about $3.7 billion.