For this post I am going to turn my attention to volume betting. I will construct a simple decision algorithm to bet blinding on a range of markets.
Obviously this method has no 'edge'. In theory it should lose money on average roughly in-line with what is expected because of loss to commission. In other words, net profit (negative, because it will lose money) and commission paid should be roughly equal.
I will be using the football market to make bets. I will initially use it for shadow betting, not betting in the live market to make sure I have not made any coding mistakes, then I will later attempt to use it 'live'. My reasoning behind using the football market is two-fold. Firstly it is easy to understand, there aren't often complications such as a tie voiding a market (as in cricket), and secondly because football has a wide appeal, and is much followed.
OK, so first we must make some assumptions.
We assume that a market with little or no overround (a 100% market) is efficient (or fair).
Any event we are betting on isn't being unfairly manipulated.
Having dealt with those assumptions, we could make our selections in any way, and our expectation doesn't change. What we do have a choice over now is the variance. One classic way to minimise variance is 'back the favourite'. Crunchyfrog on the cricket forum does an excellent analysis of this kind of betting.
A way to maximise variance is to artificially increase it via the use of multiples or accumulator bets. This is often done by people who like to make small bets on the high-street. With enough selections it is effectively a better value lottery ticket. (Even at high street odds, multiples are better value than a lottery scratchcard!)
One appealing way to increase the variance over the 'back the favourite' case is to back randomly according to the odds themselves. Let us suppose the home team is 1.41. This represents an implied likelihood of 70%. We can construct a random algorithm that backs this 70% of the time, and lays it 30% of the time. In fact we can take the back/lay spread into account so that we take this into account.
So now we just need a formula that takes back odds, lay odds, and then outputs whether to back, lay or no bet.
Let BackD and LayD be the decimal odds.
We can now calculate BackC and LayC which are the percentage implied times of winning. Note that LayC < BackC because laying is always longer odds than backing.
So now we take Rand() which is random(0,1) and say IF(Rand()BackC) THEN LAY ELSE NO BET.
If this is too hard to follow here is a couple of examples.
Let's suppose the market is:
1.01 / 1.02
BackD = 1.01
LayD = 1.02
BackC = 0.99009901
LayC = 0.9803921569
So now we constuct a random number between 0 and 1. If this is less than 0.9804 we will back, if it is greater than 0.9901 we will lay, and the rest of the time, roughly 1% of the time, we won't make a net.
This is a weakness with this system, because in a 1.01/1.02 market it is very unlikely that either backing or laying is good value, but at least the bigger the spread the less likely we are to back.
The following R code will construct a function that takes in the back and lay odds and tells you whether to back, lay or no bet. Please note this function doesn't call a SEED so make sure your RNG is seeded first.
backbot<-function(back,lay){x1<-runif(1,0,1);cat(x1);if(x1<1/lay){cat("\tback\n")} else if(x1>1/back){cat("\tlay\n")} else { cat("\tno bet\n")}}