Stocks ended a rough week with slight gains Friday after Libyan government forces declared a cease-fire and a group of the world's seven largest countries announced a plan to bring the yen down from historic highs. Financial stocks rose after JPMorgan and other large banks increased their dividends.