Stocks rally on Wall Street but still face sixth weekly loss