This fast-food stock is beating McDonald's, and RBC says it's not too late to catch the rally

People pass in front of a Jack in the Box restaurant in Laguna Beach, California.
Scott Mlyn | CNBC

Jack In The Box could be set to significantly expand its footprint and drive its stock higher, according to RBC Capital Markets.

Shares of the fast-food company have gained 27% year to date, outperforming competitors McDonald's and Yum! Brands. However, the stock still is trading at a discount to its peers, according to RBC.

Analyst Christopher Carril initiated coverage of the stock with an outperform rating, saying in a note to clients on Thursday that the company's shares appear undervalued given its potential to expand across the country.