Year-to-date the iShares Russell 2000 ETF (IWM) exchange-traded fund, which tracks a basket of smaller cap stocks, has gained more than twice as much as the SPDR S&P 500 (SPY) ETF, according to data from Yahoo Finance. Recently, the relative gains are 9.3% versus 4.1% respectively. Neither includes dividends.

Why did small caps do such much better? Perhaps it is likely because of all the worries about a pending all-out trade war, according to a recent report from James Investment Research.

"One of their advantages is less direct exposure to trade wars," states the report. This is because smaller cap companies typically don't export much of their output to other countries. Hence their revenue isn't threatened by tariffs against U.S.-made products.

There is one thing that few U.S. companies, whether large or small, can avoid and that is the fact that U.S. tariffs on foreign goods can lift the costs of production. However, as with everything in investing the matter is the relative benefits each type of stock, small vs. large. In this case, it should be clear that small-caps have a comparative advantage over large caps if there is an all-out trade war.

However, the trade war fear is only part of the story in the gains of small caps versus large caps.

Another boost that the small caps got was due to the Trump corporate tax cuts.

"[...] before the tax cuts they had higher effective tax rates than large caps," the James report states. In other words, large-cap companies were less likely to be paying anything like the high nominal corporate tax rate of 35% before Congress slashed the tax rate a few months ago. In fact, it is likely that some large-cap companies were actually paying less than the new lower rate that went into effect this year.

However, what we can say is small-cap companies likely were paying an effective rate higher than the effective rate that was being paid by the large-cap companies. The reason for this is that larger companies can afford many more tax attornies than smaller companies.

The result is that when the tax cuts came to fruition, then the smaller cap companies had proportionately more to gain.

There's one other reason that James Investment Research cites is valuation; or smaller-cap stocks are less expensive than larger cap ones when compared to a variety of metrics including earnings, book value, and cash flow.

It is that last point that investors may want to think about if the broader markets start to head down.

"[...] smaller stocks may better weather market turbulence," the report says. " The last time we saw a tech bubble burst, in 2000, the NASDAQ fell 38% while small-cap value stocks rose over 20%."

While of course, the report's author is clear that the last sentence is not a prediction, it should also be evident that buying stocks with cheaper valuation will better weather a financial storm.