There's nothing scary about the stock market this Halloween. The S&P 500 closed at a record high Wednesday on the back of solid corporate earnings, better-than-expected economic data, and an interest rate cut by the Federal Reserve.

In fact, the spooky holiday has a history of treating investors. The S&P 500 rises an average of 0.19% on Halloween, the Dow Jones Industrial Average (DJIA) gains an average of 0.15%, and the Nasdaq Composite Index posts an average jump of 0.43%, according to Dow Jones Market Data, cited by Barron's.

Moreover, the National Retail Federation's annual survey conducted by Prosper Insights & Analytics reveals that American consumers are expected to spend $2.6 billion on candy, or more than $25 on average, per USA Today. Of the survey participants, 68% said they plan to celebrate by handing out candy.

Far from frightening traders, these three candy stocks sit nicely positioned to benefit from a Halloween-treats spending spree. Below, we take a more detailed look at each company as well as point out several sweet trading ideas.

The Hershey Company (HSY)

The Hershey Company (HSY) manufactures and sells confectionery products, including chocolate, gum, syrups, and spreads. Trick or treaters may find Reese's Peanut Butter Cups, Kit Kats, Twizzlers, and Ice Breakers among their Hershey's goodies. The Pennsylvania-based chocolatier continued its expansion into the snack business this year with its acquisition of protein bar maker One Brands for $397 million. Hershey's third quarter (Q3) adjusted earnings per share came in at $1.61, in line with the Street expectation. On the sales front, revenues for the period of $2.1 billion grew by 2.6% from the year-ago quarter. Hershey stock has a market capitalization of $30.50 billion, offers a 2.15% dividend yield, and is trading nearly 40% higher this year as of Halloween 2019.

The candy company's shares trended sharply higher between February and August, with pullbacks remaining well above the 50-day simple moving average (SMA). Since setting a 52-week high in early September, the stock has retraced within a descending channel. Price found support from the pattern's lower trendline in Tuesday's trading session and appears poised to test the channel's upper trendline in the coming days – an area that traders could place a take-profit order. Alternatively, traders could look to exit near the previously mentioned 52-week high at $162.20. Think about cutting losses if price reverses beneath this month's swing low at $140.49.

Chart depicting the share price of The Hershey Company (HSY)

Tootsie Roll Industries, Inc. (TR)

Tootsie Roll Industries, Inc. (TR) manufactures and markets confectionery products primarily in the United States, Canada, and Mexico. Don't be surprised to see the $2.31 billion company's lineup of popular candies, such as the Tootsie Roll, Caramel Apple Pops, Charms, and Razzles, make their way into Halloween baskets tonight. The 123-year-old confectionery maker is one of only 20 that have increased dividends every year for the past half century, making it a possible safety play if the global economy slows in 2020. Currently, the stock yields just above 1%. Tootsie Roll recently reported a 3Q profit of 46 cents per share on revenue of $181.9 million. The candy stock has returned 3.47% year to date (YTD) as of Oct. 31, 2019.

Tootsie Roll shares have oscillated within an orderly descending channel over the past six months. Throughout October, the stock has pulled back to the pattern's lower trendline, providing a suitable entry point for active traders. Furthermore, the moving average convergence divergence (MACD) line is about to generate a buy signal by crossing above its signal line. Those who take a trade should look to book profits on a move to the channel's top trendline at $37 and limit downside with a stop-loss order placed somewhere below $33.

Chart depicting the share price of Tootsie Roll Industries, Inc. (TR)

Rocky Mountain Chocolate Factory, Inc. (RMCF)

With a market cap of $53.90 million, Rocky Mountain Chocolate Factory, Inc. (RMCF) operates as a manufacturer and franchisor of chocolate candies and confectionery products in roughly 360 locations. Its offerings include Halloween favorites such as clusters, caramels, candied apples, mints, truffles, and molded chocolates – ideal treats to hand out for those who don't have a bag of tricks. The Durango, Colorado-based chocolate company posted earnings per share (EPS) of 15 cents for the September quarter, while revenue came in at $7.39 million. As of Oct. 31, 2019, Rocky Mountain stock has gained 9.77% YTD. More impressively, the firm pays a 5.34% dividend yield.

Rocky Mountain's share price has oscillated within a symmetrical triangle since the beginning of May, helping to establish clear support and resistance levels. Over the past three weeks, the stock has fallen to $9 – an area that should find buyers near the triangle pattern's lower trendline and 200-day SMA. Also, the relative strength index (RSI) indicates near oversold conditions, which may trigger a tradable upside bounce. In terms of trade management, consider positioning a stop order below $8.80 and targeting a move to either the triangle's upper trendline at $9.45 or the 2019 high at $9.65.

Chart depicting the share price of Rocky Mountain Chocolate Factory, Inc. (RMCF)