Thanks.
According to that, Fed should only gain 200 points if he wins Basel, added from his previous year reaching the SF with 300 points. Where does the extra 200 pts come from (total of 3645 if he wins Basel, now at 3235)?
That's the ranking.
The race is the points that you get in 18 (19 if you qualify for the WTF) tournaments throughout ONE CALENDAR YEAR. In other words, every single player starts the year fresh with 0. No defending whatsoever involved, you just add your points to the total.
The only situation where you don't add all your points to the race is when you have played more than 18 tournaments. 18 consists of 4 slams, 8 mandatory 1000s, and 6 other tournaments. If a player has played more than 6 smaller tournaments, then only the best 6 count. This is the same to the rankings as well.
The ranking right now is from 22nd October 2012 - 21st October 2013, whereas the race consists of points from 1st January 2013 - 21st October 2013 as of today.