Stocks extend gains into a fourth day; Yellen stresses Fed continuity