The year 2018 was nothing if not a jarring year for tech stocks -- and in a way that was very different from the bubble-induced plunges that hit equity markets in 2000 and 2008.

Here are some of the lessons that I took away from a year during which many tech stocks swooned in the absence of a major economic downturn, and also (though some pockets of frothiness existed) in the absence of the kind of widespread nosebleed valuations seen during the Dot-Com Bubble.

Lesson #1: Cycles Can Creep Up on You

If there's a large macro trigger -- like, say, a housing market collapse that nearly took down the financial services industry -- a downturn within a traditionally cyclical industry can be easy to spot in advance. However, when macro conditions don't look too bad and at least some of the secular growth drivers that have been lifting the fortunes of a cyclical industry still look intact, spotting the downturn before it becomes fairly obvious can be tougher to spot.

This semiconductor-industry downturn seen in recent months is a good case in point. A softening of demand in some end markets (smartphones, cryptocurrency mining and to some extent autos) gradually weighed, as did the impact of trade worries and loosening supply constraints on chip-buying decisions. While there were (with the benefit of hindsight) some warning signs this summer that a slowdown was on the way, it wasn't until the October earnings season that it became overwhelmingly clear a downturn was happening.

Lesson #2: Policy Worries Can Gradually Take a Toll

Though it was all the way back in March that President Donald Trump first floated the idea of placing tariffs on tens of billions of dollars worth of Chinese goods, the S&P 500 and Nasdaq both rallied to new highs this summer before swooning. Likewise, though the Federal Reserve had begun hiking interest rates in late 2015 and was widely expected to continue doing so going into this year, it was only late in the year, as the Fed remained committed to hiking rates and paring its balance sheet amid signs of softening macro conditions, that investors were put on edge by its decision-making.

To the extent that trade worries and the Fed's actions contributed to the late-2018 market selloff, the lesson, arguably, is that one can't be lulled into a false sense of security when markets don't initially respond harshly to a political or monetary policy that carries economic risk. If the policy keeps getting pursued and/or escalated, markets might eventually reach a tipping point.

Lesson #3: Irrational Buying Can Quickly Turn Into Irrational Selling

Though it was a far cry from the mania of 1999 and 2000, valuations did get stretched this year for some high-growth tech names, particularly in the fields of Internet services and enterprise software. And it would be fair to say that in those fields and others, a decent amount of "hot money" poured in, as investors and traders scared of letting getting left out of what had been a phenomenal bull market proved eager to bid shares of high-growth names to lofty valuations.

Again with the benefit of hindsight, it's understandable that a market environment like that reversed itself in a short amount of time, with over-eager buying giving way to panic selling -- likely aided by margin calls and fund redemptions -- following the arrival of some bad news.

Lesson #4: It's Worth Keeping Some Cash on Hand for When Giant Bargains Emerge

A value-minded tech investor willing to stomach near-term volatility could obtain some absolute bargains amid the panic selling of the last two weeks -- and not just among slower-growing firms or companies getting stung by cyclical pressures, but among companies that still look well-positioned to deliver healthy double-digit earnings and cash-flow growth over the long run. That is, assuming the investor had some spare cash to deploy.

Warren Buffett famously quipped that investors should act as if they had a ticket in which 20 holes could be punched, with the holes representing all of the investments made over the investors' lifetimes. Perhaps that saying doesn't need to be taken literally, but there is something to be said for the kind of discipline such a mindset requires. As long as panic selling -- whether for markets overall, a group of stocks or just an individual name hit with bad news -- exists as a phenomenon, keeping at least some cash available for when valuations truly hit discount territory, rather than simply become "reasonable," can pay off handsomely.

(Editor's Pick. Originally published Dec. 31.)