Stocks and oil gain despite rising coronavirus cases