The U.S. Court of Appeals for the Second Circuit on Monday reversed a lower court order requiring a hedge fund to return nearly $5 million it obtained through alleged “short-swing” trades of 1-800-Flowers.com stock.

A panel of the federal appeals court ruled that a Brooklyn federal magistrate judge applied too broad an interpretation of a provision of federal securities law, which requires company insiders to disgorge profits from the purchase and sale of company stock that occur within a six-month period.