Stocks were divided Tuesday, as health insurers declined after the failure of the latest Republican health care bill while a big jump in subscribers for Netflix sent technology and consumer-focused companies higher.

Stocks spent most of the day lower after the health care push stalled and several financial firms, including Goldman Sachs, reported underwhelming second-quarter results. Energy and industrial companies also slipped.

advertisement | advertise on newsday

While stocks flirted with larger losses and most of the companies listed on the New York Stock Exchange fell, the gains for tech and consumer stocks were enough to send the Standard & Poor’s 500 index and Nasdaq composite to new highs.

Wall Street did not have a big reaction to the Republican health care defeat, as it did when a related bill failed in March. Investors don’t expect as much from Washington on other issues.

“Tax changes aren’t likely to take place any time soon and are likely to be smaller than they hoped,” said Kate Warne, an investment strategist for Edward Jones.

The S&P 500 rose 1.47 points, or 0.1 percent, to 2,460.61, just above the record it set Friday. The Dow Jones industrial average fell 54.99 points, or 0.3 percent, to 21,574.73.

The Nasdaq composite climbed 29.87 points, or 0.5 percent, to 6,344.31.