With the major indices regularly hitting fresh highs, it's tempting for tech investors to get excited about the many great names that continue to notch new 52-week highs -- in other words, to keep betting on what works. 

Shares of Advanced Micro Devices (AMD) - Get Report , for example, already up more than 120% this year, are up roughly 28% in just the last month of trading, so that one of the best performers in tech has become something of a momentum stock. That kind of validation seems hard to turn away from.

An alternative, however, would be to pick up shares of some perfectly good names that aren't everyone's favorite at the moment -- strong companies with lasting franchises that are simply out of favor.

Five great names are worth considering at the moment: Arista Networks (ANET) - Get Report , Twitter (TWTR) - Get Report , Netflix (NFLX) - Get Report , Nokia (NOK) - Get Report , and Xilinx (XLNX) - Get Report .

In each case, the companies have had an event or events in recent memory that caused the shares to give up substantial ground. In some cases, it was nothing the company itself did wrong, just a change in the apparent circumstances of the marketplace in which they compete. And those events have in turn prompted a dramatic change in sentiment, with the companies being treated as if nothing they do will ever work from here on out.

Here's a closer look at each:

1. Arista Networks

Arista is still the leader in data switches for the data center, well ahead of Cisco Systems (CSCO) - Get Report , thanks to Arista's use of software that is more efficient and free of the bloated code that bogs down Cisco's equipment.

At a recent price of $194, the stock is down 8% for the year after the shares plummeted by 24% on Nov. 1. The proximate cause was the company offering a forecast for this quarter's sales well below consensus. The apparent culprit, though Arista management didn't name them, was Facebook (FB) - Get Report , which is one of two very large customers for Arista, along with Microsoft (MSFT) - Get Report .

These blow-ups have happened before for Arista. Its sales of switches for data center are fairly concentrated even though Arista has been around for over a decade. There are only so many customers for large-scale data center infrastructure. That's a long-term risk, but one the company has managed over the years. It has seen either Microsoft or Facebook orders dry up in a quarter, and later seen that business return.

There's nothing to indicate this time is any different. Within a few quarters, most likely, the November disappointment will seem like a distant memory. The franchise, meanwhile, is one that has years of promise ahead of it. 

2. Twitter

Twitter is a similar November meltdown, falling 21% on Oct. 24, and now up just 5% for the year at a recent $30.27. The proximate cause was the company missing Q3 revenue and earnings estimates, and forecasting slower-than-expected Q4 revenue growth. Both the results and outlook were chalked up to the company having to make changes to its mobile app and to its personalization and advertising technologies. 

As with Arista's disappearing customers, issues of shifting ad-tech and application features are a perennial matter. Twitter changes stuff, often without warning, as CEO Jack Dorsey and company deem fit as they twiddle the knobs of the business. Since it's unpredictable, from the standpoint of a public investor, the best assumption is that things will blow up now and then, usually when all seems to be going just fine, as it was right before Oct. 24. Twitter shows no signs of going away as a platform for discourse, so best to pick it up when everyone is acting like it will go away.

3. Netflix

Netflix is another stock that's experienced a sky-is-falling moment. Apple (AAPL) - Get Report unveiled its "Apple TV+" service in September, and Walt Disney (DIS) - Get Report is going live with its previously announced "Disney+" streaming service. Suddenly everyone believes in competition for Netflix in the streaming market. Netflix shares are up about 15% for the year at a recent $307.53, but still down 20% from their 52-week high. 

Netflix had fallen hard following a July 17 Q2 report that produced fewer net subscriber additions than expected. And the same thing happened last quarter, when Netflix reported on Oct. 16th that subscriber additions were less than expected and forecast softer numbers this quarter than Street consensus. All that shows real competition has arrived. 

None of that, however, changes the fact the company continues to find ways to suck people in, with 6.26 million subscribers added overseas last quarter. Netflix will always be a, well, house of cards, built on a pile of cheap debt. In the long run, that combination may ultimately not add up to much. But the momentum of adding subscribers means that before it all falls apart, expectations will adjust to reality and the shares will return to favor.

The stock is up about 6% since TheStreet said on Sept. 1 that the sell-off in shares was overdone.

4. Nokia

Nokia, one of two major European telecom equipment suppliers along with Ericsson (ERIC) - Get Report , can look forward to many years of 5G wireless roll-outs around the globe, driving up demand for equipment. But not right away.

As TheStreet warned earlier this year, expectations for the pace of 5G's deployment globally have been unrealistic. In the U.S. and Europe, permitting for rights-of-way to install 5G equipment is a byzantine process that is hampering the pace of its build out. Hence, Nokia shares had to correct to reflect the more subdued reality.

And correct they did on Oct. 24, with the stock dropping 24% as Nokia cut its profit outlook for this year and forecast next year's earnings below consensus. Nokia management cited a variety of 5G factors, such as pressure on pricing for equipment in the race to win early 5G deals. 

At a recent $3.35, Nokia is down 42% for the year and trades for a song at just 12 times next year's projected earnings. That figure may move around as expectations continue to be cut. But the company is not going away. The lesson here is to buy a stock once all the euphoria has been burned away -- in this case, the unreasonable enthusiasm around 5G. 

5. Xilinx

Last, we come to a true gem, Xilinx. There are only three major markers of so-called field-programmable gate arrays (FPGAs), those being Intel's captive Altera business, which it bought some years back, Lattice Semiconductor (LSCC) - Get Report  and Xilinx. Altera and Xilinx have always been the marquee names here, with Lattice having somewhat lower quality products. 

Because of that exclusivity, Xilinx for much of this year was riding high, up 64% through April 24, after which things started to fall apart. First it became clear, as with Nokia, that the 5G market might not deliver as quickly as hoped for Xilinx, which sells chips into base station equipment. Then in July, President Trump's tariff battle hit the semiconductor industry hard with the ban on sales to Chinese telecom vendor Huawei, a significant customer for Xilinx. 

In time, these issues will resolve themselves. Xilinx still offers a very unique and valuable chip product that will find uses for years to come.

Dare we say it, buying low and selling high still matters, even in an unprecedented bull run. Scooping up good companies after their stocks have fallen apart has proven a nice approach over decades of stock market history, and these five will prove that rule again. 

Cisco, Facebook, Microsoft, Apple and Disney are holdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells these stocks? Learn more now.

Tiernan Ray neither trades nor owns any shares of any companies mentioned in this article.