The S&P 500 is quietly testing new all-time highs this afternoon, a status that's become pretty standard in recent months.

Then again, it's actually a condition that's pretty standard for stocks in the long term, too. Between 1950 and 2013, the S&P spent nearly half of its trading sessions either at all-time highs or within just 4% of them. The important takeaway here is that this market could have a lot higher to go in 2017.

More importantly, big stocks have been leading the charge this year. And those same big stocks look primed to hand investors the biggest gains as we head toward the summer months.

To figure out which large-cap names you should have in your portfolio in June, we're turning to the chart for a technical look at three huge stocks that are breaking out -- and when you should buy them.

First, a quick note on the technical toolbox we're using here: Technical analysis is a study of the market itself. Since the market is ultimately the only mechanism that determines a stock's price, technical analysis is a valuable tool even in the roughest of trading conditions. Technical charts are used every day by proprietary trading floors, Wall Street's biggest financial firms, and individual investors to get an edge on the market. And research shows that skilled technical traders can bank gains as much as 90% of the time.

Every week, I take an in-depth look at big names that are telling important technical stories.

Over on Real Money, Jim Cramer gives advice to investors looking at how to play the Trump Trade. Get his insights or analysis with a free trial subscription to Real Money.

Here's this week's look at three big stocks to trade.

AT&T Inc.

Leading things off on our list is $237 billion communications giant AT&T Inc. (T) . AT&T has been anything but a leader lately -- shares are down almost 10% since the calendar flipped to 2017, underperforming the rest of the broad market by a big margin. But AT&T is finally showing signs of a reversal this summer, and it could mean that this big telco is about to make up for lost time.

AT&T has spent the last month and change forming an inverse head-and-shoulders pattern, a bullish reversal setup that indicates exhaustion among sellers. The pattern is formed by two swing lows that bottom out at approximately the same level (the shoulders), separated by a lower low (the head). The buy signal comes on a move through AT&T's neckline at $38.75, a price tag that's being tested Thursday.

Price momentum, measured by 14-day RSI, seen up at the top of AT&T's chart, adds some extra confidence to the price pattern. The higher lows in RSI mean that buying pressure has been building at these lower price levels. Once it materially moves through $38.75, buyers are back in control.

Pfizer Inc.

Meanwhile, things are looking pretty straightforward in shares of $200 billion pharma giant Pfizer Inc. (PFE) . Pfizer has been forming a textbook example of an uptrending channel since last fall, bouncing higher on every test of the bottom of the uptrend. Now, the chart is showing investors another buyable bounce this week.

Pfizer's uptrend is formed by a pair of parallel trendlines that have corralled most of this stock's price action since November. Every bounce off of the bottom of the channel has provided a low-risk, high-reward buying opportunity in Pfizer over the course of the pattern. So, as shares test support for a third time this spring, it makes sense to buy the next bounce higher. Simple as that.

Because Pfizer's price channel is wide-ranging, there's plenty of upside room left in this stock between where shares sit now and the top of the price channel at trendline resistance. If you decide to pull the trigger on Pfizer here, prior support at $32 is a logical place to park a protective stop.

Taiwan Semiconductor Manufacturing Co. Ltd.

Last on our list of big-cap breakouts is $175 billion semiconductor foundry Taiwan Semiconductor Manufacturing Co. Ltd. (TSM) . Taiwan Semi has been an outstanding performer in 2017, rallying more than 24% since the start of the year -- and now, a price setup in TSM's chart is pointing toward a second leg higher.

The pattern in play in TSM right now is an ascending triangle, a bullish continuation pattern formed by horizontal resistance up above shares (at $37.75 in this case), with uptrending support to the downside. Basically, as TSM pinballs in between those two technically significant price levels, shares have been getting squeezed closer and closer toward a breakout through the $35.75 price level. When that happens, we've got our buy signal.

Relative strength, measured by the indicator down at the bottom of TSM's chart, adds some extra confidence to the upside opportunity here. Our relative strength gauge has been making higher lows, signaling that this stock is still outperforming this summer. Once shares crack $35.75, it's time to buy.

Read More Trending Articles:

At the time of publication, author had no positions in the stocks mentioned.

More from Stocks

Stocks Slide on Renewed Trade War Concerns

Stocks Slide on Renewed Trade War Concerns

Video: Here's Where to Put Your Money Amid Trade War Fears

Video: Here's Where to Put Your Money Amid Trade War Fears

The Single Biggest Reason Trade War Fears Could Finally Topple the Stock Market

The Single Biggest Reason Trade War Fears Could Finally Topple the Stock Market

Activist-Targeted Rent-A-Center Sold to Vintage

Activist-Targeted Rent-A-Center Sold to Vintage

Ford's CEO Just Got a Badly Needed Vote of Confidence From His Boss

Ford's CEO Just Got a Badly Needed Vote of Confidence From His Boss