Major stock indexes closed sharply higher Friday, but nevertheless posted weekly losses on concerns about AI spending and ...