The past few weeks have come close to wiping out all the gains of the past year. Opening your brokerage page these days probably comes with some teeth-gnashing as you tally up the recent losses. Conversely, if you have a wish list and some cash to deploy into new investments, today looks like a much more attractive time to buy than a few months ago. 

There are lots of stocks at or near the bottom of their 52-week trading range, but let's focus on three that likely have investors' attention: oil and gas pipeline specialist Magellan Midstream Partners (NYSE:MMP), lithium miner Sociedad Química y Minera de Chile (NYSE:SQM), and investment bank Goldman Sachs (NYSE:GS). Here's why investors have been flocking away from these stocks and whether you should consider adding them to your portfolio now.

Stock index superimposed over world map and spreadsheet.

Image source: Getty Images.

Business has been good, but the stock hasn't

Magellan Midstream Partners operates in the highest-demand part of the North American oil and gas industry today: pipelines and infrastructure. Shale drilling has unlocked unfathomable amounts of crude oil and natural gas, and has filled pipelines to capacity. The issue has become so acute that domestic crude has been trading at significant discounts to international benchmark prices. 

The investment opportunities in the pipeline business are some of the best they have been in decades, but Wall Street hasn't treated Magellan Midstream Partners' stock as such. Even though the company has raised guidance and plans to invest in a new suite of projects to move oil across America and overseas, the stock trades close to its 52-week low and sports a distribution yield of 6.2%, its highest level since the beginning of this decade.

One reason that investors could be discouraged with this stock is that management intends to grow its payout by 5% to 8% annually for the next couple of years. That is well below the 12% annual rate it has posted since going public in 2001. It is keeping its payout growth low now because management wants to plow that excess cash into these new growth projects, which should help to support better payout rates down the road. This kind of long-term thinking is what you want to see in a pipeline company, and this recent slide makes Magellan's stock look compelling.

Cheaper, but not necessarily cheap

Lithium stocks were a Wall Street darling up until this most recent price crash. Analysts and investors poring over electric vehicles and battery storage projections concluded that we needed a lot more lithium and bid up lithium stocks to incredible highs at the end of 2017. Then, as has been the case with commodities for decades, companies started coming out of the woodwork to build lithium mines or grow production at existing ones. In less than 12 months, Wall Street went from fearing a supply shortage to seeing a glut of production hitting the market. As a result, shares of Sociedad Química y Minera de Chile (SQM for short) are down about 28% year to date.

Some may be attracted to SQM because it is the world's second-largest lithium miner (it owns 23% of the global market). What is overlooked, and arguably more important, is that SQM is a low-cost miner of lithium, iodine, specialty plant nutrients, and specialty industrial salts. This diverse group of minerals that service disparate end markets should help offset the volatility of any single commodity and help the company maintain strong rates of return. SQM's management plans to increase its lithium production from 70,000 metric tons today to 190,000 metric tons by 2021 to meet growing demand.

With its stock trading at 25 times earnings, it still looks expensive for a commodity miner. While the stock is more attractive today than it has been all year, it still looks like a hefty price for a mining stock.

MMP Chart

MMP data by YCharts.

Focus on short-term issues when longer-term catalysts are in the wings

For years, Goldman Sachs hasn't been like your prototypical bank where you have a savings and checking account. The company was much more known for investment banking; trading; and advising corporate clients on moves like mergers and acquisitions, equity offerings, and IPOs. Recently, though, the company has been moving into the more conventional banking space with consumer lending and deposit accounts through its Marcus by Goldman Sachs platform.

This budding consumer business has been Goldman's fastest-growing segment. As of the most recent quarter, the company reported a 56% year-over-year increase in net interest income from its investing and lending division. This division started in late 2016 and has already grown consumer deposits to $20 billion. Management also believes that once it gets customers in the door with savings accounts, it can branch out into other financial services such as insurance and credit cards. With a big name like Goldman Sachs behind what is more or less a start-up commercial banking platform, there is a massive growth opportunity here. 

Despite this longer-term catalyst that will open up a whole new growth avenue for Goldman, the stock trades at less than book value. It appears that Wall Street is concerned with weak results in its trading division and a potential $600 million payout to the Malaysian government as part of the 1MDB investment fund scandal. 

These concerns seem to ignore the overall strength of the business and the potential of this new growth avenue, which makes Goldman Sachs' stock look compelling today. 

Tyler Crowe owns shares of Magellan Midstream Partners. The Motley Fool recommends Magellan Midstream Partners. The Motley Fool has a disclosure policy.