Sensex rockets 521 points to pull off biggest gain in 5 months