Friday, 9 April 2010

The Betting AI (Artificial intelligence) - requirements

Previous part of the betting ai design.
Next part of the betting ai design.

Functional requirements

Use case scenario:
As a trading analyst

I want to choose historical market data for the simulation, e.g. all market data for the period from 01.02.2010 to 10.02.2010

  • Historical market data represents the whole market life cycle: market creation, bet placement, turning market in play, bet placement in play and market settlement.

Then I want to choose trader implementation that the bet placement intelligence should be tested for. 

  • Trader implementation should be executed every time the historical market event is processed. For instance when market is created or when bet is placed or market is turned in play. When trader is executed it can check the market state, runner prices, etc. and take appropriate trading decisions.

Then I want to run simulation.

  • The aim of the simulation is to test, how a trader implementation would behave if it was running live on the betting exchange. Of course the market simulation will never return the same results as testing trader on a real betting exchange, however they both should be similar as far as possible.

Finally I want to see expected trader profit based on matched bets placed by trader and market probabilities derived from market prices before market is turned in play.
  • Expected trader profit for market tells us what would be the profit in a long term if this market was processed many times. For instance if the expected market profit is 10, then it means that for 100 exactly the same markets the profit would be 1000. It may happen that for the first market the profit will be -23 and for next market it will be 12, but in total, based on a theory of probability it should be approximately 1000.

Non-functional requirements

  • Performance - Running the market simulation for 10 markets with 10 runners each and collected data for 10 minutes with 1 second interval should take maximum 1 second.

  • Command line interface - The market simulation should be started from the command line interface.

  • Multi-platform - It should be possible to run the market simulation on Windows and Linux operating systems.

  • Historical market data - All historical market data for the market simulation should be read from a single file on a file system. 

  • Installation - The application for the market simulation should be delivered as a zip file. To install and run the market simulation the following steps should be required:
    • Unzip the application.
    • Go to the application folder.
    • Run start script and provide file with the historical market data and the trader implementation.
    • Print the simulation report to the output screen.

  • Easy to run the market simulation for different traders - Running the market simulation for different traders should require only to change the name of the trader provided on the command line interface.