Wednesday, December 17, 2008

Poker and trading

They're the same, really. I've long thought that all aspiring traders should learn to play a few hands of poker before moving on to the big game in the markets. But lately, I've been thinking the reverse may also be true.

See, in games of uncertainty such as these, we strive to play the game of optimal odds. It's simple math. If I do something profitable often enough, I should end up ahead in the long run. The problem with this is, this basic principle is often ignored.

How often have you heard the phrase "I'll pick a better spot to go all-in. No point gambling on a coin flip"? This approach is well and good when you're in the "coinflip" as a 49-51 dog. Forgoing the opportunity to take the 1 percent edge when you're ahead is just wrong in a cash game.

A 1 percent edge. Know how hard card counters work to get that kind of edge? It dawned on me on the ride home today that I have done my friend, Mike, a great disfavor in the past by not correcting him on this error in thinking. There is no "better spot" to shove when you're ahead, no matter how small the edge. There are only "other spots".

But what has this got to do with trading? Well, to be absolutely honest, this is in part a rant on the chains that have bound my research for the past year. Poker and trading live is pretty much the same. But the difference in pace would really open the eyes of many who have engaged in one but not the other. My above point on minute edges is but one of the many small things poker players should notice, but don't.

My thoughts are a little jumbled now(it's 520am, US markets have just closed), so bear with me if this post is particularly hard to keep track of.

First off, I find that traders understand precious little of what risk is. Poker players tend to relate to it more(though, as with mike's example, they understand it, but at the same time...don't). What is risk? Some people think it's the probability of you blowing up(for the poker players, that means busting your bankroll). Others think it's the maximum amount of money you can lose for a specific trade(traders) or hand(poker players). Few understand that there's really no difference in the two schools of thought.

See, risk isn't something we measure and tag a unit behind. It's really a floating value. If the risk of you busting your bankroll is reduced, the risk VALUE of your current hand goes down as well. They're related. You'll still risk the same monetary value, say $25...but risking $25 from a bankroll of $300 is different than losing from one of $3000. It's this floating value of risk that has doomed many a fund in the recent months. The mathematicians understand you can't define risk in a quantitative way. That's why they developed the concept of variance. The business types however, control the purse strings...and they want a number. Numbers make them happy. Abstract equations remind them of the advanced math classes they failed until they discovered accounting math. It's easier to sleep at night when you KNOW the books tally. Profits always on one column and losses always on another. We like simple things. The problem? We're really just making up the numbers we fill in the risk column. They're a close approximation MOST of the time. But most of the time doesn't quite cut it. Not when the cost of an error is unbearable.

So what's so important about understanding what risk really is? After all, losing $25 is ALWAYS a bad thing. And here's where we jump to the other side of the story...the traders. First thing you'll pick up when you start learning to trade is the concept of drawdowns. Basically, drawdowns bad, winstreaks good. In poker, we call it a bad streak. The more astute(or pretentious) of us will identify it correctly as variance. As poker players, we understand drawdowns are a part of the game, and it should only affect money management...ie, we do not change our game just because there is a big drawdown. We just change our betting sizes.

And here is where the rant begins. I've always been limited by the "need" to reduce drawdowns. The mathematician in me screams everytime I'm told my backtesting of a strategy indicates a drawdown that was "too big". Well, in the firm's defence, it makes perfect sense....no client would feel comfortable watching a 100million account shrink to 60million in 3 months. But that really isn't how strategies should be developed. It's ironic in a way. The cardinal rule of trading is to avoid curve fitting. The second most important is avoiding huge drawdowns. It's not hard to see that the two rules conflict.

So why am I pulling poker players into this? It's simple. There's alot to be learned from the blindsides of both camps. Just in case the poker kakis are gloating over how much of a grasp of statistics they have over the professional traders, keep in mind my first example of mike folding his AK against QQ after everyone has limped in because "he can pick a better spot".

I'll probably be coming back to these blind spots for both parties in the near future. There's lots to be discussed on this topic.

Sunday, November 9, 2008

Minibonds Fiasco

So anyway, I think everyone's sick of hearing about the minibonds by now. I know I am. Throngs of greedy ignorant people complaining they're not getting money for free. Really makes me sick when I think about it.

See, what happened was, these people obviously made it through life without understanding how risk works. It's amazing, really. Given their supposed ignorance on how to treat risk, I would have assumed the average complaining investor would not have survived past his 20th birthday. Apparently, donkeys get really lucky outside of the poker table as well. It appears a lot of these "investors" actually managed to hit retirement age.

Seriously, the angry mob has managed to convince practically everyone that the risk of the investment was high BECAUSE the investment eventually went south. That's ridiculous, akin to crying out that using a bridge is dangerous after witnessing a collapse. We're talking about educated and experienced people who are so caught up with their emotions, they can't detect this obvious fallacy in the argument.

Personally, I'm hoping the banks end up not compensating anyone. A disaster happened, and the least we can all do is learn from it. I've talked to people, and apparently, the lesson they learnt here is not to trust everything you hear from a salesman. REALLY? It took losing your life savings to learn this one? Again I wonder at the life expectancy of these investors. The real lesson here is the importance of diversification. I'm really hoping this point will drive home in the months to come, as we're not out of the woods yet on this finanacial crisis.

Procrastination Sucks

Wow I can't believe I've managed to procrastinate posting for half a year. Here's to hoping I post more regularly.

Or happy new year in advance if I don't

Sunday, April 6, 2008

Rule of four and two : common mistake

This is really one of my chief money makers in our live games, and thus very -EV explaining the mistakes I've seen many of you make with this seemingly easy to apply rule. Still, in the interest of improving everyone's game, let's take a look at the common mistakes a lot of you make.

Defination

The rule of four and two state that the chances of you winning on the hand is roughly equivalent to the number of outs you hold multiplied by 4 on the flop and 2 on the turn.

Easy enough to remember? Chances are, you have been applying this rule wrongly.

Let's start by understanding how we get 4 and 2 in the first place.


On the flop, there are 52-3-2 unknown cards. That's 47 cards that are mucked, burnt, dealt out or left in the deck. Since the cards are in a quantum state, the fate of each individual card doesn't matter. On the flop, there are two cards to come. that's 1/47+1/46 chance of hitting each of your outs. Add that together and you get roughly 4/100 = 4% per out. If you have 5 outs, your chances of winning by the flop is 4X5 = 20%. Simple enough. You can work out the rule of 2 yourself.

Let's take the most common misuse of this rule, the nut flush draw. What most of you have done really, when holding the nut flush draw is apply the basic concept of the rule. If 20 dollars is in the pot and someone bets the pot, you quickly apply the rule and decide you're getting correct odds at 1:2 to call the flop and see the turn. Now we know that calling a pot sized bet with a flush draw can't be correct, so where did the problem arise?

That's where most of you guys lose money. You took the rule and never bothered to understand how it worked. This rule only works if you are ALL IN on the flop or turn, respectively. You can't call 1:2 on the flop and 1:5 on the turn. That's only for all ins! You don't magically have twice the chance of drawing to the flush on the turn card than on the river. The double odds are because you are already all in and paying for TWO cards and not one.

sunk costs and you

I've been meaning to write about this really cool topic for awhile now. I've procrastinated because I know it's going to raise many questions and take a long time to explain, but here goes.

I'm kinda hoping everyone here knows what sunk costs are, and how they relate in poker. Here's a brief explanation : When you put money into the pot to raise, call or bet, that money is considered your sunk cost. It's money you won't get back again unless you win the pot(investment pays off). In gambling circles, it is considered wise to think of money put into the pot as no longer yours. This helps the average player understand the line drawn between sunk costs and available capital. Inexperienced players lose more money because they consider the money put into the pot as still theirs and thus necessary to protect.

But I digress.

The point of this post is really to discuss two really cool concepts every poker player needs to understand : The sunk cost fallacy and sunk cost dilemma.

Sunk cost fallacy

This is the more common problem. As discussed above, the sunk cost fallacy is the phenomenon of throwing in more good money after the bad. Say you have AK, and re-raised original raiser 15XBB pre-flop and got a caller. You miss the flop, and it gets checked to you. You C-bet about 25XBB and get raised. At this point, let's assume you know you're beat. You've just put in 40XBB into the pot and you're facing a 40XBB raise. The weaker players will occasionally succumb to the sunk cost fallacy. They're thinking : I've put in so much money already, it's just silly to throw this hand away. Especially when there's still a chance I can draw out!

It's easy to kid yourself in this scenario. Hell, I've seen even above average players succumb to this temptation on occasion. I would not be honest if I claim never to have done it myself. Still, if this is a major leak in your game, it would do you well to plug it ASAP. It's not hard to identify, and more often than not, throwing the hand away could make the difference between a winning session and a losing one.

The sunk cost fallacy is not unique to poker players, or even gamblers. One of the biggest fiascoes in recent history demonstrating this mindset was the Concorde experiment. Millions of dollars poured into the development of a super sonic passenger jet before it was determined that the idea was unprofitable. But because millions had already been spent, the sunk cost fallacy clouded the minds of the government entities behind the project. It was more than a decade later before mounting losses forced them to pull the plug.

Sunk cost dilemma

This is the juicy one. It's also the more dangerous of the two, because it happens so often in poker. First, a description:

The sunk cost dilemma is the situation whereby an opportunity is given in various timeframes to decide on the action to proceed or withdraw...and the optimal solution at each of these steps while being to proceed, will actually lead to an overall loss in value. It is in essence the direct opposite of the sunk cost fallacy. Because sunk costs are not taken into consideration, every decision made appears to be optimal, but ends up being detrimental to the overall project.

Now let's consider this in a poker situation(and you'll soon see why this is the more dangerous of the two in poker).

