Stocks rose for a third day on Thursday, capping off a holiday-shortened week of solid gains.