Novak Djokovic is certainly on a roll. After battling injuries for nearly two years, the Serb is backing to what he does best — win titles at will.

The 31-year-old extended his unbeaten run to 18 matches en route to winning a record-setting fourth title at Shanghai Masters on Sunday.

Djokovic also vaulted past Roger Federer into the second spot on ATP men's singles rankings. He is just 225 points behind numero uno Rafael Nadal, who is recovering from a knee injury he had suffered during the semi-final of US Open.

Having completed a remarkable comeback that not many, including himself, wouldn't have foreseen, Djokovic has now set his sights on the year-ending number one spot, which he had last achieved in 2015.

"I couldn't ask for a better scenario. I am very close to Rafael Nadal in the rankings and I have put myself in a very good position for the last period of the year," Djokovic told the ATP after beating Borna Coric in Sunday's Shanghai Masters final.

"We will see I am planning to play Paris and London and maybe another tournament before then. The game is working really well and ending a year as number one will definitely be the biggest achievement of this year."

Novak Djokovic
Novak Djokovic did not drop a set en route to glory in Shanghai.WANG ZHAO/AFP/Getty Images

Djokovic was ranked as low as world number 22 in June after a series of disappointing results. Struggling with an elbow issue that had kept him out of action throughout the second half of 2017, the Serb conceded he was clueless as to how to return to winning ways.

The 14-time Grand Slam champion's frustration was evidently boiling over as he refused to cooperate with journalists after his quarter-final defeat at French Open 2018.

However, Djokovic fortunes changed once he stepped on grass. The veteran turned back the clock and reached the final of Fever-Tree Championships before rallying against the odds to win the Wimbledon title.

Since then, he hasn't looked back and has stitched an envious winning streak that includes the US Open crown and the Cincinnati Masters title.

Last 3-4 months have been terrific: Djokovic

Novak Djokovic
Novak Djokoivc won his fourth Shanghai Masters title in 2018.WANG ZHAO/AFP/Getty Images

The rejuvenated hunger was evident in the way he demolished opponents in Shanghai. Djokovic did not drop a set, beating the likes of Kevin Anderson, Alexander Zverev and Coric en route to the top step of the podium.

"It's phenomenal. I'm very proud of it. Obviously the last three, four months have been terrific for me. Not many holes in the game in general, especially this week. Everything worked perfectly," Djokovic said.

The Serb is expected to return to action at the season's final Masters 1000 tournament in Paris, scheduled between October 29 and November 4 after which he will be featuring in the year-ending ATP Finals in London.