Consider yourself holding KQ of spades on the button. Someone raises preflop and you smoothcall. Flop comes A68 with 2 spades. The guy bets about 1/2 the pot. Assuming you know for certain he has an ace, and your only real chance of winning is hitting your flush, we know your odds of winning this hand is about 33% at best. This is a common situation. You do a quick mental calculation, and realise you will need real odds of at least about 1:6 for a call to be profitable. You already have 1:3 currently, and you believe your implied odds will make up for the rest, so you call. The turn doesn't make your flush, and now he continues to bet 1/2 the pot. You look at the rest of his stack and determine he's going to pay off the flush if you hit. You still need 1:6 real odds, and you think you have it, so you call.

Ok, what was wrong with that?

Conventional poker wisdom(ABC poker) says that so far, you've been playing good mathematical poker. You've been playing the odds correctly. But alas, you have already fallen for the sunk cost dilemma. This may sound really wierd to those of you who play poker mathematically, because this runs counter to the conventional theory. But let's look at what's happening again, this time with a slight twist.

Let's assume the pot was 30 dollars on the flop. Calculating forward, we know the effective stacks here were 120 on the flop after he bets the 15 dollars(half pot). In the scenario above, we are HAPPY he has the 120 left, because that allows us to draw profitably on the turn after we missed. But what if he had shoved on the flop instead with his 135 dollars into the 30 dollar pot? You most certainly would not have had the odds to call it. Not by a long shot. What's the difference between the two scenarios, really? Experienced players will probably explain it away by saying the pair of aces could have got away from the hand if the flush hit on the turn. But they can't really place a value on that option. It's just a way to explain away the uncomfortable discrepancy.

