Stocks close at record highs on strength in tech and health