The stock market turned mostly higher in late trading, leaving indexes with modest gains after a sluggish day. The Dow Jones industrial average climbed 27 points, or 0.2%, to 17,758 Tuesday. It was down as much as 72 points earlier. The Standard & Poor's 500 index gained three points, or 0.2%, to 2,081. The Nasdaq composite gave up 12 points, or 0.2%, to 5,083.
Technology shares were held back Tuesday by weakness in Apple. Apple dropped 3% after analysts at Credit Suisse said a slowdown in the company's orders for components suggested weak demand for the new iPhone 6s. Homebuilders were among the day's gainers after D.R. Horton reported earnings that were stronger than analysts were expecting. (Read more Dow Jones stories.)