U.S. stock indexes ticked lower on Thursday, but only after a circuitous ride that saw them flip multiple times between small gains and losses. It’s the latest meandering course for a market that’s been pushed in many directions the last few weeks.

On Thursday:

The Standard & Poor’s 500 fell 5.07 points, or 0.2 percent, to 2,438.97.

The Dow Jones industrial average fell 28.69 points, or 0.1 percent, to 21,783.40.

The Nasdaq composite fell 7.08 points, or 0.1 percent, to 6,271.33.

The Russell 2000 index of smaller-company stocks rose 4.14 points, or 0.3 percent, to 1,373.88.

For the week:

The S&P 500 is up 13.42 points, or 0.6 percent.

The Dow is up 108.89 points, or 0.5 percent.

The Nasdaq is up 54.80 points, or 0.9 percent.

The Russell 2000 is up 16.08 points, or 1.2 percent.

For the year:

The S&P 500 is up 200.14 points, or 8.9 percent.

The Dow is up 2,020.80 points, or 10.2 percent.

The Nasdaq is up 888.21 points, or 16.5 percent.

The Russell 2000 is up 16.75 points, or 1.2 percent.