Wall Street closed slightly higher on Tuesday after four sessions of declines, but investors fretted about weak holiday shopping and rising bond yields added pressure after the Bank of Japan's (BoJ) surprise tweak of monetary policy.

Fears about the Federal Reserve's plan to keep raising U.S. interest rates have weighed heavily on equities since its policy meeting last week.

Adding pressure was an increase in U.S. Treasury yields after the BOJ made a surprise tweak to its bond yield control that allows long-term interest rates to rise more.

"The Bank of Japan's news moved the bond market and continues to have an impact," said Chris Zaccarelli, Chief Investment Officer, Independent Advisor Alliance, Charlotte, NC.

Investors were also worrying about the current quarter earnings season and winter holiday shopping.

"We came into it with some pretty reasonable expectations but retailers are having to do massive sales," said Carol Schleif, Deputy Chief Investment Officer, BMO family office in Minneapolis, Minnesota noting that consumers this year are veering toward "services and events - vacation tickets and restaurant gift certificates and things like that - as opposed to another sweater or another bag."

Schleif noted that investors are wary after a volatile year in equities with the S&P on track for its biggest annual decline since the 2008 financial crisis.

"People have gotten their heads handed to them all year and they're not confident enough to want to step in," she said.

"That's what leads to this push me pull you kind of market where it's up a little down a little and it's really hard for any segment of the investing public to want to get to want to spin a narrative they would put a whole bunch of money behind."

The Dow Jones Industrial Average rose 92.2 points, or 0.28%, to 32,849.74, the S&P 500 gained 3.96 points, or 0.10%, to 3,821.62 and the Nasdaq Composite added 1.08 points, or 0.01%, to 10,547.11.

Among the S&P 500's 11 major sectors, the energy index gained most, finishing up 1.52% as crude oil prices rose.

Of the four sectors that declined, consumer discretionary was the weakest, finishing down 1.13%.

The Dow Jones Transport average closed down 1.3% after underperforming the broader market throughout the session following JPMorgan's bearish research on transport companies.

FedEx Corp closed down 2.6% ahead of its quarterly report. But shares in the delivery company, which spooked the entire market in September by pulling its financial forecast, were last up more than 3% in volatile after the bell trading following its fiscal second-quarter report and 2023 guidance.

In fixed income, U.S. Treasury prices fell after the BOJ's shock move, with the benchmark 10-year Treasury yield rising to a three-week high of 3.71%.

Also on Tuesday, data showed U.S. single-family homebuilding tumbled to a 2-1/2 year low in November and permits for future construction plunged as higher mortgage rates continued to depress housing market activity.

General Mills Inc shares sank 4.6% after quarterly sales at its high-margin pet business took a hit due to key retailers cutting back on inventory, overshadowing an increase in its full-year earnings and sales forecast.

Tesla Inc shares tumbled 8% after at least three brokerages cut the electric vehicle maker's target price on growing concerns of demand weakness and risk from Chief Executive Elon Musk's struggles at Twitter.

Wells Fargo & Co slid 2% after U.S. regulators fined the lender $3.7 billion, citing widespread mismanagement of auto loans, mortgages and deposit accounts.

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

The S&P 500 posted 1 new 52-week highs and 14 new lows; the Nasdaq Composite recorded 64 new highs and 399 new lows.

On U.S. exchanges 10.52 billion shares changed hands, compared with the 11.15 billion average for the last 20 trading days. (Reporting by Shubham Batra, Johann M Cherian and Sruthi Shankar in Bengaluru; Editing by Maju Samuel, Anil D'Silva and David Gregorio)