A Wall Street sign is pictured outside the New York Stock Exchange in New York, October 28, 2013.
A Wall Street sign is pictured outside the New York Stock Exchange in New York, October 28, 2013. Reuters / Carlo Allegri

U.S. stocks ended higher on Wednesday with the tech-heavy Nasdaq booking a 1.6 % gain on positive earnings signals with a wary eye on inflation and more interest rate hikes by the Fed.

Netflix Inc's shares added 7.4% after the company predicted it would return to customer growth during the third quarter, while posting a smaller-than-expected 1 million drop in subscribers in the second quarter.

Other high-growth stocks extended gains following the forecast from the streaming service provider. Shares of Apple Inc, Amazon.com Inc, Microsoft Corp and Meta Platforms Inc rose between 1% and 4.2%.

Electric vehicle maker Tesla Inc rose 2% in extended trading after reporting a rise in quarterly profit after the bell.

"Equity prices are trending in a roller coaster fashion, currently being at the mercy of inflation, interest rates and earnings," said Terry Sandven, chief equity strategist at U.S. Bank Wealth Management.

"We're going to need another series of reporting cycles to confirm whether or not inflation indeed is getting under control."

Analysts expect aggregate year-on-year S&P 500 profit to grow 5.9% in this reporting season, down from the 6.8% estimate at the start of the quarter, according to Refinitiv data.

Runaway inflation initially led markets to price in a full 100-basis-point hike in interest rates at the Fed's upcoming meeting next week, until some policymakers signaled a 75-basis-point increase.

The Dow Jones Industrial Average rose 47.79 points, or 0.15%, to 31,874.84, the S&P 500 gained 23.21 points, or 0.59%, to 3,959.9 and the Nasdaq Composite added 184.50 points, or 1.58%, to 11,897.65.

Seven of the 11 major sectors of the S&P 500 gained ground, with consumer discretionary and information technology posting the biggest gains.

Trading remained volatile in thin volumes, with the CBOE Volatility index closed at 23.79 points to its lowest in nearly three months.

Volume on U.S. exchanges was 11.51 billion shares, compared with the 11.43 billion average for the full session over the last 20 trading days.

"Low volumes accentuate market moves historically and even though we've wiped off $10 or $15 trillion from global equities this year, there's still a lot of excess liquidity. So low volume on excess liquidity can still accentuate moves," John Lynch, chief investment officer for Comerica Wealth Management, said.

Baker Hughes Co tumbled 8.3% as the largest S&P percentage loser, as the oilfield services provider reported a bigger second-quarter loss, while its adjusted profit also missed estimates.

Advancing issues outnumbered declining ones on the NYSE by a 1.94-to-1 ratio; on Nasdaq, a 2.28-to-1 ratio favored advancers.

The S&P 500 posted one new 52-week high and 29 new lows; the Nasdaq Composite recorded 29 new highs and 38 new lows.