The truth is, we are blinded by our insistence of not taking into account sunk costs. We know taking into account sunk costs invite trouble via the sunk cost fallacy, and so we disregard it, trading it for the lesser evil of the sunk cost dilemma. But that's just the problem. Most of us were taught to look out for the trap of the sunk cost fallacy, but how many of us were actually warned that avoiding the fallacy traps us with the dilemma? Our very confidence of having avoided the pitfalls of the fallacy makes us more vulnerable to the dilemma. It happens all the time in mid-project budgeting, and sure as hell happens often in poker.

It is not what we do not know that dooms us, but what we think we know...and are wrong.

Monday, February 4, 2008

Happy New Year

With the Chinese New Year around the corner, I thought I'll make a quick post about some of the popular New Year gambling games. To give credit where credit's due, this was mostly inspired by Changs and Colin.

In Between

The premise of the game is simple. Everyone gets dealt two cards. Some games allow everyone to be dealt cards before the game starts, others deal each player their cards by turn. After a player looks at his cards(which are open for all to see), he can, on his turn, make one of two choices:

1) pass, and forfeit his hand(and his ante)
2) draw a third card and play.

If he should so choose to play the game, he must bet an amount of money less than or equal to the amount of money already in the communal pot. The communal pot is built up from ante forfeits and lost bets by the players. If the player manages to draw a card that falls in between his two cards(Ace lowest, King highest), he is entitled to take from the pot the amount of money he bet. If the card falls outside the range, however, he puts the amount of money he bet into the pot. The worst case scenario is when he pairs his cards. If the third card pairs his hand, he has to put TWICE the amount of money bet into the pot.

