Hershey has had a strong 2022, and that momentum could be carried into the new year, according to UBS. Analyst Cody Ross upgraded the stock to buy from neutral and increased his price target to $269 from $244. The new target implies upside of 13.7% from Wednesday's close. He said the company will remain in a "beat and raise cycle" through 2025 – even as investors grow increasingly concerned about packaged food companies' abilities to increase earnings as headwinds linger. "Our [near-term] confidence is underpinned by wrap-around price benefits in 2023 coupled with capacity additions, while our [long-term] confidence is driven by a more accommodative operating environment in Confection and a long runway of growth for sizable Snacks business," Ross said in a note Wednesday. Hershey's organic sales are expected to grow by 12% this year, while earnings per share are forecast to expand by 16%. That would make it the highest earnings growth in UBS' coverage this year, according to Ross. The company is expected to see slimmer gains continuing despite a souring industry outlook. By Ross' estimate, Hershey should deliver 9% organic sales growth in 2023 before coming down to a 4% increase in 2024 and 2025. Earnings per-share is expected to increase 14% in 2023, followed by 9% annual adds in the following two years. Still, he said that performance would make it a bright spot within the packaged food sector as a whole in 2023. Ross said investors are particularly worried about the industry due to the possibility of continued headwinds from interest expense and pension income, foreign exchange, inflation, and the supply chain. There's also an abnormally low level of visibility into the industry around this time, he said. Hershey rose 1.8% in premarket trading. The stock has outperformed this year, rising 22.3%, while the broader market has struggled. — CNBC's Michael Bloom contributed to this report.