Stocks rose and the Nasdaq Composite added to its record closing level from Monday, after a strong batch of earnings results helped allay fears over companies’ abilities to cope with fallout from the pandemic.