Roger Federer revelled in his "amazing" year as the 19-time grand slam champion waved goodbye to the 2017 season following his shock defeat to David Goffin at the ATP Finals.

There was an upset in London on Saturday as world number two and 36-year-old Federer suffered a 2-6 6-3 6-4 semi-final loss against Goffin at O2 Arena.

Federer was seeking a seventh title at the season-ending event and he looked on track to keep that hope alive after racing through the opening set in 33 minutes, but the Swiss star was denied by the rallying Goffin, who mounted a sensational comeback to reach the decider.

Despite the loss, Federer was in a positive frame of mind as he reflected on his renaissance following an injury-ravaged 2016, which included two grand slam titles at the Australian Open and Wimbledon, as well as three ATP 1000 trophies.

"It's been an amazing year for me," Federer said. "I've been so happy that I was playing at this level from the beginning till basically the end, till today. So it's been great. Really enjoyed myself in the process.

"Looking ahead [to 2018], look, clearly the build-up is not going to be six months like it was last time around.

"It's not going to be six weeks of tennis. It's just going to be two, three weeks. It's going to be short. But I did that 15 years previously, so I know how to handle the build-up."

"I'm actually very relieved that I was able to finish strong ... It shows that things are in the past now. It's good to know that I can bounce back, you know, and get my confidence back," he continued.

"So considering how last year went, this year was perfect."

While Federer rediscovered his form and fitness, rivals Andy Murray, Novak Djokovic and Stan Wawrinka were sidelined towards the end of the year – the trio deciding to shut down their campaigns in bids to recover before the opening major in Melbourne in January.

And Federer is braced for a difficult 2018, adding: "We all had to take time off. I didn't choose to take the time off last year. You make me look like a genius sometimes. You take time off, you come back, you're good again. That's not how it goes.

"I expect obviously from the likes who have been extremely high up in the rankings, who have won slams, like Stan, Andy and Novak, of course I expect greatness from them. I wouldn't be surprised if it worked out for them as well like it worked out for me and Rafael [Nadal]."