Last quarter's rally was fueled by optimism, Jim Cramer told his Mad Money viewers Thursday. Many companies are doing a lot better than investors expected, he said, and that's driving new money into stocks.

Who were the top 10 companies contributing to the Dow Jones Industrial Average's big move last quarter? Cramer ticked down the biggest names.

Topping the list was Boeing (BA) - Get Report , which continues to win orders and defy the negative analysts. Second was Caterpillar (CAT) - Get Report , which delivered a blowout quarter that few saw coming. Third was Goldman Sachs (GS) - Get Report , which is benefiting from deregulation and multiple expansion at the same time.

Fourth was an unexpected name: Chevron (CVX) - Get Report , which has found a way to navigate an otherwise difficult environment to a profitable quarter with plenty of cash to pay its dividend.

Visa (V) - Get Report clocked in at No. 5, as this solid performer's business continues to hum along. Home Depot (HD) - Get Report was next on the list, helped along by the rebuilding for two hurricanes, followed by UnitedHealth Group (UNH) - Get Report , which benefited from the implosion of repeal-and-replace.

Eighth was Apple (AAPL) - Get Report , the Action Alerts PLUS holding that is finally amping up its service offerings. Apple was followed by American Express (AXP) - Get Report , a stock that's been disliked for ages but was able to start delivering again for shareholders. Finally, there's Microsoft (MSFT) - Get Report , which benefited from its Azure cloud platform.

All of these names offer good dividends, Cramer noted, along with international sales. They also are major holdings in most index funds, the same funds that are turning skeptics into believers.

Executive Decision: Clorox

For his "Executive Decision" segment, Cramer sat down with Benno Dorer, chairman and CEO of The Clorox Company  (CLX) - Get Report , which held an analyst day Thursday.

Dorer said that bleach is still the most effective way to decontaminate water, and Clorox has been stepping up to provide relief to the hurricane victims with bleach and many other Clorox products.

Dorer continued by saying that Clorox doesn't just believe in growth, they believe in good growth, which means profitable, sustainable and responsible growth that fits their strategic strengths. Clorox not only has the right products at the right price, but they also invest in their brands and make sure they're connecting with their customers.

Finally, when asked about rising costs after the hurricane Harvey, Dorer said the full effects are still not yet known, but over the short term there could be a rise in plastics and other materials, but over the longer term, these effects tend to even out.

More on Clorox: TheStreet's Brian Sozzi talks with Dorer about how he is positioning the company for the future.

Cramer and the AAP team highlight some of the macro themes driving markets gains and how they affect their portfolio. Find out what they're telling their investment club members and get in on the conversation with a free trial subscription to Action Alerts PLUS.

When a Good Upgrade Is a Bad Thing 

Sometimes, the analysts get tired of being wrong and just throw in the towel and upgrade a stock. And while you might think that's a good thing, Cramer said it's actually a bad thing.

Case in point: the double upgrade of Sherwin-Williams (SHW) - Get Report from sell directly to buy. Cramer said this analyst admits that he was wrong to worry about the company's valuation and risks from its Valspar acquisition. But why should investors trust his opinion now?

Microsoft (MSFT) - Get Report also just received a big upgrade, after one analyst freely admitted that he's been waiting for a correction that just never came.

Cramer said the problem with these ill-timed upgrades are that it leaves fewer analysts to upgrade when the big declines finally do come and the markets need some cushioning.

Over on Real Money, Cramer explains why some of that analyst research is just useless -- a waste of trees. Get his insights with a free trial subscription to Real Money

Executive Decision: Constellation Brands 

In his second "Executive Decision" segment, Cramer checked in again with Rob Sands, president and CEO of Constellation Brands (STZ) - Get Report , which just posted a 30-cents-a-share earnings beat with expanding gross margins. Shares of Constellation are up 36% so far this year.

Sands explained that alcoholic beverages are quickly becoming the most profitable grocery category, and Constellation is in a great position to capitalize on that. He said Constellation has also been able to tap into changing consumer habits. Some 55% of alcohol drinkers now drink across all three categories (beer, wine and spirits), and his company has a strong position in all three.

Constellation has also been able to profit from a strong acquisition strategy of buying great, smaller brands and adding them into its portfolio. In fact, its newest brands are growing in the high double digits and are contributing 60% gross margins to the bottom line.

Executive Decision: Patterson-UTI Energy

For his final "Executive Decision" segment, Cramer sat down with Mark Seigel, chairman at Patterson-UTI Energy (PTEN) - Get Report , a stock which is up 25% in just the past month.

Seigel credited a strong balance sheet for Patterson's success, saying that the oil business offered tremendous leverage and there's no need to add financial leverage on top of that. Peterson prides itself on a "fortress" balance sheet, he said.

Also contributing to their success is a keen eye for acquisitions, as seen in Patterson's recent bid to acquire MS Energy, the nation's No. 2 directional driller. Seigel said that directional drilling -- the ability to drill down up to a mile, then horizontally for up to two miles, sometimes in multiple directions -- is critically important for the oil industry going forward and the deal is the logical extension of their business.

When asked about oil and gas demand, Seigel said that with record U.S. oil exports this month and manufacturing demand increasing, there's still plenty of demand for American oil and gas.

Lightning Round

In the Lightning Round, Cramer was bullish on Taiwan Semiconductor (TSM) - Get Report and Consolidated Edison (ED) - Get Report .

Cramer was bearish on Whiting Petroleum (WLL) - Get Report .

A Special Invitation

Jim Cramer will host CNBC's Jon Najarian, TD Ameritrade's JJ Kinahan, famed analytics expert Marc Chaikin and other market mavens on Oct. 28 in New York City to share successful strategies for active investors.

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. to 3 p.m. Eastern; Where: The Harvard Club of New York, 35 W. 44th St., New York, N.Y.

Cost: Special sale price: $95 per person if you book by midnight ET on Monday, Oct. 2. (Normal price: $250)

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

Search Jim Cramer's "Mad Money" trading recommendations using our exclusive "Mad Money" Stock Screener.

To watch replays of Cramer's video segments, visit the Mad Money page on CNBC.

To sign up for Jim Cramer's free Booyah! newsletter with all of his latest articles and videos please click here.

At the time of publication, Cramer's Action Alerts PLUS had a position in AAPL.