Global stocks gain on trade, Brexit optimism, US$ slides