DELAFIELD, Wis. (Stockpickr) -- Large market declines happen, and they can be downright frightening -- but that doesn't mean investors need to run away and hide.

In a volatile environment, your defensive strategy might be to focus on the safety of dividend yields or to turn to safe-haven sectors that can provide protection in rough tapes, such as utilities or consumer staples. Today I'm taking a look at four defensive stocks to consider as we ride out the volatility.

Wal-Mart

Discount or online retailers can be a great place to seek cover in tough markets. Wal-Mart Stores (WMT - Get Report) tends to shine in downturns because its pricing is so competitive for everyday products and goods, and it offers a one-stop-shopping experience. Wal-Mart also sports a 2.5% dividend, so investors can get paid and potentially see share price appreciation in a defensive market.

Shares of Wal-Mart are more or less flat in 2014, but the stock is currently trending above both its 50-day and 200-day moving averages, so the overall trend still remains bullish. Investors can look to buy shares of WMT off a pullback back toward those key moving averages and then add to their positions if it takes out some key overhead resistance levels at $79.82 to its 52-week high at $81.37 a share.

PepsiCo

Another defensive stock to consider if the market continues to trend lower is PepsiCo (PEP - Get Report) , which  operates as a food and beverage company worldwide. This stock has been trending decent so far in 2014, with shares up 13% so far on the year.

No matter where the economy goes from here, consumers are still going to need to eat. PepsiCo sits in the sweet spot for consumer goods products since the company offers a variety of popular comfort food products, including such brands as Doritos, Tostitos, Cheetos, Gatorade, Pepsi and Mountain Dew, as well as healthier products such as Aquafina water, Naked juice and Quaker oatmeal, so they'll win on both ends of the food spectrum in tough times. That's diversification inside of a defense play that makes sense.

Shares of PepsiCo are currently trading just one point off its 52-week high of $96.22 a share, so investors might not want to chase the price up here. A better approach would to wait for a pullback in the short-term that takes the stock closer to its 50-day moving average of $91.90 a share before you look to get long this defensive play.

The Pantry

Another non-cyclical consumer goods and services stocks that might work well right now is The Pantry (PTRY) , an independently operated convenience store chain in the southeastern part of the U.S. Cheaper gasoline prices will be a benefit to The Pantry since after consumers are done fueling up, they're likely to spend more inside their convenience stores on snacks and other goods. With such companies, the margins are usually much better for the goods sold inside the store than the gasoline sold outside.

The Pantry doesn't pay a dividend, but this stock should work well in a challenging market. This stock is up a hearty 41% so far in 2014, so investors might want to wait for shares of PTRY to pull back towards the 50-day moving average of $20.75 a share before they look to load up on this defensive play. If that pullback does happen, make sure the stock holds that level or that it holds some more key near-term support levels at around $20 to $19.73 a share before you buy blindly.

Other defensive non-cyclical consumer goods and services stocks that investors can consider include Walgreen (WAG) , Craft Brew Alliance (BREW) , Coca-Cola (KO) , Dr Pepper Snapple Group (DPS) and Monster Beverage (MNST) . These companies offer products and services that will be in high demand no matter how bad the economy gets. Consumers don't stop buying energy drinks or soda no matter how rough Wall Street gets, nor do they stop buying their prescription drugs.

Starbucks

Another potential defense play for a tough stock market and a tough economic environment is Starbucks (SBUX - Get Report) , which operates as a roaster, marketer and retailer of specialty coffee worldwide. This stock hasn't done very much in 2014, with shares off modestly by 3.7%, but that could be about to change dramatically if the markets continue to slide lower and Wall Street realizes that consumers don't ditch their coffee addiction no matter how rough things get.

Piper Jaffray recently published a spending survey that showed that Starbuck was a favorite restaurant chain among U.S. teens, along with Yum!'s (YUM) Taco Bell, Chipotle (CMG) and McDonald's (MCD) . Starbucks also sports a 1.4% dividend yield, so investors can collect some income as they potentially profit off of America's coffee addiction.

Investors can look to buy shares of SBUX as long as it's trending above some key near-term support levels at $73.63 to $73 share, or even down near $72 a share. As long as those levels hold in the near-term, then investors can look to get long shares of SBUX and potentially build their positions once the stock clears its 50-day moving average of $76.40 a share.

Other coffee players that investors might want to consider for a defensive stock market environment are Keurig Green Mountain (GMCR) and Dunkin' Brands Group (DNKN - Get Report) . Both of these companies pay out dividends (GMCR sports a 1% dividend yield and DNKN a 2.1% yield), and both should do well no matter how bad things get, since consumers will continue to want their coffee fix.

Shares of Keurig Green Mountain are a bit extended here, with the stock up 85% so far in 2014 and above its 50-day moving average of $128.07 a share. Investors might want to wait for some weakness before they initiate a position, maybe back toward $135 or its 50-day moving average.

Shares of Dunkin' Brands Group have some strong support at around $43.60 to $43.65 a share. Investors can look to buy this stock as long as it's trending above those support levels or as a last resort above near-term support at $42 a share. I would look to add to any long positions once DNKN takes out its 200-day moving average of $46.12 a share and then above some more key near-term overhead resistance at $47.94 a share.

To see more defensive stocks for a down market, check out the Defensive Stocks to Buy portfolio on Stockpickr.

-- Written by Roberto Pedone in Delafield, Wis.

Follow Stockpickr on Twitter and become a fan on Facebook.

At the time of publication, author had no positions in stocks mentioned. Roberto Pedone, based out of Delafield, Wis., is an independent trader who focuses on technical analysis for small- and large-cap stocks, options, futures, commodities and currencies. Roberto studied international business at the Milwaukee School of Engineering, and he spent a year overseas studying business in Lubeck, Germany. His work has appeared on financial outlets including CNBC.com and Forbes.com. You can follow Pedone on Twitter at www.twitter.com/zerosum24 or @zerosum24.