U.S. equities closed near the flatline Tuesday after a choppy trading session, as U.S. oil prices seesawed and investors looked ahead to Fed Chair Janet Yellen's testimony.
"I think we're seeing buying on the dips; people looking long-term are seeing more value, but at the same time people are a bit cautious ahead of the Fed," said Kate Warne, investment strategist at Edward Jones.
The Dow Jones industrial average fell nearly 150 points shortly after the open, but briefly turned positive. The blue chips index briefly rose 100 points in late-afternoon trading, but closed about 12 points lower.
Dow Jones industrial average intradaySource: FactSet
"I think we've had several days of significant selling," said Adrian Day, chairman and CEO of Adrian Day Asset Management. "You've got a situation where prices in certain sectors have gotten very overdone."
Read MoreNo time to buy stocks with both fists: Strategist
The S&P 500 dropped nearly 1 percent at the open, before briefly turning positive. The index held lower for most of the afternoon, but briefly tried for gains ahead of the close.
"If we can hold that 1,850 level [on the S&P], that would be a victory for bulls," said JJ Kinahan, chief strategist at TD Ameritrade.
The Nasdaq composite seesawed, opening down more than 1 percent, before reversing losses and gaining about 1 percent. In afternoon trading, however, the index fell more than 1 percent before trying for gains.
On Tuesday, investors looked ahead to Yellen's testimony in Congress, due Wednesday and Thursday
Read MoreWho's to blame for the market turmoil?
"There's a real likelihood that she comes out and acknowledges the weakness in the economy here and overseas," said Robert Pavlik, chief market strategist at Boston Private Wealth. "I think that will be taken by the market as a positive."
"There could be some growing optimism ahead of Janet Yellen's testimony. She has in the past had the ability to push markets higher, although that's diminished in recent years," said Randy Frederick, managing director of trading and derivatives at Charles Schwab.
Randy Warren, chief investment officer at Warren Financial Service, said "there is a good chance that Yellen says 'we're not remotely close to our 2 percent inflation target." "People don't want to get caught short."
Investors also kept an eye on oil prices Tuesday. WTI futures plunged 5.89 percent, or $1.75, to trade at $27.94 a barrel in choppy trading. Earlier, the International Energy Agency said that demand for oil will "ease back considerably" in 2016.
Read MoreGartman: Why the Fed needs to shut up
"It's the oil tail wagging the market dog," said Art Hogan, chief market strategist at Wunderlich Securities.
"I think oil is just a symptom of what the market is really wrestling with, which is too much of everything," said Maris Ogg, president at Tower Bridge Advisors. "But we're starting to see industrials [and other sectors] bumping along and not making new lows."