On Thursday, US stocks extended recent gains, with the Nasdaq rising for a second day due to data showing that the annual increase in US producer inflation was the smallest in nearly three years, which provided evidence that inflation pressures were subsiding.