Stocks rose Friday, putting major averages on track for a winning week despite earlier weakness, as optimism surrounding big tech players helped offset ongoing concerns over President Donald Trump's tariffs.

The Dow Jones Industrial Average (DIA  ) climbed over 200 points Friday to settle at 44,175.61, recovering from its previous session losses, while the S&P 500 Index (SPY  ) also added about 0.8% to close at 6,389.45. The tech-heavy Nasdaq Composite (QQQ  ) continued to outperform the broader market, rising nearly 1% to end at 21,450.02 on Friday after Trump announced semiconductor companies "building in the United States" will be exempt from his 100% tariff on imported microchips earlier this week.

All three major averages are on course to end the week in positive territory, with the Nasdaq leading the pack with gains of about 3.9%. The Dow and S&P 500 are also 1.4% and 2.4% higher for the week, respectively.

Investors had little direction to build on this week, as economic reports were sparse and quarterly earnings from major companies failed to change the dominate sentiment on Wall Street: Trump's tariffs at best will have negative, but short-term, impact on the economy and at worst will accelerate already declining macroeconomic conditions. Either way, uncertainties are widespread among institutional and retail investors alike.

Those uncertain outlooks have made safe havens like gold one of the hottest commodities, boosted further by increased expectations that the Federal Reserve will cut interest rates at its upcoming policy meeting in September -- traders are pricing in a more than 89% chance the central bank will issue a 25 basis point reduction, according to CME Group's FedWatch tool.

The VanEck Gold Miners ETF (GDX  ) reached its highest level in more than a decade on Friday after the Financial Times reported that the Trump administration had issued tariffs on imports of 1-kg and 100-ounce gold bars, citing a July 31 Customers and Border Protection letter.

Trump on Friday warned U.S. courts from blocking his tariff policies, starting in a post on his Truth Social platform: "If a Radical Left Court ruled against us at this late date, in an attempt to bring down or disturb the largest amount of money, wealth creation and influence the U.S.A. has ever seen, it would be impossible to ever recover, or pay back, these massive sums of money and honor."

"If they were going to rule against the wealth, strength, and power of America, they should have done so LONG AGO, at the beginning of the case, where our entire Country, while never having a chance at this kind of GREATNESS again, would not have been put in 1929 style jeopardy," he added, referring to the stock market crash that is widely considered as being one of the major causes of the Great Depression of the 1930s. "There is no way America could recover from such a judicial tragedy."

Major legal challenges against Trump's tariff policies claim they may exceed the president's emergency powers.

Elsewhere, Intel (INTC  ) CEO Lip-Bu Tan responded to Trump's call for his resignation in a memo to employees late Thursday, stating that he has "always operated within the highest legal and ethical standards" throughout his career and supports Trump's policies on "advancing U.S. national and economic security."

Trump had accused Tan of being "highly CONFLICTED," a criticism that Bernstein analyst Stacy Rasgon disagreed with in a Thursday note to clients, but did raise that Tan's past connections to China are an "increasingly bad look."

"Unfortunately, unlike other tech CEOs Lip-Bu does not appear to have cultivated the kind of personal relationship with Trump that would help to assuage his ire," Rasgon wrote of the situation.

Looking ahead, market participants are in for a busier week full of inflation data, Fedspeak, retail sales numbers, and a consumer sentiment reading next week -- all of which are set to drive market moves as stocks remain near all-time highs heading into the typically slower August-September trading season.