After deep losses last year, an AI boom has driven the stock market to a rebound in 2023. The biggest winners have been the mega-caps, companies like Alphabet, Microsoft, and Nvidia, whose size, market share, and exposure to AI have attracted investors in droves.

The result, according to investing legend Jeremy Grantham, is a decidedly unstable situation, reminiscent of past stock bubbles. Grantham, who is the co-founder of Boston-based GMO, a firm that has ~$58.8 billion of assets under management (AUM), has built a reputation as a contrarian with a solid record of success in predicting such bubbles, and sees AI as the shiny new thing preventing a general market collapse.

Markets are still up, but AI is holding them there on dangerously inflated prices. “A dozen giant American stocks have had a hell of a run on the back of AI, and that has certainly created the impression that it’s game over,” Grantham recently said. However, he believes the problem is that prices are “incredibly high” and what we are witnessing is a “head fake, but it’s a hell of a head fake.”

Grantham goes on to add that he is “very nervous about an eventual financial trouble,” by that meaning a potential recession. He believes that there is a serious risk – 70%, in his estimation – that the US economy will contract in the next 18 months. “I think it would be unique if we don’t have an extended problem with the economy,” he ominously added.

So, time to take some protective action. Taking Grantham’s warning to heart, we’ve opened up the TipRanks database to pull the details on defensive stocks, stocks that will provide a level of protection to your portfolio should everything go south. According to the Street’s analysts, these are Buy-rated equities with approximately 25% upside   – and some solid defensive attributes. Let’s take a closer look.

Open Text Corporation (OTEX)

We’ll start with a software company, Open Text. This Ontario-based firm is one of Canada’s largest software companies, offering customers an enormous array of products, including cloud-based solutions for app modernization, business networking, content work, and digital experiences. Customers can simplify their systems, build up process automation, and connect data, all in a multi-cloud environment.

The market for information management, Open Text’s niche, is estimated at $200 billion – and it’s expanding. Open Text has staked out a position based on quality products and compelling solutions to meet customers’ cloud-computing needs, while adding to market share. As a measure of the company’s success, the $4.5 billion in revenue for the last fiscal year marked a 28% year-over-year increase, and $3.6 billion of that total, or 80%, is annually recurring revenue (ARR).

If we zoom in and look at the recent fiscal fourth quarter, we find that Open Text finished its fiscal year (which ended on June 30) with solid quarterly results. The top line figure of $1.5 billion represented 66.2% y/y revenue growth, and beat the forecast by $10 million. ARR came to $1.2 billion for a 56.4% y/y gain. The quarter’s operating cash flow was $115 million, a total that included $91 million in free cash flow. At the bottom line, Open Text reported 91 cents per share in non-GAAP EPS for fiscal 4Q23, beating the forecast by 4 cents per share.

This software company’s impressive cash flows caught the attention of Richard Tse from the National Bank of Canada. Noting that the firm’s ability to generate recurring cash is a solid defensive feature, the 5-star analyst writes of this stock, “OTEX remains one of our favourite ‘legacy’ names. Scaling profitability and recurring cash flow offers investors compelling defensive attributes at an attractive valuation. Despite the upside from MF’s integration (the company closed the acquisition of Micro Focus, a provider of mission-critical software technology, in January), we continue to see a growing base of recurring revenue through opportunistic acquisitions, expanding operating leverage and optionality on what appears to be a renewed emphasis back on organic growth, all of which is not fully reflected in the 8.4x F24 EV/EBITDA valuation.”

Tse goes on to give this stock an Outperform (Buy) rating, while his price target of $60 implies a 56% upside potential for the coming year. (To watch Tse’s track record, click here.)

Overall, Open Text sports a Strong Buy consensus rating, backed up by 8 recent analyst reviews that include 6 Buys and 2 Holds. The $50 average price target indicates potential for a 12-month upside of 30%. (See Open Text’s stock forecast.)

Valvoline, Inc. (VVV)

The second defensive stalwart we’ll look at is Valvoline, one of the leaders in the global market for automotive fuels and lubricating oils. The company also produces a range of other liquid chemical products for cars, from brake and transmission fluids to engine coolants and anti-freezes, as well as fuel treatments and purpose-formulated lubricating oils, coolants, and transmission fluids for hybrid vehicles.

Valvoline markets its products through a variety of retail outlets, from major chain and big box stores to small independent gas stations – and it operates some 1,800 franchised service center locations through its Valvoline Instant Oil Change and Valvoline Great Canadian Oil Change brands.

The automotive industry has been facing serious challenges in recent years. Headwinds have included supply chain disruptions, labor stoppages (of which the current UAW strike is only the most recent), and increased costs for raw materials, construction, and fuels.

Nevertheless, as was evident in the Valvoline’s most recent quarterly earnings report, from Q3 of fiscal year 2023, the company has been performing well. The quarter, which ended on June 30, showed revenues from continuing operations of $376.2 million, amounting to an 18.5% increase from the previous year period, while the bottom line earnings came in at 43 cents per share by non-GAAP measures. Both revenues and earnings beat the forecasts, revenues by $9.9 million and EPS by 9 cents per share.

In a metric that bodes well for Valvoline going forward, the company recorded an increase of 23 new stores in its branded oil change lines during the quarter. This growth included 22 company-operated locations and 1 franchised store, and brought the full system total to 1,804 stores during Q3. The company reported a system-wide same-store sales growth of 12.5% for the quarter.

In the opinion of Steven Shemesh, covering Valvoline for RBC Capital, the key point here is the company’s continuing unit growth and its potential for future sales. Shemesh writes, “VVV is one of the few names in the hardlines/broadlines that we feel can work regardless of how the macro progresses. Following the sale of its global products division, VVV is now a more defensive and simpler unit growth story (set to grow units +7-10% annually) with pricing power and a $70M+ incremental EBITDA opportunity from existing stores reaching maturity. Largely still under investors’ radar, we feel ~12.5x FY24E EV/EBITDA is a compelling valuation for a name with a long-term guide of +14-16% revenue and +16- 18% EBITDA growth annually (currently ~26% EBITDA margins).”

The analyst’s comments back up his Outperform (Buy) rating on the stock, and he gave VVV a $43 price target that suggests it will gain 32% on the one-year horizon. (To watch Shemesh’s track record, click here.)

Valvoline stock has a Moderate Buy consensus rating from the Street, based on an even split in the 8 recent share reviews: 4 Buys and 4 Holds. The forecast calls for one-year gains of 24%, considering the average price target clocks in at $40.25. (See Valvoline’s stock forecast.)

To find good ideas for stocks trading at attractive valuations, visit TipRanks’ Best Stocks to Buy, a newly launched tool that unites all of TipRanks’ equity insights.

Disclaimer: The opinions expressed in this article are solely those of the featured analysts. The content is intended to be used for informational purposes only. It is very important to do your own analysis before making any investment.