US trade deficit rises to nine-month high in October