The Dow and S&P inched up roughly a tenth of a percent, but the Nasdaq closed flat.

Despite a steep sell-off on Monday sparked by fears of a default by developer China Evergrande, the markets recovered to eke out small gains for the week.

Evergrande missed its key interest payment Thursday, but American investors took the news in stride Friday, which surprised TD Ameritrade Chief Market Strategist JJ Kinahan.

"It really is amazing. Again, going back to what I said earlier, it shows the power of the Fed at everything. That being said, I think as an investor, you can't look at what went on with China Evergrande and just say, 'Oh Monday. It's over. Time to move on.'"

Nike was the biggest drag on the Dow and S&P. The sportswear maker's shares dropped more than 6%. Nike warned of delays during the holiday shopping season, blaming a supply chain crunch. Investors also took down shares of athletic shoe retailer Foot Locker, which fell 7%.

China's central bank banned the trading and mining of cryptocurrencies. That yanked down the price of bitcoin and other cryptos, as well as digital currency-related companies such as Coinbase Global, MicroStrategy, and Riot Blockchain.