A US hedge fund lost millions of dollars over a two-month period after hackers installed software to steal trade secrets, it has been revealed.