The S&P 500 and Dow industrials closed at all-time highs on Tuesday, with modest gains driven by a rally in the health-care sector. The S&P 500 health-care sector rose 1.4% following better-than-expected earnings from insurance companies. The S&P 500 gained 1.71 points, or less than 0.1%, to 2,559.35. The Dow Jones Industrial Average gained 39.73 points, or 0.2%, to 22,996.69, failing to close above the psychologically important level at 23,000. The tech-heavy Nasdaq Composite index ended fractionally lower at 6,623.66. Shares of UnitedHealth Group Inc. jumped 5.6% after third-quarter earnings results.