U.S. stocks are mixed Wednesday as energy companies sink along with the price of oil, but technology companies and banks rise. The S&P 500 has reached six-month highs this week and is on track for its fifth gain in a row.

Wall Street is mainly focused on company earnings even after the U.S. said it will put new tariffs on $16 billion in imports from China.

KEEPING SCORE: The S&P 500 index dipped 0.75 points to 2,857.70. The Dow Jones Industrial Average fell 45.16 points, or 0.2 percent, to 25,583.75. The Nasdaq composite rose 4.66 points, or 0.1 percent, to 7,888.33. The Russell 2000 index of smaller stocks lost 1.42 points, or 0.1 percent, to 1,686.88.

NEW TARIFFS: The Trump administration says it will put a 25 percent tax on $16 billion of Chinese imports on Aug. 23, and China said it will put 25 percent punitive duties on $16 billion of U.S. goods, including cars, crude oil and scrap metal.

Both countries put taxes on $34 billion in imports earlier this month, and they have threatened much larger tariffs to come.

THE QUOTE: Karyn Cavanaugh, senior markets strategist at Voya Investment Management, said U.S. companies are expecting bigger profits in spite of the tariffs.

“That speaks to me a lot louder than a lot of negative headlines,” she said. “Companies have gotten very good at minimizing their costs and being very efficient with what they have.”

In April, construction equipment company Caterpillar said it doubted it would top its first-quarter profit for the rest of this year. Investors were concerned that that might hold true for the rest of corporate America, but so far it hasn’t.

A month ago analysts expected the companies of the S&P 500 to earn $160.32 per share in 2018. That’s risen by almost a dollar, to $161.29 a share. Their estimates for 2019 have risen by a bit more than a dollar, to $177.52 a share from $176.38.

SOCIAL MEDIA: Match Group, the parent of online dating companies including Match.com and OKCupid, jumped 17.5 percent to $45.67 after its adjusted profit and revenue beat expectations. Match also reported big gains in subscribers, especially for Tinder.

Snap, which runs the Snapchat video app, fell 5.1 percent to $12.45 after it said daily users fell during the second quarter. It’s the latest technology company to have its stock drop after announcing discouraging user totals, joining Facebook, Twitter and Netflix.

STOMACH ACHE: Twinkie maker Hostess Brands plunged 16.3 percent to $11.67 after it said its results were hurt by cuts in promotional support and inventory from a major retailer and higher costs, including for transportation.

Pizza maker Papa John’s fell 5.1 percent to $38.96 after it said North American sales fell again and cut its forecasts for the year. The company is in a public spat it with founder John Schnatter, who was ousted as chairman in July after a report he used a racial slur in a conference call.

Domino’s, a rival pizza delivery company, climbed 3.2 percent to $286.34.

ENERGY: Oil futures fell sharply. U.S. crude oil lost 3.2 percent to $66.94 a barrel in New York. Brent crude, the standard for international oil prices, fell 3.5 percent to $72.01 a barrel in London.

Exxon Mobil lost 0.8 percent to $80.63 and Chevron dipped 1.2 percent to 123.69.

Wholesale gasoline fell 4 percent to $2.02 gallon. Heating oil lost 2.5 percent to $2.12 a gallon. Natural gas rose 1.8 percent to $2.95 per 1,000 cubic feet.

OFF ROADING: Cars.com and Avis Budget Group both sank after they cut their sales forecasts. Rental car company Avis skidded 13.9 percent to $33.34 while Cars.com, an online auto marketplace, dipped 3.3 percent to $27.10.

Struggling rival Hertz jumped 24 percent Tuesday after a better-than-expected quarterly report. Hertz fell 5.3 percent to $18.49 Wednesday.

HEALTH CARE: Drugstore and pharmacy benefits manager CVS raised its annual profit forecast and rose 4.6 percent to $68.45. CVS said prescriptions sales grew, although it took a loss after it wrote down the value of its Omnicare pharmacy services business by almost $4 billion.

MOUSE HOUSE: Walt Disney stock fell 1.9 percent to $114.33 after the entertainment company’s profit and revenue fell short of analyst estimates.

CURRENCIES: The dollar fell to 110.97 yen from 111.43. The euro inched up to $1.1617 from $1.1594.

BONDS: Bond prices turned higher. The yield on the 10-year Treasury note fell to 2.96 percent from 2.97 percent.

METALS: Gold rose 0.2 percent to $1,221 an ounce. Silver gained 0.4 percent to $15.43 an ounce. Copper remained at $2.75 a pound.

OVERSEAS: The German DAX fell 0.1 percent and France’s CAC 40 lost 0.4 percent. In Britain, the FTSE 100 index rose 0.8 percent.

Japan’s Nikkei 225 index gave up early gains and closed 0.1 percent lower. Hong Kong’s Hang Seng index added 0.4 percent while South Korea’s Kospi edged 0.1 percent higher.

© The Associated Press. All rights reserved