The Nasdaq had a weekly gain of 17.27 , or 1.2 percent , closing at 1,520.15 after gaining 30.46 yesterday .