Over the last 12 months, Macy's (M -2.04%) has outpaced the S&P 500, rising 31%. The company has posted consistent sales growth, with the exception of this year's first quarter. On the other hand, margins have seen a slight dip, suggesting that the company could be doing more to keep its head up and push earnings even higher. There are no certainties in the market, but here are three things that could help lift Macy's even higher.

1. Margins could rise in the back half of 2014

Gross margin in Macy's first half was level with 2014, but the trend is heading down. Second-quarter gross margin was down to 41.4% from 41.8% in the previous year. It's part of a longer decline in gross margin that Macy's -- and the market -- has forecast into the second half of this year. Right now, management is expecting "gross margin rate to be flat to down slightly for the season, as well as for the year," according to its second-quarter earnings call.  

Macy's has been a conservative forecaster recently. After a similarly downbeat forecast last year, the company went on to have a solid end to the year, and earned a boost from the market when annual results were announced. That's not to say that the same thing is happening here, but it's important to know that Macy's has been taking a conservative line in its forecasting.

M Gross Profit Margin (TTM) Chart

M Gross Profit Margin (TTM) data by YCharts.

Looking further back, the chart above shows that Macy's gross margin has been on a decline for the last few years. Since 2011, the company has lost almost a full point. That's bad news for the past, but a growth possibility for the future. If Macy's can claw some of that back, earnings per share could see a nice boost.

2. Omnichannel investment is starting to pay off

Macy's has been putting a great deal of its eggs in the omnichannel basket. The company is trying to maintain its leadership role in omnichannel, offering customers a variety of ways to shop and ship. Management is looking at omnichannel sales as a sales opportunity, but also as a way to recoup some of that gross margin. CFO Karen Hoguet said on the earnings call that omnichannel is "a huge opportunity across the whole P&L and balance sheet, and very exciting."

Those savings are going to come from better inventory management, as Macy's allows customers to buy online and pick up in store or to buy online and then have their products shipped from a local store. That cuts down on excess inventory and reduces the need to run clearance events, pushing gross margin up.

That's all good news, as the company is sinking a decent bit of cash into its omnichannel strategy. While management isn't providing a bottom-line cost, the company has repeatedly said that cost savings have been offset by spending on omnichannel.

3. Macy's is seeking to be the go-to location for millennials

Millennials are an odd little group. The boundaries of their definition seem to be in flux, depending on who's talking. However, there's no denying that they take up a lot of society's focus. According to advertising firm Barkley, which defines millennials as those born between 1977 and 1995, they now account for a quarter of the U.S. population and over $200 billion in yearly purchasing power.

Macy's has made the group one of its target audiences, launching a series of new lines to target the young, tech-savvy, working class. One of the company's biggest store strategies is its localization plan. This is a system that tailors the layout and inventory of a store to appeal to local shoppers, allowing Macy's to focus on millennials in populations dense with the generation.

Given the buying power of the group and the fact that Macy's is focusing so tightly on it, there is huge upside for the business here. Think back to the success that Target had 10 years ago when it suddenly turned its eye toward chic and slick design. That's the kind of growth that Macy's could be looking at now.

The bottom line
There are still a lot of pieces up in the air for Macy's. Gross margin strength will depend on back-to-school and holiday success. Omnichannel sales are still gearing up and require more investment. Fashion is fickle, though, and millenial shoppers are no different -- it'll take work to keep them hooked. If these things go wrong, Macy's path to glory could be blocked. There's still a lot of work left, but the payoff for success could be huge.