The S&P 500 (^GSPC 1.20%) has languished in the shadow of the Dow Jones Industrials recently, with all the hype surrounding Dow 17,000 hiding the fact that the S&P is nearing a more important milestone of its own. With this week's gains, the S&P rests less than 15 points below the 2,000 level. Thousand-point gains in the Dow have seemed to come with clockwork reliability lately, but it's been more than 16 years since the S&P 500 first climbed above the 1,000 mark in early 1998. Along the way, the stocks that have contributed the most to its advance have come from two key sectors: technology and biotech. Let's take a closer look at how Apple (AAPL 0.64%) and Amazon.com (AMZN 1.30%) have joined with Celgene (CELG) and Gilead Sciences (GILD 0.12%) to lead the S&P 500 higher.

AAPL Total Return Price Chart

Total Return Price data by YCharts

Apple's rise of more than 153 times has gotten plenty of attention over the years, but it's interesting to go back to 1998 to see what was happening with the tech giant at the time. Apple had just introduced its online store, allowing customers to order hardware products over the Internet, and Steve Jobs had returned for less than a year after Apple's purchase of NeXT. Later that year, Apple would introduce the iMac, whose design was led by Jonathan Ive, a key player in the development of the iPod and iPhone. Now, Apple has retained some of its connection to its past, but the devices that drive its success now look little like the Macintosh computers that helped Apple join the S&P 500 in the first place back in 1982.

Source: Amazon.

Amazon's 63-fold advance has come with plenty of bumps along the way. Founded in 1994, the online-retail pioneer didn't even go public until 1997, less than a year before the S&P hit 1,000. Shares soared as the popularity of the Internet lifted just about every stock related to the online experience during the late 1990s, and Amazon suffered huge declines during the ensuing bust during the early 2000s. S&P investors missed out on those two big moves up and down, as Amazon didn't join the S&P 500 until 2005. Nevertheless, the company has diversified into a number of new areas since then, offering just about any product imaginable from a retail standpoint as well as cloud-computing services, streaming video, and numerous other projects.

Celgene has jumped 127 times, with the biotech having been spun off from chemical giant Celanese in the mid-1980s. Back in 1998, the company was just months away from its initial success, as the FDA approval of Thalomid to treat a painful skin condition associated with leprosy. Later, the drug would become important as part of a combination-treatment for cancer, and further successes like its Revlimid treatment for anemia and multiple myeloma has become a blockbuster for the company. Celgene joined the S&P 500 in 2006. Lately, Celgene has ridden the wave of interest in biotechs higher, but it still has plenty of pipeline prospects that could produce future blockbuster treatments in the future.

Source: Gilead Sciences.

Gilead has risen 70-fold since 1998, joining the S&P 500 in 2004. Founded in 1987, the company went public in 1992 and almost immediately became known for its specialty in treating HIV and AIDS. Treatments like Truvada and Atripla helped countless HIV patients, but other products like influenza treatment Tamiflu also gained popularity. Recently, Gilead's Sovaldi treatment for hepatitis C has drawn the most attention as a potential game-changer for the company.

The S&P 500 has come a long way since it first hit 1,000 in early 2008, with some of its biggest companies having grown from nearly nothing to contribute to the index's success. In the next 16 years, you can expect similar surprises from companies you've never heard of that will be tomorrow's new S&P 500 members.