lo all
The one I'm looking at at the moment is runner activity, ie, the amount being traded on a runner over a set period of time. In this case, I'm working on the basis of a running total which takes a single minutes trading into account.
Here is the code:
private double tradedLastMinute;
private LinkedHashMap<Long, Double> minutesValues;
private long oneMinute;
private boolean foundEldest;
private boolean removed;
public RunnerActivity()
{
this.minutesValues = new LinkedHashMap<Long, Double>();
this.oneMinute = 60 * 1000;
this.removed = false;
this.tradedLastMinute = 0.00;
}
public void addRemoveValues(RunnerPrices rp)
{
long now = System.currentTimeMillis();
this.minutesValues.put(now, rp.getTotalAmountMatched());
double newest = rp.getTotalAmountMatched();
double eldest = 0.00;
for (Iterator<Long> it = this.minutesValues.keySet().iterator(); it.hasNext();)
{
long curVal = it.next();
if (curVal < (now - this.oneMinute))
{
eldest = this.minutesValues.get(curVal);
this.tradedLastMinute = newest - eldest;
it.remove();
}
}
}
I seem to be getting some interesting results here, particularly in a volatile market. What I'm trying to figure out though - and this sounds a bit silly - but what would be the best way to actually use these metrics? From what I can see, the trend seems to be that the favourite runner has the most activity. I figure, (working on an overs/unders market here) if I calculate the total on each runner as a percentage, I can weight it accordingly, which will help in the decision making process. Anyone else have ideas?
Alan
You could use the traded volume (percentage) multiplied by the price (adjusted to 100) to see if the book is balanced; for each runner, a balanced book would give a product of 1:
e.g. 3 runners A,B,C with prices (averaged over the minute and adjusted to 100) of:
A: 2.00
B: 4.00
C: 4.00
Now if the percentage of traded volume for each is 55%, 25%, 20% you would get:
A: 2.00 x 0.55 = 1.10
B: 4.00 x 0.25 = 1.00
C: 4.00 x 0.20 = 0.80
So A has more action than expected, C has less action and B, like Goldilocks porridge, is just right.
Of course, it's not as simple as that because favourites are consistently overbacked and outsiders are consistently underbacked. This is less pronounced on Betfair than with traditional bookmakers, but it's still there.
If you collect a decent dataset, you could estimate an average correction factor by price (and perhaps field size, flat/jumps, race grade etc). Any runner which gets a lot more (or less) traded volume than 'normal' would be worthy of attention.
This Topic Is Locked To Guest Posts
It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member