June was a good month for stocks, but some industries fared better than others. By digging into some of last month's biggest movers, we can figure out which trends are driving the stock market right now. This is a great way to set expectations for the next quarter and set up your stock portfolio for success moving forward.

1. Carnival Cruise Lines

Carnival (CCL -0.66%) shares surged nearly 70% in June. The stock climbed steadily early in the month thanks to multiple analyst upgrades and momentum across the travel sector.

Carnival reported quarterly earnings on June 26th, and the results were mixed. The company achieved strong bookings and record revenue, and it notched positive operating profits for the first time since 2019. It also produced positive free cash flow while paying down debt.

But the stock still retreated immediately following the quarterly announcement as investors grappled with the long road to recovery and the mountain of debt that still needs to be addressed. The retreat proved to be a blip, however, with Carnival charging higher to close the month.

Child sitting in the water on a tropical beach looking at a cruise ship in the distance.

Image source: Getty Images.

This illustrates one of the key trends driving the market right now. Some industries still haven't fully normalized from the deep economic disruptions caused by the pandemic. Cruise operators and airlines are enjoying strong demand right now, but their balance sheets are now saddled with more debt. That will lead to higher cash outflows to service debt over the next few years, and it enhances risk if we dip into a recession in the near future.

Most of the major cruise and airline stocks are still below their March 2020 highs. As investors become more optimistic about interest rates and macroeconomic stability, travel stocks are appealing because they still have relatively low valuation ratios. As we saw with Carnival, several airlines raised their forecasts, and that's pulling investors toward market segments that were left behind by other sectors earlier this year.

CCL Total Return Level Chart
CCL Total Return Level data by YCharts.

2. Owens Corning

Owens Corning (OC 2.10%) shares climbed nearly 23% in June. It was a huge month across the board for building products and equipment, and Owens Corning led that charge. The Fed paused its interest rate hiking in June, though the central bank clearly signaled that more hikes are likely in the future. High interest rates curb demand in the housing market, so the Fed's announcement was a strong catalyst for housing and related industries. The data on new housing starts and construction permits was unexpectedly strong, too, solidifying that momentum.

Many of Owens Corning's peers also moved higher -- the Materials Select Sector SPDR Fund (NYSEMKT: XLB) rose over 10%, and the iShares US Home Construction ETF (NYSEMKT: ITB) climbed 17%.

OC Chart
OC data by YCharts.

These stocks will remain highly sensitive to interest rates, so monetary policy should dictate their performance over the next few quarters. For the moment, the data suggests that housing demand is relatively strong despite the elevated interest rates and recession concerns. If that trend continues, these stocks are likely to be standout performers in the market.

3. Okta

Okta (OKTA -0.69%) was one of the worst–performing large-cap stocks in June. The cybersecurity company reported quarterly earnings after trading hours on May 31st. The company outpaced its own sales forecast, generated positive free cash flow, and increased its guidance for revenue and adjusted earnings. Unfortunately, that wasn't enough to please investors, who focused on slowing growth, net losses, and insufficient forecasts.

Prior to the earnings announcement, the stock's forward PE ratio was around 100, and its price-to-sales ratio was over 7. Those aren't outrageous for a high-growth stock, but they are still quite expensive valuation ratios. Companies have to sustain excellent growth figures to justify a forward PE ratio above 100, and Okta's current outlook isn't quite that bright.

Okta's tough month illustrates two key industry trends from last month. First, it wasn't a great month for high-growth stocks with aggressive valuations. The Invesco S&P 500 Equal Weight Tech ETF (NYSEMKT: RSPT) lagged the Vanguard Value ETF (NYSEMKT: VTV), which roughly matched the Vanguard Growth ETF (NYSEMKT: VUG) in total returns for the month. This suggests that growth stocks like Okta fell out of favor with investors, who piled into other sectors.

RSPT Chart
RSPT data by YCharts.

Second, it's important to recognize that Okta's drop was event driven. Market forces may have exacerbated the move, but it was driven by quarterly earnings. We've seen huge moves up and down for many stocks over the past few years, often with no company-specific news. Major indexes were up last month, with many gainers moving together. The market is clearly signaling some broad-based optimism, but it's not a shift toward a bull market and comprehensive recovery.

4. Dollar General

Dollar General (DG -0.41%) also plummeted after the company released its quarterly earnings report. The company's revenue fell short of expectations, and it slashed its full-year forecasts. In many ways, this corroborates the observations on Okta's decline. This was another event-driven sell-off, and it wasn't purely a casualty of market conditions.

This should also be a signal to investors to keep an eye on consumer stocks. The latest earnings season indicated some potential weakness in the consumer sector, with slowing employment growth, real wage erosion, and high inflation finally weighing on corporate results. But many tech stocks have climbed in recent months as investors grew more optimistic that we're nearing the end of rate hikes and the economic stagnation that comes with high rates. If consumer sentiment and spending are weak over the next few quarters, the economy will have more challenges to navigate before the stock market charges into full-blown recovery mode.