Stocks end 3-day drop as IT, metal shares rise