On the fence about investing in Tesla (TSLA 1.39%)? Soon enough, you may not have a choice. With the electric carmaker set to join the S&P 500 on Dec. 21, you'll automatically get a piece of Tesla if you're invested in S&P 500 index funds. Here's a look at how those funds will adjust for this latest addition to the benchmark index, along with the steps you should take to manage your risk.

Index funds like the Vanguard 500 Index Fund (VOO -0.65%) and iShares Core S&P 500 ETF (IVV -0.66%) are designed to mimic the performance of the S&P 500. They do this by building a portfolio that matches the index. That would be straightforward, except that indexes are not static. They change periodically, and that's when things get complicated for index funds.

Back view of woman in high-rise office analyzing charts and trend lines.

Image source: Getty Images.

Index funds track a moving target

The components of the S&P 500 are weighted by their size, so that larger companies have more influence over the index's performance. An S&P 500 index fund therefore has to replicate not only the components of the index, but also their weightings. The components and weightings change periodically, often due to mergers, acquisitions, or quarterly rebalancing of the index. Or, as with Tesla, a company can grow into the qualifications and then be selected for inclusion. Likewise, a company could be removed from the index because it no longer qualifies. The weightings of the companies in the index also change regularly, since the S&P 500 is rebalanced quarterly.

Index funds adjust their portfolios for these changes by trading. The closer they can time those trades to coincide with index changes, the better. But at the same time, funds are also managing the normal cash inflows and outflows related to shareholder transactions and dividends. Cash generated from either has to be reinvested promptly. Any inefficiencies in this process can affect the fund's performance.

The difference in performance between an index fund and the index itself is called tracking error. Normally, the biggest factor in tracking error is the fund's expense ratio, but inefficient or delayed portfolio adjustments also contribute.

A little research will show you that the most popular S&P 500 index funds have slim tracking errors -- a sign that they're pretty efficient about fund adjustments. VOO, for example, has lagged the S&P 500 by 0.05% in the 12 months ending Nov. 30. IVV also has a 0.03% expense ratio and its growth is a mere 0.04% lower than the index's.

Rolling Tesla into the fold

Tesla presents a slightly bigger challenge for index funds, because of its sheer size. As of early December, Tesla's market cap is over $600 billion. That's more than 2% of the S&P 500's total current market cap of $30 trillion. It's also larger than Berkshire Hathaway, Walmart, and Visa -- currently the sixth, seventh, and eighth largest components of the S&P 500. That's a sizable portfolio adjustment for index funds to make on Dec. 21.

As an index fund investor, should you be worried about the change? Not really, mostly because it's outside your control and any resulting turbulence will be temporary. Plus, the S&P Dow Jones Indices team did ask mutual funds and other institutional investors for feedback on whether Tesla should be added to the index all at once or in two separate buckets. After gathering that feedback, they decided to roll Tesla into the fold all at once.

It's a big change, but one that a well-run fund can handle. If you have concerns, recheck your fund's historic tracking error. That'll give you an indication of how well the fund has managed index changes in the past. 

The risk of future Tesla volatility

You also might wonder if you should worry about the influence Tesla will have over the index going forward. The carmaker's stock has been on an incredible run, after all. That always opens the door for a dramatic reversal. But if Tesla accounts for 2% of the S&P 500, losing half its value overnight would pull the index down by 1%. Many passive investors would be affected, but that change wouldn't destroy retirement portfolios on its own. Plus, it's likely that Tesla will be less volatile once it's part of the index anyway, since its shareholder base will shift to passive funds that won't be actively trading.

Your next steps

No matter how you see Tesla's future playing out, it's wise to check the funds you own today for Tesla holdings. For example, Tesla makes up 5% of American Funds Growth Fund of America (AGTHX 1.91%) and more than 3% of Invesco QQQ Trust (QQQ -0.82%). If you own one of those funds plus an S&P 500 fund, you may end up with more Tesla than you want as of Dec. 21. Now's the time to decide how much Tesla exposure you can handle and then adjust your portfolio accordingly.