Saturday, June 30, 2018

Betting Market Update

This morning's quick look at betting markets sees some movement at Sportsbet.

House Coalition Odds ($) Labor Odds ($) Coalition Win Probability (%)
2018-06-30 CrownBet 2.25 1.47 39.52
2018-06-30 Sportsbet 2.10 1.45 40.85
2018-06-30 William Hill 2.55 1.50 37.04

Sunday, June 24, 2018

Poll aggregation update

There were two new polls published last week, from Newspoll and Essential, both of which estimated the Coalition has 48 and Labor has 52 per cent of the two-party preferred (TPP) vote share. The aggregation of all polls has the Coalition on 47.9 and Labor on 52.1.

Cross checking this result against some simple moving averages, constrained such that house effects sum to zero, yields the following. Most of these moving averages are still factoring in the up-swing since November last year. I have mentioned before that these moving averages are less reliable around the endpoints than the Bayesian model.

My suspicion is that the Coalition's up-swing since late last year has run its course and we have seen fairly stable numbers for a month and a half or so now at around 48 per cent TPP for the Coalition.

Turning to the primary vote estimates we have ...

In separate analysis, we can look at the Pauline Hanson One Nation Party results, which are included in the Other Parties primary vote chart immediately above ...

The TPP estimate from the logit primary vote model is less favourable to the Coalition than the published polls, using the preference flows from the most recent elections.

Saturday, June 23, 2018

The dramas of a daily web scraper

I have a set of web scraping programs I run every day to update the data for my election betting market series.

These programs are very short, typically 20 to 30 lines of Python code. But they are highly idiosyncratic. They break when a bookmaker updates the way in which it serves up web pages. My usual approach when this happens is to do a quick fix as soon as I see one of my scrapers has failed.

Sometime between Tuesday morning and Wednesday morning this week, Sportsbet updated the way in which it serves up web pages. It was a dramatic change. Sportsbet want from using bog standard HTML to a JavaScript page that dynamically creates the HTML on the fly.

This necessitated a different approach to web scraping. And I only found the time today (Saturday afternoon) to update the Sportsbet web scraper.

In the mean time, it looks like the odds have moved at Sportsbet.

Sportsbet now has the Coalition in the best position it has been in since I started my daily monitoring of odds for the winner of the next Australian federal election. In case you are wondering, the next federal election is most likely to be held in the first half of 2019, but it could happen earlier.

Sunday, June 10, 2018

Poll update

The latest aggregation follows. It treats the Newspolls since December 2017 as a different series to the earlier Newspolls. I have split Newspoll into two series on the basis of its treatment of One Nation preferences. The current two-party preferred (TPP) estimate, based on the assumption that house effects balance out on average, sees the Coalition on 47.8 per cent to Labor's election winning position of 52.2 per cent.

As a cross check, let's look at how this compares with a number of moving averages, which have been similarly adjusted on the assumption that house effects balance out on average. Both the LOWESS-91 and and Bayesian hierarchical model (above) suggest that the Coalition's poll position may have peaked and is now trending down.The moving averages are slower than the Bayesian to respond to changes in public opinion. They can also exaggerate the end point position.

We can also compare the estimated house biases from the various moving averages compared with the Bayesian model above.

Essential Ipsos Newspoll Newspoll2 ReachTEL Roy Morgan YouGov Iter Sum Errors Squared
Model
HMA-181 -0.805492 -0.864758 -0.792727 0.073339 -0.324017 0.511941 2.201714 22 0.008374
HMA-365 -0.781727 -0.742800 -0.723322 0.054020 -0.300477 0.293336 2.200970 20 0.009416
LOWESS-91 -0.801099 -0.883610 -0.807314 0.132668 -0.290249 0.443300 2.206304 19 0.008246
LOWESS-181 -0.803521 -0.804463 -0.770847 0.111452 -0.311898 0.369247 2.210029 16 0.009263

Let's move to the TPP analysis based on primary votes and preference flows at the last Federal election. This use of preference flows is less favourable to the Coalition than the latest flows at Newspoll. We are not seeing a downturn in any of these series. This might be the additional constraints in the primary vote model makes it less responsive to chnages in public sentiment. But this might be because the model does not take account of One Nation preference flows separately from other parties in the others category.

The primary vote share estimates follow.

Separating One Nation from Other above ... we can see a party that appears to be in decline, and well down on its peak in early 2017.

