It's been a difficult three years for Rick de los Reyes, a U.S. materials-focused analyst with T. Rowe Price. Before 2011, there were plenty of opportunities, but since then, stocks in the materials sector have been on a downward spiral.
For instance, gold and copper miner Freeport-McMoRan is down 18 percent year-to-date, U.S. Steel has fallen 17 percent since January 1, while Mosaic, a popular fertilizer company, is down 22 percent over the last 12 months.
The overall S&P 500 Materials Index is in positive territory, but its three-year annualized return of 8 percent is well below the S&P 500's 13 percent return, and it's only advanced by 1.9% since January.
"I've been recommending that people avoid it if they can," de los Reyes said.
Things must be bad if a materials expert is telling his colleagues to have zero exposure to the sector.
Other investors are not quite as bearish, but there is no denying that the materials sector has struggled over the last three years, despite the broader market's stellar performance. Things have not improved much in 2014, either.
Gold and copper miner Freeport-McMoRan is down 19 percent year-to-date, U.S. Steel has fallen 17 percent since January 1, while Mosaic, a popular fertilizer company, is down 22 percent over the last 12 months.
The overall S&P 500 Materials Index is in positive territory, but its three-year annualized return of 8 percent is well below the S&P 500's 13 percent return, and it's only advanced by 1.9 percent since January.
(Read more: High-dividend tech stocks still offer value)
Investors are well aware of challenges for stocks in the sector: About $47 billion of net investor money left materials stocks in 2013, according to EPFR Global, a worldwide fund flows research shop.
While de los Reyes isn't ready to change his position yet—in his words, "the market still needs to figure out what long-term commodity prices will look like"—the underperformance of materials stocks has caused valuations to fall, and that's got a number of professional investors interested in the space again.
On average, valuations are 30 percent below their historical norms and that presents a buying opportunity, said Norm MacDonald, a portfolio manager with Trimark Investments, a subsidiary of Invesco, an Atlanta-based global investment firm.
"If I can buy a company at a discount when the markets get overly punitive then I will," he said. MacDonald has been buying materials stocks for the past two months.
It is possible to be bearish on some parts of the materials sector while being bullish on others.
Although the materials sector only makes up 3 percent of the S&P 500, it covers a lot of ground.
(Read more: The latest farm bill: hemp and sushi rice)
There are four major subsectors in this space: metals and mining, agriculture seeds and fertilizers, paper and forestry products and chemicals, and they often don't move in lockstep with one another. However, almost every part of the materials market is cyclical and investors have to be prepared for some significant ups and downs. Everything from bad weather, an influx of new supply, a slowdown in economic growth and more can affect stocks.
"This is not for the faint of heart," MacDonald said. "I feel like I age in dog years."
It's also a complicated space because global issues, including food consumption, global economic growth and infrastructure spending, affect many parts of the materials market. When things aren't firing on all cylinders, the sector gets hit.
Materials stocks did well for most of the last decade, thanks to the emerging market's double-digit growth. Massive infrastructure projects required copious amounts of natural resources, and that caused a commodities "supercycle" that saw the price of many commodities and materials stocks soar.
But over the last three years, emerging markets growth—especially in China, which is a major consumer of commodities—has slowed. The country used to be growing by double digits every year, but now 7.5 percent GDP expansion is the norm.
(Read more: )
The slowdown has affected the sector. Between 1998 (the start of the cycle) and June 2008 (before the market crash and where some say the cycle started to wind down), the S&P 500 Materials Index rose by an incredible 102 percent, while the S&P 500 climbed by 44 percent. The materials index is up only 7 percent since then, versus 33 percent for the broader market.
Where the market heads from here depends on the growth of China and other emerging markets. Elizabeth Collins, an analyst with Morningstar, thinks the sector will still be under pressure in the short term. "We've been bearish on China's ability to continue investing in its infrastructure and that has a direct consequence on the companies that supply the raw materials for things like steel, cement and copper," she said.
Three ways to play materials
There are still a number of ways to make money in the materials sector. It comes down to finding stocks with stability, good management and a strategy to leverage the long-term trends, MacDonald said, but you also have to know exactly where to look.
1. Agriculture. One of the most promising parts of the market is seeds and fertilizers, such as nitrogen, phosphate and potash, said Jeff Nelson, an equity analyst with Edward Jones. While it is a highly cyclical area—weather can wreak havoc on this subsector—he thinks it's one of the best long-term plays.
It's projected that the world's population will grow by another 2 billion people between now and 2050, and emerging markets diets are becoming increasingly sophisticated as more people move into the middle class.
This is good news for the sector, because demand for food is only going to grow from here, he said. "The agriculture market is blessed with one of the most stable drivers," Nelson said.
Making it even more attractive is that supply could have trouble keeping up, said Tobias Welo, the lead manager on Fidelity Investments' Select Materials Portfolio. Most of the world's land is already being farmed, he said, which means the only way to grow production is by increasing yield on existing crops. How do you expand yields? By improving seed and fertilizer application, Welo said.
While much of the demand for food will come form emerging markets, fertilizer companies, such as CF Industries, a Deerfield, Ill.-based nitrogen and phosphate manufacture and distributor, has clients around the world and will be big beneficiaries of this focus on yield expansion.
"There's going to be fairly steady demand, while supply is going to be harder to come by, so I love the long-term dynamics," Welo said.
(Read more: Investors are trapped in stocks: Jack Welch)
2. Specialty metals. While de los Reyes may not be keen on the sector as a whole, there is one part of the market he's excited about: specialty metals.
These are companies, including API Technologies and Carpenter Technology, which create products, such as lightweight alloys, using several different metals. Carpenter Technologies' metals, for instance, have been used in turbine engines, landing gear and air frames that end up on Boeing and Airbus jets.
There are two main reasons why de los Reyes likes this part of the metals and mining sector. Since these companies use numerous metals, they are not as subjected to price fluctuations as actual miners are, and many of the end-users are in industries that are still recovering from the recession, such as aerospace and autos.
Because these companies are not tied into one or two commodities and can sell directly to large and growing industries, specialty metal operations are often more stable and have better margins than their mining and metals counterparts, said de los Reyes, and while they're still cyclical, the ups and downs are often not as great.
Look for companies that have some propriety materials, long-term contracts with successful partners that sell to brand-name corporations—Carpenter Technologies sells to Boeing and Airbus, for example—and can maintain sales and margins during rough economic patches, he said.
3. Basic materials. Buying metals and mining companies are the most controversial way to play the market, but could also have the most upside. Many of these companies have seen values drop by double digits.
While the short-term picture still looks rocky, MacDonald likes the long-term fundamentals. He pointed out that although China is growing slower now, its GDP is still expanding much faster than developing nations. As well, it's not just China that consumes these materials.
"All I need to make money is for the global economy to grow by about 3 percent," he said. "That's not too onerous."
It's also getting harder to find high quality-grade materials, especially in copper and zinc, he said, because a lot of the highest grade metals have already been mined. MacDonald also pointed out that many of these mines are in locations with unpredictable governments.
While this latter problem might hurt the companies that operate in hostile countries, anything that puts pressure on supply is a good thing. "Supply is more challenged," he said. "There's been a degradation of grades, and it takes longer to get a mine up and running."
A number of these companies are trading at a relatively inexpensive six times cash flow; historically, these companies trade at 9 or 10 times, MacDonald said.
So there are some potential buys even during a materials-sector cyclical downturn. Stick with companies that have positive earnings growth, that are shareholder-friendly—they buy back stock or issue a dividend—and that don't sway from their strategy when things get rough.
"Anything in materials will be cyclical," Nelson said, "but if you can buy a good long-term play within the sector, then you'll do just fine."
—By Bryan Borzykowski, Special to CNBC.com