It’s been a wild ride for stocks and oil prices this year, but unless something big and ugly is in store for equities Thursday, U.S. stocks will eke out slight gains for the first quarter.

Earlier this month, both the Standard & Poor's 500 and Dow Jones Industrial Average marched into the green for the year, and they’ve stayed there with a little help from U.S. Fed Chair Janet Yellen, who on Tuesday offered a cautious stance on raising the cost of borrowing money in the coming months, giving investors reason to buy.

The Dow and the broader S&P 500 index are both ending the quarter higher than they’ve been since late December. The tech-heavy Nasdaq is still below its Jan. 5 level, but is close enough to that level to possibly squeeze out a gain on the last trading day of the quarter on Thursday.

U.S. oil prices, too, climbed out of a rut on March 15 and have remained above their starting-year spot price of under $37 a barrel. (The daily futures settlement price ended Wednesday above $38.)

But there are still some reasons to be cautious about the outlook. Gold has gained 16 percent in value since the first trading day of the year in London. And the return on 10-year government debt has fallen nearly 20 percent.

When gold gets more expensive and the 10-year Treasury doesn’t give up as much of an already-meager return, it indicates that investors are cautious and trying to preserve wealth by parking it in “safe harbor” instruments, including precious metals, U.S. and German bonds, and the world’s strongest currencies.

What can investors expect moving forward into the second quarter? According to S&P Global Market Intelligence, the worst might be over for energy stocks, although they will likely remain in negative-growth territory for the rest of the year. Meanwhile, the sectors heavily dependent on the U.S. economy, such as consumer staples and healthcare, could help keep the market afloat.

The volatility that has wiped out trillions in global stock value since the start of the year, only to restore much of it in recent months, could endure, amid concerns over the health of the global economy and China’s economic slowdown. As long as oil and other commodities remain low, investors will continue to be skittish.