As President Donald Trump enters the second to last year of his first term, his self-professed deal-making skills have fallen flat, both on the global stage and over domestic concerns like the border wall.

Bloomberg tested the theory further, by generating indices that show how well a company does on the stock market based on whether Trump has spoken about it in a positive or negative way.

What they found was that the more the president denigrated a financial institution, the more its stock went up.

They describe their process.

"To find out, we created a pair of indexes, and tracked them for a year. The Oligarch 1 (companies he favored) and the Drain the Swamp 2 (companies he denigrated) indexes were filled with companies straight from the feed of the tweeter-in-chief," Bloomberg writes.

"This allowed us to track how well or poorly they did relative to their relationship with the president. What impact would he have on the companies’ market performance?"

They described their findings in 2017.

"In 2017, the Oligarch Index gained a respectable 20 percent during the year. But it lagged behind the benchmark Standard & Poor’s 500 Index's rise of 21 percent. During the same year, the Drain the Swamp Index crushed the Oligarch Index, gaining 43 percent," they write.

They also discovered nuances in the stock market.

"But let’s not get too far ahead of ourselves: it was only one year, and one where markets everywhere went up, something for which Trump had no qualms about taking credit. Here we are, one year later, and 2018 was a much more challenging period. Amid a spike in volatility, the S&P 500 declined 6.2 percent. How did these two indexes do in that very different environment?"

Once again, they found that betting against Trump was a solid bet.

"The Oligarch Index really took it on the chin last year. For the one-year period ended Jan. 10, the index fell 23 percent. This was much worse than the S&P 500, which during the same period declined 5.5 percent," he wrote.

"And the Swamp Index? It not only beat the Oligarch again, it crushed it, rising 6.3 percent. That is a 29 percentage point advantage for Trump’s most-hated companies over his most favored ones. This is even bigger spread than the first year we tracked the indexes, when the spread was 23 percentage points."

Read the report here.