Tuesday, November 30, 2010

Game Theory for Soccer Penalty Kicks

A mixed Nash Equilibrium strategy for soccer penalty kicks is mentioned at some Vanderbilt lecture.

Quick recollection of Nash Equilibrium,
A Nash equilibrium, named after John Nash, is a set of strategies, one for each player, such that no player has incentive to unilaterally change her action. Players are in equilibrium if a change in strategies by any one of them would lead that player to earn less than if she remained with her current strategy.

So onto the soccer thing,

Economist Ignacio Palacios-Huerta analyzed 1,417 penalty kicks from five years of professional soccer matches among European clubs. The success rates of penalty kickers given the decision by both the goalie and the kicker to kick or dive to the left or the right are as follows:


Left Right
Kicker Left 58% 95%
Right 93% 70%

In all cases, left and right is from the kicker's perspective. If the goalie guesses the kicker's direction correctly, he will block about 3 or 4 kicks out of 10. If the goalie guesses wrong, the kicker's chance of success is very high. Next, we calculate the mixed strategy equilibrium. Let p be the probability that the goalie jumps to the left and 1-p be the probability he jumps right. To make the kicker indifferent, we must solve:

payoff from kicking left = payoff from kicking right
58p + 95(1-p) = 93p + 70(1-p)

The result is p=42%. The goalie must jump left 42 out of 100 times to make the kicker indifferent between kicking left and right.

Next, we turn to the kicker's strategy that makes the goalie indifferent. First, note that the table above has only the kicker's payoffs represented by the probability of success. The goalie's payoffs are the opposite: the probability of a miss. We can rewrite the above table to represent the chance that the kicker misses by subtracting the numbers in the table from 100.


Left Right
Kicker Left 42% 5%
Right 7% 30%

Let q be the probability that the kicker kicks to the left and 1-q be the probability he kicks right. To make the goalie indifferent, we must solve:

payoff from jumping left = payoff from jumping right
42q + 7(1-q) = 5q + 30(1-q)

The result is q=39%. The kicker must kick left 39 out of 100 times to make the goalie indifferent between jumping left and right.

Surprisingly, the game is not very symmetric between kicking left and right which, in turn, implies that the relative frequencies of left and right for the goalie and the kicker should not be 50-50. How well does game theory predict actual behavior? Here is the actual behavior of kickers and goalies in the 1,417 observed penalty kicks:

  • Kickers:
    • Predicted proportion of kicks to the left: 39%
    • Observed proportion of kicks to the left: 40%
  • Goalies:
    • Predicted proportion of jumps to the left: 42%
    • Observed proportion of jumps to the left: 42%

Yep, now let's explain this to the kids...

Friday, November 26, 2010

Is making money at poker practical?

Having spent a good 1.5~ years of learning and playing for fun, my online poker hobby's made around $5/hour according to Hold'em Manager from the latest 15,000~ hands. So the next big question is, how much sacrifice would it take to really dig into it and overcome all living expenses through poker alone?

Skills or luck

It's a whole lot like day trading, only small edges are visibly exploitable, and they require patience, discipline, and deep understanding of statistics. Luck determines short term winners/losers, but you definitely need skills to have the stats go in your favor in the long run (10,000 hands +).

2 + 2

Two Plus Two is probably the most well known poker forum today, and it's a little talked about culture of a lot of young people who make a lot of money. That's probably where I started looking into the idea.


I'm looking to take up coaching at Collin Moshman's group, they do both coaching and backing. It's a fair set up for the coaching deal, they only make $ as a cut off players' future profits so that everyone's incentive remains in line. They require potential "students" to play at least 10,000 hands/ week, this is doable via multi-tabling and well, time; it gets the law of large numbers to kick in sooner than later, and speeds up the learning curve like CRAZY.

OK, yeah I've just talked myself into giving it a shot!

Monday, November 22, 2010

The Jump & Dump!

I've been reading up a lot around liquidity and ran into the story of how two postgrads, Rahul Savani (Computer Science) and Ben Veal (Applied Math.), won the Penn-Lehman Automated Trading Competition in 2005. That's University of Pennsylvania and yeah, Lehman Bros (back in the good old days of selling mortgage backed assets).

