US stock indexes rose during trading on Friday after a weak opening due to weak economic data, receiving a boost from the US Supreme Court's decision to overturn tariffs imposed by President Donald Trump.

A majority of U.S. Supreme Court justices agreed today that the tariffs imposed by Trump under the International Emergency Economic Powers Act were illegal, saying the president has no right to impose tariffs on imports.

In response, Trump announced that he intends to impose a global tariff of 10% in addition to the tariffs that were not overturned in the court ruling, and said he would consider reimposing alternative tariffs based on other legislation.

Markets have absorbed the fourth-quarter US GDP data, which showed growth of 1.4%, significantly lower than the 2.5% forecast in the Dow Jones survey.

Aditya Bhavi, chief U.S. economist at Bank of America, said growth would have been around 2.5% to 2.6% if it weren't for the impact of the government shutdown.

Moreover, inflation data was even more worrying. The core personal consumption expenditures price index, the Federal Reserve’s preferred measure, registered an annual rate of 3% in December, in line with expectations but still well above the central bank’s 2% target.

Regarding the Federal Reserve's policy, markets still largely expect the central bank's first interest rate cut this year to come in June, according to the CME Group's Fidwatch tool.

At the close of the session, the Dow Jones Industrial Average rose 0.5% (231 points) to 49,626 points, posting weekly gains of 0.25%, reaching a high of 49,712 points and a low of 49,158 points.

The broader S&P 500 index rose 0.7% (47 points) to 6,909, posting a 1% gain for the week, hitting a high of 6,915 and a low of 6,836.

The Nasdaq index rose 0.9% (equivalent to 203 points) to 22,886 points, and the index's weekly gains amounted to 1.5%, while the highest level reached 22,949 points and the lowest level reached 22,539 points.