NEW YORK — U.S. stocks again ticked higher Thursday as the continuing rebound in oil prices gave energy companies a lift. The gains were modest, however, as investors have been avoiding big moves. The dollar weakened further, and compared to the yen it’s at its lowest in almost three years.

Stocks wobbled in the early part of the day, but energy companies were a standout as the price of U.S. oil reached its highest level since the beginning of July. The weakening dollar aided exporters including technology and chemical companies. The market turned higher in the afternoon. Phone company stocks continued to slump, as did financial firms. Stocks haven’t moved much this week and haven’t made many big moves over the last month.

Ryan Detrick, senior market strategist for LPL Financial, said the U.S. market tends to be calm in August and trading volume is usually low. Lower trading volume means surprising events can cause big swings for stocks, but so far, it’s made this month the opposite of January and early February, when stocks tumbled and the markets were rattled. “We had record volatility to start the year and these things do tend to revert,” he said. “It’s amazing how quickly things change.”

The Dow Jones industrial average picked up 23.76 points, or 0.1 percent, to 18,597.70. The Standard & Poor’s 500 added 4.80 points, or 0.2 percent, to 2,187.02. The Nasdaq composite rose 11.49 points, or 0.2 percent, to 5,240.15.

Oil prices have rallied over the last two weeks, but they have essentially remained between $40 and $50 a barrel for four months.