Savani and Veal's algorithm, Jump and Dump, dominated the other algorithms completely in the competition, by realizing that all of the competing algorithms focused only on market data and not any "reality checks" on price sensibility. Commented by a Wall St. friend of theirs, "... Often a strategy is successful because it anticipates how the other market participants are likely behave/react and then exploits them. "

Here's how they did it, it was brilliant and deceptively simple!


The strategy of Savani and Veal is simple to describe and even elegant in its own twisted way. The basic idea is to "clear out" one side of the market --- for instance, to simply buy all shares in the sell book. This has the effect of leaving a buy book, and thus a bid, but no sell book, and thus no ask.

The next step is to immediately place a buy and sell order at a very large price --- larger than the highest price paid to clear out the sell book. Since there is no ask, and the bid is far below this large price, this pair of orders becomes the new bid and ask, effectively leaving the current buy book far below the bid/ask.

The third step is to then self-execute a small number of shares with the new bid or ask, thus causing the last execution price to also be near the new large bid/ask.

The effect of these three steps is to (a) leave the strategy with a large long position (from the initial purchase of the sell book), and (b) move the bid, ask, and last price to a price far above the prices paid to acquire the large long position.

You can see where this is heading. Any strategy that only places orders with limit prices relative to the current bid, ask, or last execution price will blindly follow the artificial inflation in the market created by these steps, and begin trading near the new price. As long as there is enough such liquidity at the new inflated prices --- and in the recent competition, there was plenty --- the Savani and Veal strategy can then quietly start dumping its long position for far more than it paid for it. Genius incarnate.


Thursday, November 18, 2010

Quantitative Easing explanation

Funny and probably informative for anyone unfamiliar with the economy.

Wednesday, November 17, 2010

Obama vs. Hu rap battle

Pretty entertaining!

Return Distributions: Power Law > Gaussian

Power Law distributions explain fat-tail distributions much more accurately than Normal. I am aware that most academics are drilled about how Gaussian curves fit EVERYTHING in real life. That is nonsense. The existence of alternative distributions in math/stat textbooks that track empirical real life tell a very different story. Basically, extreme (potentially profitable) events occur MUCH MORE frequently than what Gaussian assumes.

According to someone who models stock returns with a normal distribution (this probably includes 99% of academic finance grads), the 1 day big market drops in 1929, 1987, 1998, 2008, Enron, GM, etc. are supposed to happen at most once every 10^30, or nonillion years. So it's numerically convenient, and obviously wrong, yet they embrace it as if it's the one and only truth.

The brilliant options trader, writer of The Black Swan, and once a professor at MIT, Taleb mentioned in Haug's Derivative Models on Models that the state of academic finance is intellectually insulting. Having met some folks from local business schools, I must agree.

It would seem more out of political reasons for this persistent blind faith of normal distributions in modern finance. As an overwhelming majority of current financial practices rely on Gaussian moments such as standard deviations, which we now know is completely meaningless in financial time series, an official recognition of this error would mean job loss for university staff, so-called analysts, and embarrassment for a number of people who came up with useless concepts such as "modern portfolio theory", "CAPM", "Black-Scholes Option Pricing", "VaR", and etc.

Is it intentional deception or incompetence? I'd say a bit of both.

Saturday, November 13, 2010

Portfolio Theory, and practice

Even though "Modern" Portfolio Theory is pretty old, and holds a lot of false assumptions around market completeness and diversification, it could be applied practically for a portfolio of positively expected strategies instead of simple assets vulnerable to systemic risk.

Original thoughts
So the original assumption around increasing the number of asset holdings is to lower the standard deviation of return, i.e. "unsystemic risk" (see below).

This is pretty easy to do by simply taking positions in index ETFs.

So what's the deal with the "Undiversifiable or Market Risk"? That includes things like credit risk, counter-party risk, basically everything that shows why buy & hold does not turn out well.

Actual application

