Be Wary When Streaming Betfair Data

Back in January of 2016, I mentioned that I had become one of Betfair's beta testers for their new data streaming service. I had a look but the more I thought about it, the more I thought it might not be such a good idea for the majority of traders and maybe not for Betfair either.

Previously, Betfair's data had to be requested from its servers via a process called polling. In polling, a timed process on the client side (trader's software) asks Betfair for the latest market data at a fixed time period (e.g. once a second). With streaming, a client now requests a stream for a market and the data is pushed by the server to the client whenever the data has been updated, which can be at any rate depending on market updates (e.g. the minute plus rate for markets far from going in-play to the millisecond rate for markets about to go in-play or that are in-play).

For the user, data streaming offers almost instantaneous market updates without having to request them from the server, save for the initial creation of the stream. This approach offers less work on the client side but for Betfair the workload increases because it now has to broadcast data continually rather than answering requests. I only hope that Betfair is upto the task.

At present, I have no need for streamed data. Some of my trading models are based on a one minute polling cycle and a few on a one second cycle. Having data streamed to my trading models at a rate far faster than they have been optimised will cause framing problems. In my latest book, Betfair Trading Techniques, I discuss the framing problem whereby using different rates at which data is sampled during model testing and model implementation can affect profitability. 

A model based on polling data at the one minute rate could spook a trader, trading a model whilst sitting by the screen watching data fly by at the one second rate or faster. The model will still be profitable at the one minute rate but if a manual trader gets nervous looking at the noise at the one second rate they might trade out for a loss too often and ruin the profitability of the model.

Think of it in terms of a signal to noise ratio. A trend or oscillation is the signal but noise in the form of sudden counter moves at the sub-second level might make create a false signal, forcing a trading model to trade out when the underlying signal is still valid. You have to be wary when told that streaming offers you data "ten times faster" as a badly programmed bot can end up losing your money ten times faster.

Anything faster than one second is for algorithmic trading and then only if the server running an algo-bot is optimally placed to process the stream and act upon it before others. I can't imagine a manual trader being able to look at data flashing by in less than a second being able to make any sense of it.

With data streaming, Betfair has ushered in the high-frequency trading era for sports trading and that is not good for the future of manual traders. The same has come to pass for financial trading. I believe that sports exchanges are going the way of financial exchanges, where the majority of trading is performed electronically. Manual trading will be for the casual punter or the low-frequency fire and forget bettor.

High-frequency trading will offer opportunities for a new breed of trader, the technical trader who has no interest in the underlying sport and just trades the numbers and market structure. Algorithmic trading offers a route into sports trading for those with a logical, mathematical mind, used to programming and problem solving.

The more algorithmic traders on the exchanges the better, as it will increase liquidity. Algorithmic trading offers the challenge of pitting your skills against others, experimenting with new ideas and new ways of looking at the trading problem. This is precisely why I have published two books, Programming for Betfair and Betfair Trading Techniques, to provide tools and to give aspiring algorithmic traders a head start.

Further Reading

Betfair Trading Techniques - Trading Models, Machine Learning, Money Management, Monte Carlo Methods & Algorithmic Trading. Betting exchanges are becoming ever more like financial markets. This has seen the rise of technical traders who find new and inventive ways of trading, little of it having anything to do with the underlying sports. Manual traders are having to give way to automation and algorithmic trading.

To stay ahead, the most successful traders are resorting to systematic and automated methods to build and trade their strategies. This book demonstrates techniques for sports trading, including; fundamental and technical trading, statistical arbitrage, money management, Monte Carlo methods, machine learning and the increasing necessity for algorithmic trading.

Included in the book is application code so that traders can build two trading tools to assist in their pursuit of edge. Contents List

Programming for Betfair - A Guide to Creating Sports Trading Applications with API-NG. The Betfair exchange, coupled with its API, permits a suitably skilled trader to code complex trading applications, which would not look out of place in the financial markets. This book offers a sports trader the chance to build their own trading applications, regardless of their programming ability.

Each chapter of Programming for Betfair contains snippets of code that combine to create a complete trading application. The application is geared towards horse racing but can easily be adapted to other sports on Betfair's exchange. Using Microsoft's Visual Studio (downloadable for free) the reader is shown how to code an application that will gather prices for any market on Betfair's exchange and then place bets into that market. 

The reader is shown how to automate their trading so that they can remove emotion from their trades and scale up their trading for increased profits. Further development of the application permits it to save data from Betfair onto the reader's hard drive for offline analysis and visualisation in a spreadsheet for the purpose of building trading algorithms. 

Also covered is an enhancement of Betfair's charts so that charts can be automatically updated and compared. The final chapter of the book discusses ideas for taking the application and the reader's skills to the next level. Topics discussed include constructing your own trading indicators, volume analysis, trend following, arbitrage, low-latency trading and many more. Contents List

No comments:

Post a Comment