The S & P 500 ended the week with a modest gain, but some names could soon be due for a pullback, according to one market metric. Even though it was an overall positive week for the market, with the broad market index posting a weekly gain of 0.6%, trepidation rose as the artificial intelligence-bolstered rally finally showed some signs of weakness. Shares of AI darling Nvidia fell 4% on the week, ringing alarm bells that the tech-dominated market might finally be overextended. To that end, CNBC Pro used its stock screener tool to find the most overbought and oversold names on Wall Street, employing the 14-day relative strength index, or RSI, as a metric. Stocks that have a 14-day RSI above 70 are said to be overbought, indicating that shares might soon be due for a pullback. On the other hand, a reading below 30 corresponds to an oversold stock, or one with a potential rebound on the horizon. Microsoft was among the most overbought stocks this week, with an RSI of 74. The tech giant is a beneficiary of artificial intelligence with Jefferies dubbing it earlier this month a “Top AI Pick Going for AI Gold, Not Silver.” “MSFT is proud of how it has been able to push the throttle on AI investments setting themselves up to win the long term opportunity while still delivering operating leverage the past few years,” wrote Jefferies analyst Brent Thill in a June 13 report. Even as shares are up nearly 20% this year, consensus price targets from LSEG call for nearly 9% of upside. Corning , a manufacturer of specialty glass for mobile phones and computers, has surged 31% in 2024. But its RSI reading of 74 suggests the stock may be due for a slide. Consensus price targets suggest that a nearly 4% decline is in the cards, per LSEG. Earlier this month, Morgan Stanley analyst Meta Marshall trimmed her rating on Corning to equal weight from overweight, but she raised her price target to $38 from $35. “We like GLW’s positioning to participate in many mega trends in the coming years, but think current valuation captures the bulk of expected [near-term] upside to estimates and are moving away from our [overweight] given our view of a more balanced risk-reward,” she wrote on June 13 On the other hand, American Airlines , with an RSI of 29, is among one of Wall Street’s most oversold stocks. Shares have tumbled almost 19% year to date. The stock plummeted more than 13% in a single day last month after the U.S. carrier slashed its second-quarter earnings and revenue guidance , marking the stock’s biggest daily drop since the early days of the Covid pandemic. At the same time, the airline announced that it had let go of its chief commercial officer, Vasu Raja. Despite these setbacks, Morgan Stanley said earlier this month the stock has a bright future . Analyst price targets suggest more than 37% upside, per LSEG. “We had called AAL possibly the cleanest domestic story in Airlines about a month ago, but following the big 2Q guidance cut and announced mgmt. changes last week, AAL moves firmly into the ‘show-me’ penalty box, for at least the short term. However, we believe that numbers and positioning have reset enough and the stock is cheap enough to make the risk-reward look attractive and remain OW,” Morgan Stanley analyst Ravi Shanker wrote. With a RSI of about 19, real estate data firm CoStar Group was also among the most oversold stocks. Earlier this week, JMP Securities reiterated its market outperform rating on the name, but lifted its price target to $110. This implies that shares of CoStar could rise nearly 49% from their Friday closing price. JMP analyst Nicholas Jones stated that a meeting with the company’s investor relations team left him feeling more bullish. “Third-party data and web scraped data appears to be creating noise around prevailing trends at Homes.com, from the company’s perspective, and has pressured share price. We do not view the call as thesis changing and believe CSGP has ample profitability to continue investing in its Homes.com business,” he wrote. CoStar has slipped 15% in 2024, but average analyst consensus implies shares could rally 42% going forward, according to LSEG. — CNBC’s Fred Imbert contributed to this report.