A new air of cautiousness is hanging over markets, and it could continue in the week ahead as investors navigate Turkey's currency collapse and the fallout across global markets.

On Wall Street, traders pivoted quickly from rooting for a new all-time high in the S&P 500 to playing defense as global equities sold off instead. Bonds rallied and the dollar rose to its high of the year on Friday.

"I think traders will be very careful in the next week or two. You could taste the new highs, and they pulled the rug out from under them," said Art Cashin, UBS head of floor operations. "I think Trump is going to keep the pressure on."

The ended the week 0.2 percent lower at 2,833, now just about 40 points from the January high of 2,872. Treasury yields, which move inverse to prices, fell as investors sought safety from market turbulence. The 10-year yield was at 2.86 percent late Friday after edging near 3 percent earlier in the week.

"This is a very significant move in Treasurys," said Ian Lyngen, head of U.S. rates strategy at BMO. Lyngen said the 15 basis point move showed a shift in strategy from investors, now seeking a safe haven. The move lower in yields came even with a 10-year high in core consumer inflation Friday, and auctions during the week for record amounts of 10-year notes and 30-year bonds.