Does your trading software force you to be a bad trader?

I have listed elsewhere on my blog a list of trading software that I have used in the past. These days I write my own software to get the precise market view that I want, along with a few metrics that I have designed myself and wish to keep secret.

Looking back, I sometimes wonder if 3rd party software forces people to trade in a specific manner. Certainly, using a 3rd party application "out of the box" won't get the best out of the software. You will have to examine all the features and set up the software for the precise market view that you are looking for.

Most 3rd party software is set to update at a default update speed, typically at the 1 second rate. Such an update rate may force traders to become what is known as scalpers, who usually enter a market for a short period of time, typically less than a few minutes, before closing out their trade. Scalping is a valid trading methodology but I would only recommend to those with the right hardware and speed of Internet connection to help them get to the front of the market regularly.

Trading at the 1 second level is essentially noise trading (especially during the last ten minutes of a pre-race betting market) and it takes a lot of skill to determine a trend (if there is one) from noise. I wonder how many traders slow down the update rate for their software and investigate longer trend signals?

I know that some traders will have charts running at a different rate to get a trend but with a 1 second trading ladder next to it. Some of those traders might get spooked by a sudden movement on the ladder and trade out for a loss when there was no need to do so. This is a framing problem where you are looking at the same market but in two different time scales, which is going to be very confusing.

So, have a go at slowing down the update rate on your trading software. You might find a new niche in which to trade, away from the herd (or rather, the sheep and a small number of wolves).

Betfair API-NG progress report

It's been a number of months since I started porting from Betfair's old SOAP-based API-6 to the new JSON-based API-NG. In some ways it has been pleasurable and in other ways not.

The new API has permitted me to see Betfair's data in a new way. I have been able to quickly develop applications and get on with the task of analysing data for building new trading strategies. JSON permits easy collection and manipulation of data.

On the other hand Betfair itself has been none too helpful. Often, it's left to the users of the API to report bugs so that Betfair can improve the API. It seems to me that Betfair's developers have little knowledge of betting markets and don't appreciate the problems their simple bugs create. The developers are just looking to solve the problem of disseminating data with a top down approach. They have no understanding of a trader's requirements for clean data.

I have discovered that often there are duplicate horses in the listMarketCatalogue method. An easy bug to get around as you can handle the expection when building a database quite easily. However, it's the way that Betfair handled my bug report that left me far from impressed. First they denied the bug. After I sent them evidence in a JSON string containing duplicates they said they would fix the bug. That was many months ago and the bug has still not been sorted out.

Then I found that overseas races were being added to Betfiar's database of UK races causing races from the United States, Hong Kong and Dubai to be added to my bot. Again a crude work-around was needed.

Now I find that the totalMatched volume count for runners never equals the actual colume for each price traded and often the totalMatched increases with no apparent volume increase for any price.

These bugs leave one disconcerted as to whether the data is accurate or not. A trader lives by the accuaracy of their data. If Betfair is not feeding the right data then a trader could end up in a lot of bother.

All in all, I feel that the new API is very promising indeed. It allows me to do so much more than I was able to do in the past. My productivity rate has increased greatly but I still have a suspicion in the back of mind that something could go wrong at any moment.

Betting market efficiency

That old carrot again. My latest article in SmartSigger magazine has been published. In the article I argue that betting markets are long-term efficient but in the short-term there is plenty of noise to trade upon.

In the long-term the wisdom of the crowd sets the starting price for a horse at pretty much fair odds (after any overround has been removed). However, for a small sample of races the odds do not show such efficiency. And, during the betting leading up to the start of the race, prices move around as new information (both public and private) enters the market.

It is for the sports trader to develop strategies to take advantage of short-term inefficiencies to profit from. Enjoy reading the article.

Finding your own way

A common question you hear from newcomers to sports trading is, "How do you...?" and the common answer is, "I can't tell you." Information is the key to success in sports trading and people will protect their valuable information.

Once valuable information is shared it loses its value. You only have to look at a betting market to see information being shared and its value being divided up amongst the quick thinking.

