While the market searches for direction, PepsiCo (PEP) - Get Report certainly isn't lost.

The stock rallied up 3% to $137.93 in Thursday's trading trading and hit new all-time highs in the process. PepsiCo's performance is one reason it's Real Money's Stock of the Day

Driving the stock to these record prices is the company's most recent quarterly results

Given the uncertain market we're in, it's hard to bet against PepsiCo stock as it pushes higher in a tough tape. But why does PepsiCo stock deserve to go higher, even if its valuation is stretched vs. its historical average?

The same reason Jim Cramer made the case that investors can still buy McCormick (MKC) - Get Report . The company also reported earnings this week and hit new highs despite just an OK dividend yield and a stretched valuation.

These consistent staple stocks can continue to do solid business even if the economy turns lower. So when the markets are uncertain -- like they are now -- these certain stocks tend to do well. Let's look at the charts to get a better idea about the stock.

PepsiCo is a holding in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells PEP? Learn more now.

Save 57% During Our Fall Sale. Join Jim Cramer's Action Alerts PLUS investment club to become a smarter investor. Click here to sign up and save!

Trading PepsiCo Stock

Daily chart of PepsiCo stock.

On the daily chart above, look at how vital the $134 level has been since June. In June and July, this level served as resistance, but since September, it's been support. That's an important development, particularly after this level held as firm support despite a pre-earnings shakeout on Wednesday.

As much as bulls want to see this one stay north of $138 -- the most recent short-term resistance level -- $134 is the must-hold level, at this point.

Below $138 would signal caution but not panic. However, below $134, and we could start to see a slippery slope. It would put the 50-day moving average and the 78.6% retracement as the next downside targets. Below that and the $125 level stands out.

Weekly chart of PepsiCo stock.

There it will find the 200-day moving average, the 50-week moving average and an uptrend support mark (blue line), which is highlighted prominently on the weekly chart above.

On the upside, let's see if it can move into the low-$140s. As of now, there's little reason to part ways with PepsiCo, particularly given that it continues to hold up and march higher in a poor stock environment.

This article is commentary by an independent contributor. At the time of publication, the author had no positions in the stocks mentioned.