Apple shares hit a record as tech stocks lead the market