I have spent the majority of my life learning how betting markets work. Even as a child I was fascinated by sports betting. And yet, I never excelled at school, in fact I was the exact opposite of a good student.

You don't need to have had a good education to be a successful sports bettor but you do need to gain one. The ability to learn and research is important. At school I learned nothing. The classical schooling system never worked for me.

I wasn't a bad pupil. I tried my hardest but I wasn't good at anything because I couldn't concentrate when people spoke to me. However, I am good at reading. Through reading I learned what I wanted to know for myself in the style and pace that suited me. I left school with few qualifications because I read things that 16 year olds don't need to know to pass their O-levels and yet I still ended up at Oxford University many years later.

The greatest invention during my lifetime must be the World Wide Web. Although the web wasn't around until I was 27 years old. A web browser is the best research tool available. We must all learn how to use it effectively. And by effectively I mean finding things out for yourself and not just going to a forum and asking, "How do you...?" because more often than not nobody is going to tell you and you've just wasted valuable time.

If you are weak at mathematics (statistics and probability theory especially) then learn it online. With sports markets ever more similar to financial markets you should use financial trading websites to help you understand betting markets more. Both markets work using the same principles of supply and demand. You must also learn some basic programming techniques to increase your work flow.

Read. Learn. Experiment. And keep on doing it until you succeed.

Framing

The term framing is one from psychology and communications theory and leads into other terms such as cognitive bias. This is a useful subject to study for betting and trading as framing was a problem of mine when I first became a trader.

One of my main faults as a trader in oil and index futures was the inability to stop looking at the prices. A sudden reversal in the price would have me making the opposing trade to close out for a loss. Minutes later the price would correct and continue trending as I had expected it to when I put the first trade in.

I have corrected this fault of mine through automated trading. All I have to do is come up with back-tested trading rules and leave my bots to do the work of placing trades. With this hands-off approach there is no chance of my risk aversity from making a mess of things.

In the case of commodities trading I set up rules to trade on moving averages that looked at prices every so often. By permitting myself to look at prices between the time frame of the moving average I was disobeying the trading rule. There is a lot of noise in time series data and allowing that noise to hide a trend will destroy any winning trading rule.

Another use of the term framing is in the framing of a gamble. For example, if I say, "You will lose £50 if you call heads but you might win £100 if you call tails" then that may have the risk averse declining the bet. The thought of losing overrides the positive expectation of the gamble. If we analyse the gamble we see that the expectation is indeed positive.

Expected Value = (pWin * sWin) - (pLose * sLose)

where p is the probability and s is the sum to be won.

In our example above the expected value is

(0.5 * 100) - (0.5*50) = 50 - 25 = £25

In the time frame of 1 toss of the coin you might worry about losing £50 but over the time frame of 100 tosses you might expect to win in the region of £2500. This is an example of cognitive bias caused by irrational thought.

People who manually trade tick data can quite easily get caught by the framing effect. A sudden news item can spook a market one way or another and there will be a major price change before the market settles down. Doing this repeatedly will make a winning trading rule turn into a losing one.

Moving averages or other such sampling algorithms can smooth out the noise and generate manageable frames to trade upon. For those with 3rd party Betfair trading software, slowing the rate of price updates down from say 1 second to 5 seconds (or slower) can make a difference. Now, all that is required is a successful rule to trade with.

Further Reading




Leighton Vaughan Williams - citations

Professor Leighton Vaughan Williams is the UK's answer to Professor William Ziemba. Vaughan Williams too is a prolific writer in the field of sports gambling. He can also be seen on television or heard on the radio when a bite is required on the matter of sports prediction and betting.

Some of the following citations can be found on Google Scholar and downloaded, in PDF format, for your research. Papers not available for download will have to be photocopied from the cited publication at a university library. You might also try JSTOR, a repository for many journals, but this will require a subscription fee to perform downloads.

The professor has also written books on sports betting and more scholarly works on sports/finance.


