What happened

IAA (IAA). Carpenter Technology (CRS 2.08%). Sunrun (RUN -6.78%). What do an online marketplace for wrecked cars, a specialty metals fabricator, and a solar panel installer have in common? Well, all three of these stocks are making big moves on the stock market today: IAA and Carpenter are both up more than 10% in early trading, but Sunrun is down more than 10%.

And all of them are moving because of factors outside of their control.

Words SELL and BUY on a seesaw

Image source: Getty Images.

So what

At 12:15 p.m. EDT, shares of IAA are continuing to climb -- up 13.7% -- and Carpenter is at least holding onto the majority of its early gains (up 7.4%). Sunrun, however, is still down by quite a lot -- 8.6%. And all of these moves can be traced back to an announcement from the S&P Dow Jones Indices today about shifting memberships in its various stock indexes.

Specifically, this morning, S&P announced that IAA will replace Deluxe Corp (DLX 0.85%) in the S&P MidCap 400 index of companies, while Carpenter Technology will drop out of that index and into the S&P SmallCap 600 instead, taking the place of Cedar Realty Trust (CDR), which will drop from the index entirely.

Conversely, Sunrun will be leaving the SmallCap index and joining the MidCap, taking the place formerly occupied by Legg Mason (LM), which is being acquired by Franklin Resources (BEN 0.85%) and will soon cease trading independently.

Now what

What do these shifts from one index to another have to do with the stocks' prices? Well, in a nutshell, investors are betting that when the moves happen, mutual funds and ETFs that try to track the performance of the indexes precisely will have to buy (or sell) shares in each respective index to accurately reflect their composition. Officially, the changes take place on Aug. 3 and, knowing this, investors are attempting to "front-run" the indexes' moves by buying and selling shares before the indexes do.

Might this result in some short-term gains for the people doing the trading on Aug. 3? Possibly. Does any of this have anything to do with the stocks' long-term attractiveness, or unattractiveness, as investments, though?

Not at all.