Stocks showed a lack of direction throughout much of the trading day on Friday but managed to end the session moderately higher. The Dow and the S&P 500 reached nearly two-month closing highs, while the Nasdaq rose to its best levels in a month.