US stocks ended mixed with tech shares running higher while investors pulled down energy names as global recession worries flared up after the Independence Day break.

All three of Wall Street's major indexes were in the red during the session, but after gains among large-cap advancers including Meta Platforms and Alphabet, the index swung up and stayed there for the rest of the day.

Eight of the S&P 500's 11 sectors lost ground. The energy sector fell more than 5% as oil prices fell on the back of the US dollar. The major oil companies fell.

The US index was at 4:00 p.m.

The US Dollar index hit a new 20-year high on the back of a slide in the euro as a regional energy crisis threatens to pull the eurozone economy into a recession US factory orders rose by a better-than- expected 1.6% in the first half of the year.

The 2-year yield and the 10-year yield were both in an inverted position in the US bond market. During the session, the 10-year yield fell.

The Federal Reserve wants to use interest rates as a brake on the overheated job market. Carl Ludwigson, managing director at Bel Air Investment Advisors, said in a note that the bond market may have already priced in the Fed's actions.

"Especially for the more expensive corners of the equity market, the challenge has been multiple compression that may continue with rapid rate hikes and quantitative tightening," he wrote. Much of the monetary policy tightening appears to be priced in the bond market with the 2-year Treasury rate already incorporating expected Fed hikes.

The S&P 500 won't hit a bottom until there is a panic in the stock market, according to a markets newsletter.

El-Erian said there are three positives to the stock market downturn.

The price of oil fell. The price of West Texas Intermediate crude went down. The international benchmark was down 9%.

The price of gold fell to a new low. The yield on the 10-year bond went down.

The price of the digital currency went up 2.8% to $20,069.06.