As with every non-dealer, non-rake game, this game is a fair one. Meaning your value of playing the game is exactly 0. In the long run, playing as a rational player, you expect to break even. As you will see later, this makes the game a good one to play if you want to play in the New Year games. Other games are not quite as fair.

So how can we win a game with 0 value? Why would one even want to play this game? From an economical viewpoint, no rational person would play a game with no value. Here's a few reasons why, though

1) Value derived via entertainment
2) Value derived via lack of rational play from OTHER players

In other words, we play this game to perfection and hope others make mistakes. If you're starting to draw a relation to poker, you're absolutely right. In between is like a very simplified version of poker.

Here's the math behind it.
Your equity in any hand you bet is derived from the formula:

Equity = 1-(2X+Y)/D

X is the number of cards left in the deck that could pair your hand
Y is the number of cards left in the deck that falls outside your range(not inclusive of pairs)
D is the number of cards left in the deck


It may seem daunting to calculate your equity every hand, but a closer look at the formula reveals certain universal rules one needs to follow.

1) Never play any hand where you have a gap of 7 or less
2) Never play a hand where you have a gap of 8 unless Y or X has been reduced by cards dealt to others
3) Always play AK , AQ and 2K in early position.

With these 3 simple rules in mind, there Aren't really many hands where you have to get down to do the calculations. But it can't be hard to do the math either...the formula is so simple.

Let's say you're dealt 3K. That's a 9 gap. First thing you do is make a rough estimation of the deck. No need to be exact. Think in counts of 5s. 25/30/35/40/45 are really pretty much the only options. Now count the number of As and 2s that have appeared. Not hard right? Take 8 and subtract that number to get your Y. Now take 6 and subtract the number of 3s and Ks that have appeared(other than in your hand). Add your numbers together and divide it by the deck. If the resultant figure looks to be greater than 0.5, fold it. If not, bet.

Ok, math aside...I find it neccessary to talk a little on variance. In poker theory, we all know we should get all our money in the pot when we're ahead, no matter how little. One must bear in mind that in this game, the limits are not table limits, but pot limit. Obviously what I'm trying to say is, don't bet your whole bankroll on a single hand. 2 ways to look at this though.

1) The bet progression of a pot sized bet everytime you bet makes for a natural Martingale system. While mathematically correct, variance will eventually eat you up if you cannot support the bankroll. Another flaw of the system is that the Martingale breaks down if someone wins the pot before you do.

2) My personal recommendation : Pick a bet and stick to it. If you bet a constant amount through the game, always picking spots where you're ahead to put that amount in...you won't be one of the big pot winners everyone remembers, but you'll almost certainly be well off. You can expect on average to make about 10% of your bet. Meaning, you can expect to be up 10 dollars for every hand you play if you manage to make 100 dollar bets everytime you bet. I know, sounds pretty unglamorous...but that's what grinders do. Still, it's the new year, and if you can afford to pay 10k, go for the 5k pot when you have >50% equity if you want to. It's still mathematically correct.



Blackjack - Sg Home rules

The rules of this game is simple. Unlike the version played in the casino, cards are dealt to players face down, and the players then take turns to draw from the deck. Players need not declare when they bust. Once the players are done drawing, It's all up to the banker. At any point from here, he can request to open any player's hand and pay him off according to the strengths of their hands. The banker then procedes to draw and open cards until he is satisfied. He then opens the remaining hands and pays off the hands that beat him. If the banker busts, any unopened hands are paid off. In this way, the player can win even with a busted hand.

Different house rules are available everywhere, but here are a few common ones:
1) all players, including banker may fold without penalty if dealt 15 total
2) Pocket aces pay triple
3) Blackjack pays 2:1.
3) 5 cards below 21 gets paid 5:1.

