This is sort of the deal on Wall Street. You get a "discretionary bonus" and its more mysteriously tied to the performance of the firm. This is the secret, you can't give people too much of a formula. Bonuses have to be conjured up in a nonsensical way, otherwise stuff like this happens.
Its usually both. So you get into the great situation where you did great but the firm did poorly, so you get a doughnut. As you move up the ranks, the process becomes less murky.