The S&P 500, the Dow, and the Nasdaq Composite traded at new highs for the second day in a row on rate optimism. Tech and energy stocks led the gainers. The Justice Department and 17 states alleged in a suit that Apple Inc. hampered mobile game developers from offering better products on the iPhone.