Stocks ended a choppy trading session higher, with the S&P 500 ticking to a fresh record closing high, as market participants shook off higher-than-expected inflation data and looked ahead towards U.S. economic recovery. All three benchmarks closed in the green.

For the week, the S&P 500 posted a 0.4% gain, marking its third consecutive positive week. The Nasdaq, meanwhile, outperformed with a 1.9% gain for its fourth winning week in a row, while the Dow fell 0.8% for the week.

Here's how the market settled to close out the week:

S&P 500 Index (SPY  ): +0.20% or +8.29 points to 4,247.47

Dow Jones Industrial Average (DIA  ): +0.04% or +14.41 points to 34,480.65

Nasdaq Composite Index (QQQ  ): +0.35% or +49.09 points to 14,069.42

Bipartisan lawmakers unveil new antitrust legislation aimed at tech giants:

A bipartisan group of lawmakers in the U.S. House of Representatives unveiled new antitrust legislation on Friday, targeting the power of major technology companies like Amazon (AMZN  ), Alphabet (GOOGL  ), Apple (AAPL  ) and Facebook (FB  ).

Here's an overview of the proposals:

Ending Platform Monopolies Act plans to make it unlawful for a platform with at least 50 million monthly active U.S. users and a market capitalization over $600 billion to own or operate a business that presents a clear conflict of interest.

American Choice and Innovation Online Act would prohibit dominant platforms from giving their own products and services advances over competitors on the platform.

Platform Competition and Opportunity Act plans to shift the burden of proof in merger cases to dominant platforms to prove their acquisitions are in fact lawful, rather than the government having to prove they will lessen competition.

Augmenting Compatibility and Competition by Enabling Services Switching Act would mandate that dominate platforms maintain a certain standard of data portability and interoperability, which will make it easier for consumers to take their data with them to other platforms.

Merger Filing Fee Modernization Act plans to raise the fees companies pay to notify the Federal Trade Commision and Department of Justice Antitrust Division of large mergers with the goal of raising money for those agencies.

Consumer sentiment rises in early June on positive economic recovery outlooks:

Consumer sentiment rose in early June after declining in May, as consumers continue to expect a strong economic rebound in the coming months. The University of Michigan's Consumer Sentiment Index preliminary reading for June climbed to 86.4 from 82.9 in May, rising above consensus economist expectations for an increase to 84.2.

"The early June gain was mainly among middle and upper income households and for further economic prospects rather than current conditions," Richard Curtain, chief economy for the Surveys of Consumers, said in a press statement. "Stronger growth in the national economy was anticipated, with an all-time record number of consumers anticipating a net decline in unemployment. Rising inflation remained a top concern of consumers, although the expected rate of inflation declined in early June."

Here's how the market started trading after opening bell:

S&P 500 Index: +0.13% or +5.42 points to 4,244.60

Dow Jones Industrial Average: +0.23% or +78.03 points to 34,544.27

Nasdaq Composite Index: +0.06% or +8.92 points to 14,029.25