Understanding the Magnificent Seven Stocks
In 2013, Jim Cramer of CNBC's 'Mad Money' popularized the term FANG to describe the high-performing stocks of Facebook, Amazon, Netflix, and Google. Then in 2017, Apple joined this group to make FAANG. Since 2023, a similar group of stocks has captured investors' attention with another term popularized by Cramer, The Magnificent Seven. Apple, Amazon, Alphabet, Meta, Microsoft, Nvidia, and Tesla are all significant players in tech and the AI boom, and at the same time, all members of the S&P 500 index.
Despite the S&P 500 being a common indicator of the stock market's health, it currently predominantly reflects the performance of the Magnificent Seven. Given that the S&P's metrics are a weighted average based on market cap share, there are concerns that the recent success of the Seven may artificially inflate the S&P's overall performance. Are the Seven masking an otherwise stagnant S&P 500? Likewise, is a business that has to report their progress to the SEC with respect to the S&P making a flawed comparison? I hoped to examine some of these questions through this R Shiny App. Find the app here and the code here.
First Steps: Audience and the Data
In addition to a stock's price data, news coverage of this topic often plots percent change in price with relation to the S&P 500. These plots would often only include monthly averages in order to visualize longer-term trends. Media outlets publish these visualizations as a way to illustrate a point, like whether you should invest in a certain stock. By reproducing these kinds of plots while adding more historical data and allowing for more customization, I hoped to put more knowledge and perspective in the hands of beginners to the world of investing.
My three resources were Google Finance for prices, macrotrends.net for market cap data, and the IMF World Economic Outlook Database for world GDP’s. World GDP's worked as an effective way to put the previous two sources in context, as I will demonstrate later. I chose to explore data from 2015 to the present, a healthy ten-year window that would allow me to illustrate these stocks’ rise to prominence and to understand what may have contributed to their rise.
The App: Price Data
One section of the app is devoted to price data, which I plotted as a time series with a plotly-based library called TsStudio. In this first tab, you can see all seven’s daily prices and their percent change in price versus the S&P. Percent change in price needs to be calculated dynamically based on starting date, so I added a starting date input option. In addition, the “view monthly averages” checkbox switches between the daily and the pre-aggregated monthly data.

Fig. 1: Monthly averaged price data from 2015 to present.
The second tab allows you to zoom in on individual stocks. You can get the same kind of customization like in the first tab, and also get the mean price and the standard deviation, which is a common measure of volatility. In finance, a higher absolute value of standard deviation indicates that the stock is more volatile. Higher volatility doesn’t necessarily mean that you shouldn’t invest, but it may help guide decisions about it.

Fig. 2: Percent change in META price compared to the S&P 500 from 2022 to present. Both values were negative until early 2024.

Fig. 3: Plots of both NVDA and TSLA's prices from December 2023 to present. While NVDA's standard deviation is quite high, the trend line is clearly moving upwards. TSLA has lower volatility in this time frame, but with a downward trend. Jim Cramer has suggested that the Seven should drop TSLA in favor of the "Super Six", a clearer decision when observing these kinds of plots.
The App: Market Cap
Market capitalization represents the total dollar market value of a company’s outstanding shares of stock. The S&P 500’s market cap is the sum of the the market caps of all companies in the index. Then, the S&P’s metrics are based on a weighted average of market cap. The SEC requires public US businesses to report their progress with respect to a representative overall index. If the business is a member of the S&P, then they must use that as its benchmark. Due to these reasons, it makes sense for us to dig in and understand how the market cap and the Seven’s share of it has changed. I used ggplot2 here as well as a library called treemap.

Fig. 4: At year end of 2023, the Seven accounted for a quarter of the S&P 500's $47.7 trillion market cap.
Fig. 5: Bar chart of S&P 500's market cap from year-end 2014. The considerable contraction in 2022 is part of a larger stock market decline in 2022 due to the aftermath of Covid and the Russian invasion of Ukraine.
Fig. 6: Bar chart of the Magnificent Seven's market cap. More consistent sizing and growth of stalwarts like Apple, Amazon, and Google contrast with the more volatile growth of Nvidia and Tesla.
The App: Market Cap vs World GDP's
The next tab compares the Seven’s market cap to world GDP’s as a way to demonstrate these breakdowns in context and understand how these companies’ progress will play out on the world stage.

Fig. 7: Compare these two bar charts comparing year-end market cap of the Magnificent 7 to world GDP's in 2019 and 2020. The Seven's market cap almost doubles while most countries worldwide stay the same. Many countries' economies stagnated during Covid. The Seven, though, had stakes in software, telecommunications equipment, and retail via the Internet, which all received a significant boost during the pandemic.
Next Steps
I can think of plenty of next steps for this project. First, I would refactor my plots to allow for more customization. I have a lot of the raw material to do some rigorous time series analysis as well! Next, price data only takes us so far in analyses like this, and integrating some data about earnings per share and P/E ratios would be a good step.
Thanks for reading. Check out my project about RuPaul's Drag Race or my tips for solving the New York Times crossword puzzles!