It's not just based on wins and losses, it is also based upon your KDA. While wether you go up or down in rating IS determined by the result of the match, how much you go up or down is widely based upon your performance. Even if you play agents who don't get many kills, you can still see this reflected in your assists, which does contribute to how much rating you gain or lose.