They usually spit out more canes than the 5 it costs to purchase Holiday Cheer, so barring receiving temp powers and junk (which still gives at least one candy cane, I believe) you can conceivably make a profit.
The long-term average candy cane acquisition rate for opening Mystery Gifts (what you get when somebody uses Holiday Cheer on you) is 3 candy canes per box*. That was taken into account when determining the vendor prices.
If you're lucky, you might be able to get ahead in the short term. If you try to turn it into an infinite candy cane machine, you'll find that the house always wins.
GiftShop wgBoxGifts[] = {
{ 10, GIFT_JINGLEJET },
{ 20, GIFT_SNOWBALL },
{ 10, GIFT_JUNK },
{ 10, GIFT_BOXMESSAGE },
{ 20, GIFT_CANDYCANEHIGH },
{ 1, GIFT_LKT },
{ 10, GIFT_FRISBEE },
{ 5, GIFT_TOYBAT },
{ 0, GIFT_NONE }
};
* It's 3 per box if you already have all of the various winter event powers. If you don't have them yet, the average candy cane drop rate will be a little lower while those powers are still in the pool. Once you have them, they are ignored, so the drop table looks like this:
{ 10, GIFT_JUNK }, // Spawns physics object
{ 10, GIFT_BOXMESSAGE }, // Dialog box, gives 1 candy cane as a consolation prize
{ 20, GIFT_CANDYCANEHIGH }, // 4-7 candy canes