Replacing asset holdings with trading strategies that exploit fundamental inefficiencies where systemic risks become opportunities for profit, and all of sudden portfolio theory becomes practical for the real world. It's like running a casino, to minimize swings in revenue, hosting a whole bunch of games helps the Law of Large Numbers kick in just a bit sooner; and everybody's happy.

Thursday, November 11, 2010

College/University side effect (spoiled grads!)

Not just the fresh graduates, I notice this attitude among some lecturers, professors as well. So they got a piece of paper suggesting that they can read, write (but not necessarily well), and be told what to do, all of sudden the real world has become menial. Of course they hate the question "If you're so smart, why aren't you rich?"

This story is from a friend, let's call her Mandy (keeping her anonymous), whose husband Pete runs a construction company. Mandy mentioned that her husband just hired someone who is a fresh graduate from University of Auckland in electrical engineering last week. So on the first day of work started out like this...

Pete, "Alright why don't ya dig a trench along the wall and lay the (electric) cables in there."
Uni Grad, "Oh, I don't do that..."

Long story short, reality struck, Pete was on the verge of firing him, the kid ended up digging.
What happened to the days of apprenticeships where people actually spent all their time learning RELEVANT stuff around their trade? It's ridiculous how much time and energy I must spend on practically useless stuff for the sake of a university degree.

Wednesday, November 10, 2010

Time Series analysis in R

This was part of a course I took at university. R is quite user friendly, efficient on system resources, and pretty useful! Below you'll find commands for some basic statistics along with their explanations and examples.

Topics included:

Basic stats, Cross Correlations, Cointegration, GARCH( Generalized Autoregressive Conditional Heteroskedasticity), ARIMA (Autoregressive Integrated Moving Averages), VAR (Vector Autoregression), and linear single/multiple regression.

(Paul is a great guy)
Lecture Notes

Sunday, November 7, 2010

About spurious correlations

I was talking to a fellow mathematician, someone not familiar with financial economics, around autocorrelation within financial data. "It could be spurious..." he said, implying and concluding that the relationship may not be practically exploitable.

OK, so the next logical thought is, even if the correlation IS spurious, can it still be applied somehow?

(Above figure gives HFRI Hedge Fund Index Autocorrelations for the indicated period)

Spuriousness explained

William C. Burns has given a great example of a spurious correlation,

  1. Get data on all the fires in San Francisco for the last ten years.
  2. Correlate the number of fire engines at each fire and the damages in dollars at each fire.
Note the significant relationship between number of fire engines and the amount of damage. Conclude that fire engines cause the damage.

So basically, it means that correlation statistics do not explain cause and effect orders.

Some relationships remain exploitable

OK, so let's go back to significant correlations of stock index values against Dividend Yield or the autocorrelation thing. Fundamentally speaking these relationships may make sense with respect to expected rational behavior of institutional traders. However, someone who does not have a background in financial economics would assume spuriousness.

Does it really matter? Referring to serial correlation, so what if a security's return at time t, S(t) depends on S(t-1), or that maybe S(t-1) depends on S(t); as long as the relationship's there and statistically significant, it is probably exploitable. The bottom line is everything.

Wednesday, November 3, 2010

About Ito's Process

Besides Black & Scholes, Kiyoshi Ito is one of the really popular guys in mathematical finance. Everybody in the scene knows his diffusion process, and I have some problems with it!

Ito's Diffusion Process (Simplest form):

Given that X(t) is a random variable, representing price of a financial security at time t, the change in X can be represented by,

dX(t)= aX(t)dt + sdW(t)


a, s: constants with respect to the model applied
W(t): Brownian motion

Stylized Facts
Empirical findings have however shown that the markets are NOT truly random as suggested by the Brownian motion. D. Whitcomb has pointed out a negative serial correlation off Index returns since 1979! Here's an article about his findings. This means the drift parameter a above does not always make sense. Yeah, there's always the drift due to inflation on indexes, but not all securities can even keep up with it, especially those with high credit risk.

The conditional variance contradicts with a lot of existing academic assumptions around Heston's stochastic volatility paper. Well it isn't so stochastic if you've actually observed volatility time series critically. I can't get into the volatility thing until a later time.

That's it for now!