Alphabet and Apple muscled the S&P 500 to a daily gain on Wednesday despite a down day for most of the market.

The S&P 500 rose 0.5%. The Nasdaq Composite gained 1%. The Dow Jones Industrial Average fell 25 points, or 0.1%.

Investors in Alphabet and Apple were upbeat about remedies in Google’s antitrust case that did not go as far as feared. The search giant will be able to keep its Chrome browser business, and pay Apple to make Google the default search engine on iPhones and other devices.

That sent Alphabet shares soaring to their highest levels on record, while Apple stock marked a decent rally of its own.

The majority of stocks in the S&P 500 actually closed lower, much like the Dow. The Dow doesn’t include Alphabet. Though it does include Apple, the index weighs it by stock price rather than market cap, so Apple’s pull is topped by the likes of Salesforce, Travelers, and Sherwin-Williams, to name a few.

The yield on the 2-year Treasury note dropped to 3.61%, while the 10-year yield was down to 4.21%. The bond market’s slide abated after the latest update on job openings was below expectations. Investors were antsy ahead of Friday’s employment report.

The Federal Reserve also released its beige book report, though the market didn’t react much.

“Companies are having more difficulty than they had thought when it comes to passing on the tariff-induced cost increases,” writes David Rosenberg, of Rosenberg Research. “The stock market is either unaware or simply doesn’t bother to care, but the fallout will be on profit margins. Either that, or businesses are being compelled to embark on cost-cutting strategies or offer up incentives/promotional activity—and this is where tariffs actually become disinflationary!”