Gains were primarily driven by stock-specific action following quarterly earnings announcements, with investors reacting positively to corporate results across sectors.