Stock market today: Indexes end lower as investors brace for major earnings results