Stocks inch higher into record territory