HERZOGENAURACH, Germany (Reuters) - Shares in German sportswear firm Adidas ADSGn.DE soared on Wednesday after it announced a big buyback, gave an upbeat outlook for 2018 and lifted its 2020 profitability forecast, while conceding it would be hard to match rival Nike's margins.

Adidas said late on Tuesday it plans to buy back up to 3 billion euros ($3.7 billion) of its shares, or almost 9 percent of its share capital, by 2021 on top of a higher-than-expected 2017 dividend of 2.60 euros per share.

The company’s online sales leaped 57 percent in 2017 to 1.5 billion euros, or about 7 percent of sales.

The company's shares, which had fallen 15 percent in the past six months as sales growth cooled, were up 10 percent at 1206 GMT, the top gainer on Germany's blue-chip index .GDAX.

“(20)18 will be a good year for us...ensuring we get the right balance of market share growth and margin growth...to get us closer to where some of our competitors are,” Chief Executive Kasper Rorsted told a news conference.

After a tough few years, Adidas has returned to form under Rorsted, taking market share from bigger rival Nike NKE.N in North America and selling its underperforming TaylorMade golf and CCM Hockey brands.

Since taking over in 2016, Rorsted has put a sharper focus on improving profitability, which still lags Nike.

Slideshow ( 5 images )

Finance chief Harm Ohlmeyer, who used to lead the Adidas ecommerce business, told the news conference it would be hard to close the gap completely given Nike’s dominance of the U.S. market, but he said online sales were helping margins.

Rosted said there was still huge potential to increase online sales further given that ecommerce accounts for about 15 to 20 percent of sales for the global sporting goods market.

Adidas forecast currency-neutral sales would rise around 10 percent in 2018, with an operating margin of between 10.3 and 10.5 percent, up from 9.8 percent in 2017. Nike reported an operating margin of 13.8 percent for its 2016/17 fiscal year.

WORLD CUP BOOST

Adidas expects a boost from the 2018 soccer World Cup, although Rorsted noted that the event has less impact than before as soccer now accounts for less than 10 percent of sales.

He said the company had no plans to boycott the tournament despite rising political tension between the West and Russia: “Isolation is not the best way to resolution,” he said.

Slideshow ( 5 images )

Adidas lifted its forecast for the operating margin to hit 11.5 percent by 2020, up from a previous forecast of 11 percent. Rorsted highlighted steps to improve efficiency, such as more global purchasing, shared business services and fewer products.

Fourth-quarter sales rose 12 percent to 5.06 billion euros, missing analyst forecasts for 5.13 billion as sales in Russia and at its Reebok brand slipped.

It reported operating profit more than tripled to 132 million euros, beating analyst forecasts for 61 million, but recorded a net loss of 41 million after a tax impact of 76 million due to changes in the U.S. tax code.

Rorsted said a turnaround plan he launched for loss-making Reebok was bearing fruit, with the brand expected to return to growth in North America in 2018.

“While the slowdown in organic growth is going to raise some questions today, confidence on the profitability progression implies a continued superior growth potential,” said Morgan Stanley analysts, who rate the stock “equal-weight”.

($1 = 0.8063 euros)