All rules apply equally to the banker and player.

The strategy for playing a winning game of house rule blackjack is simple. Be the banker. Done. End of story. There is no winning player based strategy. Estimates put the banker's advantage at about 10%, and a much reduced risk of ruin than the player.


Blackjack - Casino rules

Casino rule blackjack is a game close to my heart. I have spent years studying the finer points of blackjack, reworking the mathwork calculated by many others before me. The rules are simple. The banker deals everyone 2 cards face up, and 1 for himself. He then proceeds to pay out blackjacks in a ration of 3:2, unless he holds an ace or a 10 value card. If he does, he proceeds to ask the blackjack player if he wishes to escape a push by taking 1:1 now. After this is done, the round of dealing to players commence. Any player who busts immediately loses his bet. This done, the banker draws his second card. If he does not make blackjack, he pays out in the form of 3:2 to anyone who has made a blackjack. If he does make a blackjack however, the player pushes. The dealer then proceeds to draw to 17 or higher. If he busts, he pays all remaining players. If he doesn't, hand strength determines the winners.

Lest be it thought to be a dull game for the player, a number of options are available during the drawing round to the player

1) The player may split any equal value card pair. Eg 77 or QK
2) The player may double up(and get only one more card) on any two starting cards that don't include an ace
3) The player may surrender any hand without drawing and lose only half his bet.

Blackjack played perfectly gives a 0.5% advantage to the dealer. As such, it is highly recommended that you take the dealer seat if it is available. You stand to gain more than 0.5% for 2 reasons:

1) Most people play horrible blackjack. Think of the worst poker player you've ever played with. He's almost certain to be a better poker player than a blackjack one.

2) Most people cannot take the variance because they tend to overbet. Martingale strategies users are also common. In the short run, most people run out of money to play, or simply stop playing out of disgust to "bad luck".

But there's an overriding reason to play the dealer here. You have a 0.5% advantage minimum. This is 0.5% of total bets placed. If each round gets 20 dollars worth of combined action, that's 10cents per round for the dealer. Multiply it by the 100 hands you play and you'll make a tasty 10 dollars. That's not including the value you get(quite substantial) from the above-mentioned dealer's reduced risk of ruin.


Anyway, good luck at the tables, and remember...those donkeys are your relatives=)

Saturday, January 19, 2008

This is why Doyle > Math

The usual after-game chat on thursday morning with Changs
set me thinking. For those of you who were there on
Wednesday night, you may recall the questionable hand where
I shoved pre-flop with AT and was called by Changs with
pocket nines.

Let's recap that hand.

The hand was min raised twice to me, and I min-raised it
again. Folded to Mike who calls the raise and Changs who
puts in 30 on top. I pushed him all in, and he reluctantly
calls, to flip over pockets nines. As mentioned before I
held AT of clubs.

Pot was about 25 dollars before Changs put in his 30, and I
had him covered for 83 and change more.

The results are irrelevant to this post, but I'll post it
anyway. I lucked out, spiking a ten on the first board and
an ace to secure the full pot on the second run.


What really set me thinking was my defence against Chang's
accusation of my apparent donkey shove.He feels that I
should not have shoved when he was apparently the favourite,
no matter how slight.(I'd told him I knew he had an
underpair before I shoved) I know many people would will agree with Changs here; shoving when you're behind, no matter how slight intuitively sounds like a -EV play.

Though I have poven it to be mathematically correct, this opinion of it being a donkey play bugged me for days. Why is it intuitively a bad move? After brushing up on my statistics and sorting through the 2+2 forums, I figured it out. It feels like a bad move because it IS a bad move.


So how can a move be mathematically correct, yet wrong at the same time? The answer lies in the underlying assumption that acts as a blindsight for most math based poker players. The advice "Make the right mathematical move every time and you'll end up winning in the long run" is flawed. What it doesn't mention is the risk of ruin and it's close cousin(which is relevent here), geometric cummulative variance.

