The Dow Jones industrial average closed more than 1 percent higher Tuesday for its best day since March 11, helped by weakness in the yen against the dollar and gains in oil prices. (Tweet This)
"It's a little bit hard to tell (why stocks are up). Whatever behind it is more subtle. People are being more comfortable it's not going to roll over and go into another corrective mode," said Bruce McCain, chief investment strategist at Key Private Bank.
"People are encouraged to some extent the yen is weakening a little bit," he said.
All three major averages closed about 1.25 percent higher in below average volume trade, with the Dow up about 222 points. Goldman Sachs and IBM contributed the most to gains, while Pfizer and Wal-Mart were the only decliners.
Energy, materials and industrials rose more than 1.7 percent to lead all S&P 500 sectors higher. Shares of Amazon.com, Microsoft and Alphabet helped gains in the Nasdaq composite, which posted its first three-day win streak since early April.
"I think you have a lot of crosscurrents going on. I'd say it's somewhat directionless right now," Dan Veru, chief investment officer at Palisade Capital Management, said of morning trade. He noted underperformance in the Russell 2000, which extended mild morning gains to close about 0.95 percent higher.
"A lot of it is oil. Oil's up," Veru said. "The dollar has been a little stronger recently. It's flat. The climb has stopped. That was putting pressure on commodities."
U.S. crude oil futures settled up $1.22, or 2.81 percent, at $44.66 a barrel. Brent closed up 4.3 percent at $45.52 a barrel.
Traders noted some support for prices from a flat U.S. dollar index and anticipation of weekly inventory data due from API after the close Tuesday and the EIA Wednesday morning ET. Short-term supply disruptions from in Canada and Nigeria also contributed to gains in oil prices.
Randy Frederick, managing director of trading and derivatives at Charles Schwab, attributed much of the early gains in equities to weakness in the yen following overnight comments from Japanese authorities.
"Not that they did anything, but they're talking about something," he said.
Japanese Finance Minister overnight the government will intervene in the currency market if "one-sided" yen rises last long enough to hurt the economy. The newswire said his remarks were the strongest threat of action since the yen began its rapid strengthening against the dollar — about a 10 percent rise in the last three months.
"There's a risk-on trade happening but also there's been people concerned (about) the Japanese economy and a weaker yen bodes well for Japanese economic activity," said David Schiegoleit, managing director of investments for the greater L.A. market at U.S Bank Private Client Reserve.
The U.S. dollar index was up 0.17 percent for its first six-day win streak since the one in April 2015. The yen weakened against the dollar to around 109.3 yen. The euro was near $1.137.
"If the psychology turns around on the dollar and it's not going to strengthen we could get a new upward leg that's led by oil and commodities," Veru said.
The Dow Jones industrial average and S&P 500 closed within 2.4 percent of their 52-week intraday highs hit last May. The Nasdaq composite was about 8.1 percent of its 52-week intraday high from last July.
"We've got a rebound, but we still have that ceiling at 2,100 (on the S&P 500)," said Marc Chaikin, CEO of Chaikin Analytics.
"I just think this is latent buying power and it comes into play after the market's been down for a few days," he said, noting "a lack of bad news."
Despite the big market moves, trading volume was below average, at roughly 6.6 billion shares. Trade volume for Monday came in at about 6.75 billion shares, according to FactSet data.
LendingClub led active and unusual volume actives for a second day in a row, trading nearly 10 times its 30-day average volume of 9.4 million shares. The stock closed more than 11 percent lower and is now down nearly 63 percent year-to-date.
In economic news, wholesale inventories were up 0.1 percent in March, in-line with expectations.
The Job Openings and Labor Turnover Summary (JOLTS) report showed a rise in job openings to 5.8 million in March, while the hiring rate edged down to 3.7 percent.
The National Federation of Independent Business' small business optimism index rose for the first time this year, up 1.0 point from a two-year low in March to 93.6 in April, Reuters said. The figure remained below the 100 reading in December 2014 and its 42-year average of 98.
Treasury yields traded higher, with the around 0.72 percent and the 10-year yield at 1.76 percent in afternoon trade.
The Treasury Department sold $24 billion in three-year notes at a high yield of 0.875 percent. The bid-to-cover ratio, an indicator of demand, was 2.93, the highest since January.
European stocks closed higher, with banks outperforming. The German 10-year bund yield hit a low of 0.108 percent, its lowest since April 11.
Asian stocks closed mostly higher, with the Nikkei 225 up more than 2 percent. The Shanghai composite closed a touch higher, while the Hang Seng closed 0.43 percent higher.
China's consumer price index rose 2.3 percent year-over-year for a third-straight month in April, helped primarily by a spike in food prices, Reuters said. Declines in the producer price index eased in April with a drop of 3.4 percent from a year earlier, a smaller decline than forecast and March's 4.3 percent decline.
In China, on Tuesday with an intraday decline of 7.6 percent, Reuters said. Iron ore lost as much as 6 percent intraday, the newswire said.
Hopes economic stabilization would boost raw material demand drew a rush of retail buyers into China's commodities futures in April and pushed up prices, but renewed worries about demand has reversed those gains.
The Dow Jones industrial average closed up 222.44 points, or 1.26 percent, at 17,928.35, with Goldman Sachs leading advancers and Pfizer and Wal-Mart the only decliners.
The Dow transports closed 1.2 percent higher with United Continental leading advancers.
The closed up 25.70 points, or 1.25 percent, at 2,084.39, with energy leading all 10 sectors higher.
The Nasdaq composite closed up 59.67 points, or 1.26 percent, at 4,809.88.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, fell below 14.
About three stocks advanced for every decliner on the New York Stock Exchange, with an exchange volume of 841 million and a composite volume of nearly 3.5 billion in the close.
Gold futures for June delivery settled down $1.80 at $1,264.80 an ounce.
—Reuters contributed to this report.
On tap this week:
Earnings: Allianz, Nissan, Toyota Motors, Macy's, Wendy's, CA, NetEase
1 p.m. $23 billion 10-year note auction
2 p.m. Federal budget
Earnings: Dr. Reddy's Labs, Kohl's, Ralph Lauren, Nordstrom, Nvidia, Symantec, Shake Shack
8:30 a.m. Initial claims; import prices
11 a.m. Cleveland Fed President Loretta Mester
11:45 a.m. Boston Fed President Eric Rosengren
1 p.m. $15 billion 30-year bond auction
2:15 p.m. Kansas City Fed President Esther George
Earnings: Honda Motor, Brookfield Asset Mgmt., JC Penney
8:30 a.m. Retail sales
8:30 a.m. PPI
10 a.m. Consumer sentiment
10 a.m. Business inventories
6:25 p.m. San Francisco Fed's Williams
*Planner subject to change.
More From CNBC.com:
CORRECTION: Trading volume was below average Monday and Tuesday of this week, with Monday coming in at about 6.75 billion shares and Tuesday registering at roughly 6.6 billion shares. FactSet provided incorrect figures for an earlier version of this article.