Your 'actual performance' in a match is valued by the algorithm based on you 'expected performance', i.e. how your performance should have been.
For instance, if you pre-match ree ranking was much higher than your opponents', your third place out of six, which would otherwise be not that bad, can be considered disappointing and therefore lead to a drop of your ree.
On the other hand, in that same game, a very weak player can score a positive ree variation with a fourth (or even a fifth) place.