Reactions to results of Big Blue and Lam Research are about the future, not the past.

How can the blowout Lam Research (LRCX) quarter cause the stock to go down and IBM's (IBM) 22nd straight quarter of declining revenue cause it to have its biggest day since 2002?

It all has to do with the future, not the past.

IBM's stock came in down about 5% for the year going into last night's quarterly report, as there has been endless handwringing about how there's been 21 quarters in a row of revenue drop and now there will be 22.

The negative narrative is so ingrained that the news that the next quarter will break the streak took a lot of analysts, who have dug in negative heels, to get caught offsides.

I think some of the turn is from the end of the big dollar headwinds that have cost IBM a couple of billion dollars in the last year. But most of it is because the new mainframe cycle is kicking in and it has a lot of the features that customers have been clamoring over, including better analytics as well as tight cybersecurity. IBM's mainframe is totally encrypted, which means hackers simply don't have the ability to go after IBM customers like those systems that aren't encrypted. You can say this is the principle of the bad guys scanning the lot for unlocked doors, or you could say you don't have to outrun the bear, you just need to outrun the other guys.

It makes sense, especially because we know one of the worst kinds of breaches is the kind that Cyberark (CYBR) tries to beat, the master-key hack, where a high-level exec leaves and the bad guys spot the departure and burrow in to see if the master key's been returned. IBM's system shuts down if it gets that kind of intrusion. Needless to say, banks and healthcare systems and retailers and those finance and retailing companies using blockchain need a totally encrypted system, too.

So while there is a cyclical bounce to mainframe sales that will produce $300 million to $400 million in excess revenue this quarter -- hence the broken streak -- I think the cyber and analytics themes, the strategic imperatives, are secular in nature and will be layered on to mainframes to spur 2018 sales. That means this is not a one-off revenue turn, it is the real deal. I wonder if Warren Buffett sees the mainframe cycle as a reason to keep the rest of his stock, if he still owns some.

Needless to say, if I am right about the headwinds melting and the tailwinds settling in, we are going to be at the beginning of margin expansion -- the margins are still contracting but at a slower rate -- because strategic imperatives have higher gross margins than the old business that keeps rolling over as part of an unwanted legacy by many customers.

I have been adamant that IBM is a very tough own until we saw three things: 1) the new mainframe cycle, 2) the inflection point on revenue growth and 3) the strategic imperatives becoming more than half the business. The mainframe cycle has started. The inflection in revenues after 22 quarters is here and the big spend to build up the strategic imperatives has wound down while they now stand at 45% and are a shoo-in to get to 50% next year. It's a real renaissance and I think the stock can trade up, over time, to about $190, where it would still be valued only slightly lower than Oracle (ORCL) , which is a decent comparable.

What's best about this IBM quarter is that the two verticals that Watson has targeted, healthcare and financials, are paying off. IBM is winning over the big national health systems with its encrypted, but not slower, mainframes. It is winning over the financials with its secure blockchain and it is giving salespeople something to talk about like they haven't had in years.

Hence why the stock is going up the most in years. It should, as all tech stocks do when they inflect. Hats off to Katy Huberty at Morgan Stanley for being the first to call this one and is using that $192 price target and Oracle comp that I just mentioned. I am thrilled to welcome Martin Schroeter, IBM's straight-shooting CFO, to Mad Money in tonight's broadcast.

How about the A student, Lam? The quarter, while unbelievable from Lam, is again calling into question the sustainability of the order surge that has brought levels of orders for capital equipment to unimaginable heights vs. what we would have expected just a year ago.

The company is saying its customers, mostly DRAM and flash buyers, are being disciplined and not putting up enough greenfield factories to flood the zone and cause prices to dip. No one believed the company last time and the stock got shelled, affording Lam great prices to buy back stock. The fact is, though, Lam was up 83% going into the quarter and that's just too much regardless of how good the quarter is. Plus, ever since that amazing Applied Materials (AMAT) investor day where the management talked about its OLED (organic light-emitting diode) product, it's been the better performer. It should stay that way.

I think that Martin Anstice, the incredibly good CEO of Lam, told a compelling story about how this time is different and the data center and devices present so much demand that it can't be sated. But where I am wary is with this Bain-Apple (AAPL) deal to buy Toshiba's semiconductor business. If it goes through, it will be done with the idea of enriching Apple with cheaper flash than is currently available. That could hurt Lam. (Apple is part of TheStreet's Action Alerts PLUS portfolio.)

Second, I do not like the idea of hoping that Samsung will be disciplined in putting up plants. I have no idea how fast they can do it, but they certainly can do it.

Finally, Apple, Cisco (CSCO) and HP (HPE) have all pretty much said that while DRAMs will be tight in the first half of the year -- something that concerns Anstice -- they believe prices will drop in the second half. None of them has been that bearish before.

That's why I wanted you to take profits in Lam in yesterday's session because this is what happened last time the company reported a blowout, except the concerns seem more real to me. I would have felt much better had Western Digital (WDC) been able to get the Toshiba business. It was a major blow and I think the courts are going to OK the Bain-Apple plan.

So one goes up because it's the last bad quarter and the other goes down because people fear it's the last great one.

The C student gets a B and the A student just gets another A. I will back the C to the B any time in the Wall Street report game because C to a B amounts to a re-rating while just another A doesn't create the upside that it might have when the honor-roll streak started. That was when the Internet of Things and data center orders overwhelmed the flash and DRAM makers with demand that couldn't nearly be met just 18 short months ago.

Join Jim Cramer, CNBC's Jon Najarian and Other Experts Oct. 28 in New York

You can join them as they discuss how smart investors can make the most of options trading, futures contracts, fundamental and quantitative analysis and great ETFs to buy right now. Participants will also get a chance to meet Jim and other panelists and take photos.

When: Saturday, Oct. 28, 8 a.m.-3 p.m. ET

Where: The Harvard Club of New York, 35 W. 44th St., New York, N.Y.

Cost: $250 per person.

Click here for the full conference agenda or to reserve your seat now.

Get an email alert each time I write an article for Real Money. Click the "+Follow" next to my byline to this article.

Real Money's message boards are strictly for the open exchange of investment ideas among registered users. Any discussions or subjects off that topic or that do not promote this goal will be removed at the discretion of the site's moderators. Abusive, insensitive or threatening comments will not be tolerated and will be deleted. Thank you for your cooperation.
If you have questions, please contact us here.

TheStreet Ratings updates stock ratings daily. However, if no rating change occurs, the data on this page does not update. The data does update after 90 days if no rating change occurs within that time period.

FactSet calculates the Market Cap for the basic symbol to include common shares only. Year-to-date mutual fund returns are calculated on a monthly basis by Value Line and posted mid-month.