All of the major averages continued their rally on Friday, ending lengthy losing streaks.