A wave of buying in the last hour of trading left stocks mostly higher on Wall Street, enough for the S&P 500 to beat the record high close it set in early September.
The market had spent most of the day wobbling between gains and losses Thursday.
Technology companies did well, despite a steep drop in IBM after the company reported disappointing revenue.
IBM's drop left the Dow Jones Industrial Average just barely in the red for the day.
The S&P 500 rose 0.3% and the Nasdaq added 0.6%.
Tesla rose 3.3% after reporting record profits despite parts shortages and shipping delays.