NEW YORK, Aug 23 (Reuters) - More investors are watching the shares of discount retailers like Dollar General Corp and Dollar Tree Inc, which perform better during economic downturns, in the hopes of gauging changes in consumer behavior, though higher tariffs may erode the companies' ability to act as economic bellwethers.

Fund managers and analysts say that they are looking for signs of a so-called "trade-down trade", in which consumers forgo shopping at higher-end department stores or supermarkets in favor of the more limited selection but lower prices at deep discounters. Between December 2008 and December 2011, for instance, shares of Dollar Tree soared nearly 200% as consumers pinched pennies during the Great Recession, while the benchmark S&P 500 gained just 39% over the same time.

For the year to date, shares of Dollar Tree are up 7.3% as it integrates its purchase of former competitor Family Dollar, while shares of Dollar General are up 28.4%. Both companies are scheduled to report earnings Aug. 29.

"The good news is consumers often shop more at the dollar stores during periods of economic weakness. We wouldn't expect a sharp increase in sales, but we suspect sales will remain stable at the dollar stores while other companies may feel greater pain," said Mark DeVaul, a portfolio manager at the Hennessy Equity and Income fund, who has a position in Dollar Tree.

"We believe the treasure hunt shopping atmosphere will continue to drive traffic and somewhat insulate them from competition from Amazon."

There are no indications that the United States is currently in a recession, though investors are becoming increasingly worried that the longest economic expansion in U.S. history is nearing its end.

Earlier this month, Goldman Sachs said that the likelihood that the trade war between the U.S. and China leads to a recession are increasing and that it no longer expects a trade deal between the world's two largest economies before the 2020 U.S. presidential election.

Morgan Stanley, meanwhile, forecast that if the United States increases tariffs on all imports from China to 25 percent for 4-6 months, and China takes countermeasures, a U.S. recession would follow in three quarters.

The spread between the yields of shorter- and longer-duration Treasury bonds slipped below zero earlier this year, a so-called yield curve inversion which has presaged recessions in the past. The yield of 30-year Treasuries hit record lows last week, a sign that investors are betting on slower economic growth and low inflation.

A trade-down trade in the face of economic weakness could also benefit deep discount retailers such as Five Below Inc , National Vision Holdings Inc, and Ollie's Bargain Outlet Holdings Inc that have solid balance sheets, noted Anthony Chukumba, managing director at Loop Capital Markets. Higher-end retailers like Best Buy Co Inc , meanwhile, would likely underperform, he said.

"With the likelihood of a recession creeping up, we believe investors should start paying more attention to specialty hardlines retailers’ capital structures," he said.

Dollar General, in particular, may continue to outperform due to its strong management team and inventory control, said Charles Grom, an analyst at Gordon Haskett Research Advisors.

"This is one of our best ideas and we think there's an above-average chance that they will be raising their guidance" when the company reports its results and "mirror what Target did", he said. Shares of Target Corp jumped over 19% and hit record highs after the company posted better-than-expected sales growth on Tuesday.

Yet deep discounters like Dollar Tree and Dollar General are not immune from the economic impacts of the trade war between the U.S. and China. Dollar Tree, for example, imports an estimated 60% of its inventory from China and could be forced into raising prices if it is no longer able to get concessions from its vendors, said DeVaul, the Hennessy fund manager.

"They may have to 'break the buck' and raise prices, but the risk there is that by doing so they could piss off a lot of people and not get them back," he said. (Reporting by David Randall; Editing by Jennifer Ablan and Nick Zieminski)