By the Numbers

Best First Half Since 1998. What's Next?

Getty Images

The beginning of 2013 brought with it a swelling economy, but also international turmoil, domestic uncertainty over fixed-income securities and a turbulent currency and commodities market. Despite those hurdles, the S&P 500 is still up 13 percent for the year, while the Dow is up nearly 15 percent.

In fact, the S&P is poised for its best first half since 1998 and 1999 for the Dow. As the second quarter and first half of the year came to an end Friday, CNBC examined where the money was made.

Investors betting on health care, financial and consumer discretionary stocks fared the best, as these three sectors recorded more than 18-percent gains. The sectors are also leading in Q2.

S&P Sectors Price QTD % Chg. YTD % Chg.
Financials 263.867.519.3
Consumer Discretionary 445.746.118.5
Health Care 555.924.220.1
Industrials 372.32.913.2
Information Technology 491.231.65.9
Telecomm Services 159.060.78.9
Consumer Staples 412.240.414.3
Energy579.78-0.78.8
Materials 243-1.82.3
Utilities 190.7-47.3

The Dow Jones Transportation Average, an index of 20 major transportation companies, is also among the winners for the first half, up nearly 17 percent. Within the index, airlines are up the most, posting gains north of 20 percent.

Quarter-to-date, the NASDAQ Composite has taken the lead after lagging for most of the year.

Major US Indexes Price QTD % Chg. YTD % Chg.
Dow15024.493.0614.65
S&P 5001613.22.813.11
NASDAQ3401.864.1112.66
NASDAQ1002906.843.139.24
DJ Transports6199.87-0.8916.83
S&P Midcap 4001162.660.7813.94
Russell 2000979.922.9815.37
CBOE VIX16.8632.76-6.44

Here's a look at the best and worst performing stocks this quarter. (Click "next" below.)

Ticker Company Price QTD % Chg. YTD % Chg.
FSLR First Solar 44.5 65.1 44.2
AMD Advanced Micro Devices 4.08 60 70
GME GameStop 40.87 46.1 62.9
MU Micron Technology 14.34 43.8 126.2
ACT Actavis 125.86 36.6 46.3
REGN Regeneron Pharma 234.57 33 37.1
BBY Best Buy 27.84 25.7 134.9
EA Electronic Arts 22.21 25.5 53
MNST Monster Beverage 59.65 24.9 12.9
CME CME Group 76.52 24.6 51
NEM Newmont Mining 27.71 -33.9 -40.3
BTU Peabody Energy 14.64 -30.8 -45
IRM Iron Mountain 26.75 -26.3 -13.8
AGN Allergan 85.43 -23.5 -6.9
FFIV F5 Networks 70.05 -21.4 -27.9
MPC Marathon Petroleum 71.05 -20.7 12.8
CNX Consol Energy 27.35 -18.7 -14.8
EW Edwards Lifesciences 66.82 -18.7 -25.9
CTSH Cognizant Tech 63.1 -17.6 -14.6
ADT ADT Corp. 40.35 -17.6 -13.2

—By CNBC's Giovanny Moreano. Follow him on Twitter: @giovannymoreano.CNBC's Jeffrey Kagan contributed to this story.