Monday, May 28, 2018

The latest Newspoll estimated the Coalition would win 48 per cent, and Labor 52 per cent of the two-party preferred (TPP) vote share if an election was held now. Not a surprising result, and consistent with many other polls over recent months.

However it prompted me to do something about my Bayesian Hidden Markov Model. As many of you would know: in December 2017, Newspoll changed the way it allocates preferences in respect of the One Nation Party (see Poll Buldger, and Kevin Bonham). My Bayesian model assumes each polling house has an unchanging methodology. Clearly, we now know this is not the case. Newspoll has increased its preference flow from One Nation primary votes to the Coalition TPP vote share by an undisclosed amount. As a result, the Coalition TPP has improved by around one percentage point on average in the Newspoll series since December 2017. The easy model fix is to treat these later Newspoll results as a separate series.

Let's start today's TPP charts with what they would have been had I not changed the treatment of Newspoll within the model. The thing to note here is that the overall increase from low-point to now is 0.9 percentage points.

Now, let's look at the results when we treat the post 1 December 2017 Newspolls as being a different series. The increase from the low-point to now is little changed in the model. Treating Newspoll as a single series (with the same data) the increase from the low-point was 0.9 percentage points, and treating Newspoll as two series, this increase is 0.8 percentage points.

The new treatment also changes the vertical positioning of the lines, but this is largely an artifact of the sum to zero constraint on house effects across the houses.

More interestingly, the new treatment reveals a change in the estimated pro-Coalition bias for Newspoll of (almost exactly) one percentage point (being the difference between -0.8295 and +0.1712).

What this suggests is that today's result might have been closer to 47 to 53, Coalition to Labor, if Newspoll had not changed its preference flow methodology. I happen to think on balance that Newspoll's newer methodology is the more accurate. It certainly reflects recent state government election preference flows. But given One Nation's history I have one (huge) caveat. If, come the election, One Nation decides to preference against the Coalition on its how to vote cards, then I suspect the recent state elections will not mean a thing.

Usual acknowledgement: the data for this analysis comes from Wikipedia.

Tuesday, May 15, 2018

A month at the betting market

I have been following the Australian Federal Election betting market for a month now. Not a lot has happened in that month. Across the four houses I regularly sample, punters think that Labor has a 63 per cent chance of winning the next election and the Coalition a 37 per chance. On 15 April, when I started collecting odds from these four houses, it was 65 and 35 per cent.

Friday, May 4, 2018

May poll aggregate update

Another month has passed, so it is time to update the poll aggregate. Let's start with a list of the recent poll results, sourced from the Wikipedia page on the next federal election.

MidDate Firm L/NP ALP GRN ONP OTH TPP L/NP TPP ALP
1 2018-04-30 ReachTEL 36.0 35.0 11.0 6.0 12.0 48.0 52.0
2 2018-04-20 Essential 37.0 36.0 11.0 8.0 8.0 47.0 53.0
3 2018-04-22 Newspoll 38.0 37.0 9.0 7.0 9.0 49.0 51.0
4 2018-04-06 Essential 38.0 37.0 10.0 7.0 8.0 47.0 53.0
5 2018-04-06 Newspoll 38.0 37.0 10.0 7.0 8.0 48.0 52.0
6 2018-04-04 Ipsos 36.0 34.0 12.0 NaN 18.0 48.0 52.0

Tossing these results into the two-party preferred aggregation reveals.

This can be compared with my simplified aggregation models using Henderson moving averages (HMA) and Locally Weighted Scatter-plot Smoothing (LOWESS). Both of these models can do strange things at the end points. Given the data, I suspect they are a touch over-enthusiastic for the Coalition come the end of April 2018.

Collectively we can see that the Coalition's fortunes continued their rise through April. Nonetheless, if an election was held now, the most likely outcome would be a sizable Labor victory.

Moving to the primary voting intention results.

Collectively, the implied two-party preferred (TPP) results for the Coalition follow. Unlike the TPP charts above, calculating the TPP results directly from the primary vote sees a stagnating TPP. I suspect the issue here is partly affected by Newspoll's change in methodology for attributing preference flows for One Nation. While I can understand Newspoll's decision to increase the One Nation to Coalition preference flows (based on preference flows at the recent Qld and WA state elections), the changed methodology is inconsistent with my models. I will need to think about this some more.

Speaking of One Nation, there has been a slow decline in its vote share over recent months.