Roger Federer insists tennis is in his DNA and that he has no intention of quitting after his worst season came to a downbeat conclusion with a semi-final defeat against Rafael Nadal at the ATP World Tour Finals.

Federer has endured a dismal campaign marred by a series of shock defeats and the 17-time Grand Slam champion was unable to finish on a high note as world number one Nadal sent him crashing out of the season-ending event with a 7-5 6-3 victory yesterday.

After reigning over men’s tennis for the best part of a decade, the 32-year-old is undeniably a fading force, prompting some to suggest he may consider hanging up his racquet to focus on life as a father of twin daughters.

But Federer is adamant that is not an option just yet because his love of the sport remains too strong.

“For me, it’s pretty simple: this is what I used to do as a little boy. It’s something that always is there in your DNA,” Federer said.

“Clearly today it’s different than when I was 12 years old, but it’s just something I enjoy doing.

“…Why just walk away from it because I have many other things to do in my life than play tennis, but because I can still choose, I pick to play.

“As long as I have this choice, I’ll keep on playing.”

Federer, troubled by a back injury in the first half of the campaign, claims his lack of success over the last 11 months is more down to his body failing him than a lack of hunger.

“Considering the back issues I’ve had, I’m pleased that I’m pain-free for a long period of time now with a lot of tennis,” he said.

“That’s definitely going to give me confidence physically and mentally.

“Just beating two top-10 players recently (Richard Gasquet and Juan Martin del Potro) is a good thing for me after not having beaten any for almost seven or eight months,” Federer said.

For Federer, the joy of competing against the best keeps him coming back for more, but in 2013 he failed to reach a Grand Slam final for the first time since 2002 and won only a solitary title in Halle as his ranking slumped to seventh in the world — his lowest placing for 11 years.

His decline has been impossible to hide even at the venues where he has traditionally been regarded as virtually unbeatable.

Federer arrived at Wimbledon as defending champion and exited humbled by a defeat against world number 116 Sergiy Stakhovsky.

Then at the Tour Finals, where he has been the winner six times and a finalist for the last three years, Federer suffered a first ever loss to Nadal in an indoor tournament and a 22nd career defeat in 32 meetings with the Spaniard.

But still the Swiss star sounded a defiant note as he claimed he would take encouragement from the way he finished the year with an appearance in the Basel final and runs to the last four in Paris and London.

“I’m more positive now looking ahead than I would have been a few months ago where I wasn’t quite sure what to expect after the US Open,” Federer said.

“I think something good is possible for next year. It was a stronger finish than I thought it was going to be in Basel, Paris and London.

“I’m back confident and excited going into the off-season and starting again next year.

“The rankings are secondary for me. I need to make sure I stay competitive and can hang with the best.

“Clearly the Grand Slams are going to be part of my highlights in 2014 and I’m hoping to make sure I play my best there.”