Let's backtrack a little. What is bankroll management? It is money management in a sense so that you do not play with too much of your bankroll at any one time, exposing yourself to variance which can severely cripple, or ruin you. Most people can tell you bad management spells doom, no matter how perfect your poker math is. The reason this is a danger is a little something called risk of ruin. Risk of ruin predicts that the proportion which you risk in ratio with your bankroll is exponentially proportional to the chances of you going broke due to variance.The quirky part of it is, of course, that no matter how superb your management is, as long as you continue to risk a part(no matter how small) of your money playing games of variance, you end up with a possibility above 0 that you lose everything in time. Most people think casinos win because they have a slight edge in the long run(which is true). But in reality, it is this quirk of statistics that really help seperate the cash from the gamblers.

Why did i talk about the theory of risk of ruin? Well, it's an unwelcome opposing force to perfect mathamatical poker due to variance. I'm about to introduce you to another unwelcome variance concept: the geometrical cummulative.

I like what Mike offered as a compromise that night. He told me "It's not that it's a bad play. But you could have picked a better spot to put your money in". Wise Mike. He's absolutely right of course. When you're talking about putting all your money in, you hope to put it in when you're a clear favourite. But that's tourny Mike speaking. In tournaments, you only get one chance to go broke, so obviously waiting for a better spot is nicer. But in cash games, when the player can rebuy again(and the stakes are hopefully insignificant to his bankroll)...how does this work out to be right? After all, the right move in the long run always brings in the cash right?

Remember what I mentioned about how risk of ruin increases exponentially the more you expose yourself to variance? That was when variance was held as a constant. Now imagine if you will, the significance of the coeffecient in this equation, the variance. A small difference in variance will lead to a significantly larger difference in the probability of ruin.

Why does this matter? Well for starters, variance over the long run is not calculated by the normal averaging to find the mean of all variances(in all your hands). It's geometrically calculated. Meaning, instead of ADDING them together to find the total, you MULTIPLY. Big variance(big swings) mean the mean variance will end up much bigger.

Well that's the math part of it anyway. If you can't wrap your head around the math, here's another explanation. When you make a move based on math, the assumption that the long run will reap rewards only holds true if everything else remains on constant. This means, for example, that for any random play(let's take an example we see almost every game next), you must be assured that you will see that exact random play again in your lifetime. That is no easy feat. Let's see an example.

The pot is now 600 dollars. The flop is dealt, pending the river. Mike and Changs are both all in. Kelvin has 190 dollars in front of him with the nut flush draw. He puts neither on a set, meaning if his flush hits, it's very likely to scoop the pot. Mathematically this is a no brainer to call the all in right?

Here's what the math poker pros don't tell you. Mathematically, yes, it is correct. In the long run, you will always make money if you shove here. Here's the catch. For that long run to come true, you need to be sure that in your lifetime, you will encounter the exact situation two more times. That's what the long run means. That doesn't sound unlikely yet? Let's review this.

Let's say Kelvin holds AT of spades, flop is 4s8sKd. Changs holds KcAc and Mike holds 8d4d. Changs is in position of Mike who is in position of Kelvin. You will need these exact things to happen again twice more in your poker career. Let's list down the things that need to happen twice more:

1) Kelvin out of position to both Players A and B
2) Kelvin has to hold AT of a suit on a board of 48k, with 4 and 8 of the suit he holds
3) Player A in position of Player B, has to hold AK of another suit.
4) Player B in position of Kelvin, has to hold 84, with the 4 and 8 in the same suit as the king on the flop
5) both players have to go all in for exactly the total of 600 dollars
6) At this point, Kelvin must have exactly 190 dollars left in front of him

The likelyhood of the exact events replaying again the required number of times should influence how well you do in poker if you play with math. Imagine now, if Kelvin at another point in time encounters almost the exact situation, with 180 dollars left in front of him instead. If he shoves now, he is starting another cycle of hoping to catch another 2 exact situations, instead of fulfilling the above one. That's how sick it is. That's how unlikely it is.

I am reminded of the much overquoted quote:

"In the long run, we'll all be dead"


After all that ranting, what has this got to do with my AT vs 99 hand? Well, imagine my horror when I finally broke out of my bubble and realised what cummulative variance meant. How long do I have to wait for another hand as unlikely as an AT vs 99 all in pre flop cash game? Or to be more sadistic(since I won that one)....how long does CHANGS have to wait to balance out his variance call there? The upside of course, is that he only needs for it to happen once more because he was getting coinflip odds.

You're right Mike. We both could have chosen better spots.