Parke, J., et al. "An Exploratory Investigation into the Attitudes and Behaviours of Internet Casino and Poker Players." Report commissioned by eCOGRA (2007).

Williams, Leighton Vaughan. "Can Bettors Win?." World Economics 2.1 (2001): 31-48.

Smith, Michael A., David Paton, and Leighton Vaughan-Williams. "Costs, biases and betting markets: new evidence." Nottingham Trent University, Nottingham Business School, Economics Division Working Papers 2004/5 (2004).

Paton, David, and Leighton Vaughan Williams. "Monopoly rents and price fixing in betting markets." Review of Industrial Organization 19.3 (2001): 265-278.

Williams, Leighton Vaughan. "Can forecasters forecast successfully? Evidence from UK betting markets." Journal of Forecasting 19.6 (2000): 505-513.

Smith, Michael A., and Leighton Vaughan Williams. "Forecasting horse race outcomes: New evidence on odds bias in UK betting markets." International Journal of Forecasting 26.3 (2010): 543-550.

Paton, David, Leighton Vaughan Williams, and Stuart Fraser. "Regulating insider trading in betting markets." Bulletin of Economic Research 51.3 (1999): 237-241.

Vaughan-Williams, Leighton. "The economics of gambling." (2005).

Williams, Leighton Vaughan, ed. "Prediction markets: Theory and applications." (2011).

Williams, Leighton Vaughan, and David Paton. "Does information efficiency require a perception of information inefficiency?." Applied Economics Letters 4.10 (1997): 615-617.

Smith, Michael A., David Paton, and Leighton Vaughan Williams. "Do bookmakers possess superior skills to bettors in predicting outcomes?." Journal of Economic Behavior & Organization 71.2 (2009): 539-549.

Paton, David, and Leighton Vaughan Williams. "Forecasting outcomes in spread betting markets: can bettors use ‘quarbs’ to beat the book?." Journal of Forecasting 24.2 (2005): 139-154.

Paton, David, and Leighton Vaughan Williams. "Do betting costs explain betting biases?." Applied Economics Letters 5.5 (1998): 333-335.

Williams, Leighton Vaughan, ed. "Information efficiency in financial and betting markets." (2005).

Smith, Michael A., David Paton, and Leighton Vaughan Williams. "Market Efficiency in Person‐to‐Person Betting." Economica 73.292 (2006): 673-689.

Williams, Leighton Vaughan, and David Paton. "Why are some favourite-longshot biases positive and others negative?." Applied Economics 30.11 (1998): 1505-1510.

Williams, Leighton Vaughan, and David Paton. "Why is there a favourite-longshot bias in British racetrack betting markets?." Economic Journal 107.440 (1997): 150-58.

Williams, Leighton Vaughan. "Information efficiency in betting markets: A survey." Bulletin of Economic Research 51.1 (1999): 1-39.

Tennis - citations

Tennis (along with football) is one of the most popular sports for in-play trading. There is a wealth of freely available data for which to build trading models.

In-play trading allows the suitably equiped trader to watch and trade the changing fortunes of tennis players whilst matches are in progress.

These academic papers can be found on Google Scholar, JSTOR and in journals stored in university libraries.

Knottenbelt, William J., Demetris Spanias, and Agnieszka M. Madurska. "A common-opponent stochastic model for predicting the outcome of professional tennis matches." Computers & Mathematics with Applications 64.12 (2012): 3820-3827.

Barnett, T., A. Brown, and S. Clarke. "Developing a Model that Reflects Outcomes of Tennis Matches." Swinburne University (2005).

Easton, Stephen, and Katherine Uylangco. "Forecasting outcomes in tennis matches using within-match betting markets." International Journal of Forecasting 26.3 (2010): 564-575.

Øvregård, Øyvind Norstein. "Trading" in-play" betting Exchange Markets with Artificial Neural Networks." (2008).

del Corral, Julio, and Juan Prieto-Rodriguez. "Are differences in ranks good predictors for Grand Slam tennis matches?." International Journal of Forecasting 26.3 (2010): 551-563.