GithubHelp home page GithubHelp logo

betting-ai's Introduction

betting-ai

Automatically exported from code.google.com/p/betting-ai

This project is still under active development. However it was split up into a few smaller projects hosted at both google code and github. More details on my blog: http://blog.danmachine.com

Betting Artificial Intelligence in SCALA

Project initiation | Documentation | Blog | Roadmap | Contact

04.03.2011

The Betting AI version 1.3 has been released.

Download

Release notes

24.11.2010

The Betting AI version 1.2 has been released.

Download

Release notes

27.08.2010

Roadmap for the Betting AI has been updated.

23.07.2010

The Betting AI version 1.1 has been released. Download

Blog http://blog.danmachine.com/2010/08/horse-racing-market-simulation.html

16.06.2010

The Betting AI version 1.0 has been released. Download

30.05.2010

Roadmap for the Betting AI

betting-ai's People

Contributors

danielkorzekwa avatar

Stargazers

 avatar  avatar zippee avatar Alen Mujezinovic avatar  avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

betting-ai's Issues

Improve ITrader.execute trait

As a developer
I want to improve ITrader.execute trait
So that I can have a better quality code
As proven by solution defined and new user story for implementing it is created.

Notes:
Currently the ITrader.execute method takes userId and nextAvailableBetId as 
input arguments. Trader shouldn't be aware of betId and userId.

Original issue reported on code.google.com by [email protected] on 8 Jun 2010 at 4:50

Market simulation for CANCEL_BET event and simple trader implementation.

As a trading analyst I want to run market simulation for a given market
data file and simple trader implementation.

Market impleementation:
- if(priceToBack between 2 and 4 then place bet (size: 5 price: priceToBack,
betType: back)
- if(numOfBetsOnRunner>0 and totalToBack<5) then place bet (size: 5 price:
priceToBack, betType: back)

[MARKET DATA FILE]
{"eventType":"CREATE_MARKET",
 "marketId":1, 
 "marketName":"Match Odds",
 "eventName":"Man Utd vs Arsenal", 
 "numOfWinners":1, 
 "marketTime":
 "2010-04-15 14:00:00", 
 "selections": [{"selectionId":11,
               "selectionName":"Man Utd"},
               {"selectionId":12, 
               "selectionName":"Arsenal"}]
}

{"eventType":"PLACE_BET",
 "userId":123
 "betSize": 10
 "betPrice": 3
 "betType": L
 "marketId": 1
 "selectionId": 11
}

{"eventType":"CANCEL_BET",
 "userId":123
 "betId": 1234
}

[END OF MARKET DATA FILE]

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=? expAggrProfit=?  mBets=1 uBets=1
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=0 TotalMatchedBets=? TotalUnmachedBets=?

[END Of THE OUTPUT]

? - Depends on the market expected profit implementation. 


Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 11:59

Write issues for Market Data Collector

As an architect.
I want to create all required issues to develop Market Data Collector.
So that I can start developing Market Data Collector.
As proven by
- All required issues are created and review.

Original issue reported on code.google.com by [email protected] on 21 Jun 2010 at 4:43

getActiveMarkets

As a trader.
I want to get active markets.
So that I can place bets.
As proven by
- getActiveMarkets method is implemented and tested.


Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 1:22

Support CANCEL_BETS event

As a trader
I want to process CANCEL_BETS events with market simulator tool 
So that I can analyse trading strategies

As proven by:
All unit/integration/e2e tests for acceptance criteria pass

Acceptance criteria:
Event description:
Cancel a given size of unmatched bets for a given user id, price and market 
runner.

{"eventType":"CANCEL_BETS","userId":124,"betsSize":20.0,"betPrice":1.85,"marketI
d":10,"runnerId":1000}


Blocked on:
None.

Original issue reported on code.google.com by [email protected] on 8 Jul 2010 at 4:05

Create installation package for the betting ai

As a trading analyst.
I want to install betting ai system.
So that I can run market simulator as well as market data collector.

As proven by:
The betting-ai is installed and both market simulator and market data collector 
applications are started correctly.

Acceptance criteria:
- Zip installation file provided.
- Start scripts for both Market Simulator and Market Data Collector are 
provided.
- README.TXT file with the list of versions/scope and simple tutorial is 
provided.

Blocked on:
Market Data Collector and Market Simulator are ready to use.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 3:35

Implement BetOracle class that takes decision whether or not the bet should be placed.

BetOracle takes decision whether or not the bet should be placed. 
This decision is based on a set of binary inputs, e.g. current price,
totalToBack, totalToLay, etc. Each input value has to be normalised as a
value between 0(inclusive) and 1(inclusive). BetOracle uses a feed forward
neural and resilient propagation training for learning process. It returns
one integer value: 1 or 0. 1 - back bet should be placed, 0 lay bet should
be placed.


Configuration:
- inputs: Number of binary inputs that are provided to the BetOracle for
bet placement decision.ive)

Functions:
/** Calculates bet placement decision. Either back or lay bet should be placed.
   * 
   * @param inputs Values of the binary inputs that the bet placement
decision is taken for.
   * @return 1 or 0. 1 - back bet should be placed, 0 lay bet should be placed.
   */
  def compute(inputs: Array[Double]):Double

**************************************************************
/** Train the BetOracle what was the correct bet placement decision for the
given set of inputs.
   *
   * @param inputs Values of binary inputs that the bet placement decision
was taken for.
   * @param output Correct bet placement decision that should be taken for
that bet. It should take values 1 or 0.
   *        1 - placing back bet was the correct decision, 0 - placing lay
bet was the correct decision.
   */
  def train(inputs: Array[Double], output: Double)

***************************************************************
 /** 
   * @return Get the current error percent from the training. Between 0 and 1.
   */
  def getError():Double


Original issue reported on code.google.com by [email protected] on 24 Mar 2010 at 1:33

Cancel bet

As a marketEventProcessor.
I want to place market.
So that I can process CANCEL_BET event.
As proven by
- The getBets, getMarketData methods return correct data.

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 1:07

Market.cancelBets fails for the same bet on two different runners

This junit test fails, because wrong bet on wrong runner is cancelled.

@Test def testCancelUnmatchedLayBetIsCancelledTheSameBetOnOtherRunnerExists{
        val market = new Market(1,"Match Odds","Man Utd vs Arsenal",1,new Date(2000),List(new Market.Runner(11,"Man Utd"),new Market.Runner(12,"Arsenal"))) 
        market.placeBet(100,123,10,1.95,LAY,11)
        market.placeBet(101,123,10,1.95,LAY,12)

        assertEquals(2,market.getBets(123).size)
        assertEquals(10,market.cancelBets(123,10,1.95,LAY,11),0)
        assertEquals(1,market.getBets(123).size)
        assertEquals(0,market.getBets(123).filter(b => b.runnerId==11).size)
        assertEquals

Original issue reported on code.google.com by [email protected] on 26 Jul 2010 at 12:08

Create MarketEventCalculator

As a MarketEventProducer.
I want to calculate market events that represent the delta between previous and 
current state of the market.
So that I can return it to the MarketDataCollectorTask

As proven by:
- MarketEventProducer is developed and tested with automated tests.

Acceptance criteria:
- If no previous market state is available then CREATE_MARKET event will be 
generated as the first event on the list.
- If both previous and current market states are the same then nothing is 
generated.
- If both previous and current market states are not the same then appropriate 
PLACE_BET/CANCEL_BET events are generated.
- If the current market state presents less traded volume than the previous 
market state then exception is thrown.

Blocked on:
Nothing.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 11:17

Create MarketDataCollectorLauncher

As a trading analyst.
I want to collect market data for markets on the Betfair betting exchange.
So that I can run market simulation and test trading strategy for a real market 
data.

As proven by:
Automated integration tests.

Acceptance criteria:
Market data is collected in a format that is support by the MarketSimulator ver 
1.0
Market data is stored in text files (one file per one market)
Market data is collected for all Horse Racing win only markets.
Market data is collected starting 10 minutes before market start time until 
it's turned in play.
Command line interface is provided with the following input parameters: 
Betfair account credentials: user name, password and product id.
Time interval of the market data collection.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 10:17

Create simple bet-oracle implementation

Create simple bet-oracle implementation that has only 3 source 
neurons:

1. Market id
2. Price
3. Time left to "in-play" for a given market. 

It must be possible to:

1. Teach neural network (back propagation method).
2. Serialize and deserialize neural network. 
2.a) Automatically serialize neural network when error level is 
acceptable. 
3. Use neural network. Value beetwen -1.0 and 1.0 will be returned 
as a decision. Ideal values: -1.0 for lay and 1.0 for back. 

Original issue reported on code.google.com by [email protected] on 22 May 2010 at 2:09

Create MarketDataCollectorTask

As a MarketDataCollectorLauncher.
I want to schedule MarketDataCollectorTask.
So that I can collect market data with a given time interval.

As proven by:
- MarketDataCollectorTask is implemented and tests with automated tests

Acceptance criteria:
- Market data is collected in a format that is support by the MarketSimulator 
ver 1.0
- Market data is stored in text files (one file per one market)
- Market data is collected for all Horse Racing win only markets.
- Market data is collected starting 10 minutes before market start time until 
it's turned in play.

Blocked on:
MarketEventProducer is already developed and ready to use.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 10:24

Bets matching ordering rules.

As a trader
I want to place bets and get them matched in order they have been placed
So that I can know which order bets are matched

As proven by:
All tests for acceptance criteria pass.

Acceptance criteria:
The stake money that you see available in the market view at each odds 
increment can be a combination of one or more different users' unmatched bets. 
When you match a bet you will always be matched with the first bet that was 
placed at those particular odds i.e. first come first served. There is 
therefore an incentive for users to offer odds early or to offer better odds 
than those currently available.

You can bet all or part of the total stake amount shown. If the required stake 
is not available at the best odds, you can adjust your odds to the second- or 
third-best and place the full stake amount. The system will automatically match 
the stake available at the best odds first and then the stake at the 2nd best 
odds and so on down to the minimum odds acceptable to you.

Blocked on:
none

Original issue reported on code.google.com by [email protected] on 8 Jul 2010 at 3:59

Place bet (back/lay)

As a marketEventProcessor.
I want to place market.
So that I can process PLACE_BET event.
As proven by
- The getBets, getMarketData methods return correct data.
- Bets matching works correctly.



Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 1:05

Support CANCEL_BET event

As a Simulator 
I want to process CANCEL_BET event
So that I can run market simulation
As proven by appropriate method called on a betting exchange

CANCEL_BET event
{"eventType":"CANCEL_BET",
 "userId":123
 "betId": 1234
}


Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 12:46

Installation package

As a trading analyst I want to unzip market installation package and run it
for any valid market data file and any valid trader implementation class.

So that I can run market simulation.

As proven by mocked expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=3 expAggrProfit=3  mBets=1 uBets=1
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=3 TotalMatchedBets=1 TotalUnmachedBets=0

[END Of THE OUTPUT]



Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 2:42

Optimise usage of List.size/length

As a developer
I want to refactor List.size/length
So that I can improve performance

As proven by:
code review

Acceptance criteria:
Usage of List.size/length has been optimised across betting-ai modules

Blocked on:
None

Original issue reported on code.google.com by [email protected] on 2 Aug 2010 at 2:13

Collect market data for markets on the Betfair betting exchange

As a trading analyst.
I want to collect market data for markets on the Betfair betting exchange.
So that I can run market simulation and test trading strategy for a real market 
data.

As proven by:
Manual  e2e test.

Acceptance criteria:
Market data is collected in a format that is support by the MarketSimulator ver 
1.0
Market data is stored in text files (one file per one market)
Market data is collected for all Horse Racing win only markets.
Market data is collected starting 10 minutes before market start time until 
it's turned in play.
Installation package supported by both Windows and Linux operating systems is 
provided.
Command line interface is provided with the following input parameters: 
Betfair account credentials: user name, password and product id.
Time interval of the market data collection.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 10:11

Market simulation for incorrect input parameters

As a trading analyst I want to run market simulation for incorrect input
parameters.

So that I can check if correct message is printed.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Wrong input parameters!

Usage:
market_simulator=[market_data_file] traderImpl=[trader_impl_class]

marketData - Text file with market data that will be used for the simulation.

traderImpl - Fully classified name of the trader implementation class that
the simulation will be executed for. 

[END Of THE OUTPUT]

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 12:31

Market simulation for an empty market data file and any trader implementation.

As a trading analyst I want to run market simulation for an empty market
data file and any trader implementation.

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

--------------------------------------------------------------------------------
-----
TotalExpectedProfit=0 TotalMatchedBets=0 TotalUnmachedBets=0

[END Of THE OUTPUT]

Original issue reported on code.google.com by [email protected] on 15 Apr 2010 at 2:28

  • Blocking: #7
  • Blocked on: #4, #5

Calculate expected market profit for user

As a simulator
I want to calculate expected market profit for user
So that I can run market simulation
As proven by

Report:
Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Catt 7th Apr: 14:10 7f Claim Stks    expProfit=28 expAggrProfit=28 
mBets=34 uBets=17
Catt 7th Apr: 14:40 1m6f Hcap       expProfit=4   expAggrProfit=32 
mBets=27 uBets=2
...
Nott 7th Apr: 17:20 1m Hcap         expProfit=-6  expAggrProfit=136
mBets=45 uBets=57
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=136 TotalMatchedBets=457 TotalUnmachedBets=262
[END Of THE OUTPUT]

Definitions:

    * expProfit - Expected market profit based on all matched bets on the
market placed by trader.


    * expAggrProfit- Expected profit for the market and all prior markets. 


    * mBets - Number of matched bets on the market placed by trader.


    * uBets - Number of unmatched bets on the market placed by trader.


    * TotalExpectedProfit - Expected profit for all markets and all matched
bets placed by trader.


    * TotalMatchedBets - Number of all matched bets for all markets placed
by trader.


    * TotalUnmatchedBets - Number of all unmatched bets for all markets
placed by trader.

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 1:26

First e2e test

As a market analyst I want to run market simulation for a given market
events and simple trader implementation.

Market impleementation:
- if(priceToBack between 2 and 4 then place bet (size: 5 price: priceToBack,
betType: back)
- if(numOfBetsOnRunner>0 and totalToBack<5) then place bet (size: 5 price:
priceToBack, betType: back)

[MARKET DATA FILE]
{"eventType":"CREATE_MARKET",
 "marketId":1, 
 "marketName":"Match Odds",
 "eventName":"Man Utd vs Arsenal", 
 "numOfWinners":1, 
 "marketTime":
 "2010-04-15 14:00:00", 
 "selections": [{"selectionId":11,
               "selectionName":"Man Utd"},
               {"selectionId":12, 
               "selectionName":"Arsenal"}]
}

{"eventType":"PLACE_BET",
 "userId":123
 "betSize": 10
 "betPrice": 3
 "betType": L
 "marketId": 1
 "selectionId": 11
}

{"eventType":"CANCEL_BET",
 "userId":123
 "betId": 1234
}

[END OF MARKET DATA FILE]

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=? expAggrProfit=?  mBets=1 uBets=1
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=? TotalMatchedBets=1 TotalUnmachedBets=1

[END Of THE OUTPUT]

? - Depends on the market expected profit implementation. 

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 2:44

Add mapToPrices to BetUtil

         /** Returns total volume to back and to lay at all prices based on a given list of bets. 
     *  Prices with zero volume are not returned by this method.
     * 
     * @param bets
     * @return key - price, value (totalToBack,totalToLay)
     */
    def mapToPrices(bets:List[IBet]):Map[Double,Tuple2[Double,Double]]

Original issue reported on code.google.com by [email protected] on 27 Aug 2010 at 11:42

Market simulation for CREATE_MARKET event only and any trader implementation.

As a trading analyst I want to run market simulation for a given market
data file and any trader implementation.

[MARKET DATA FILE]
{"eventType":"CREATE_MARKET","marketId":1, "marketName":"Match Odds",
"eventName":"Man Utd vs Arsenal", "numOfWinners":1, "marketTime":
"2010-04-15 14:00:00", "selections": [{"selectionId":11,
"selectionName":"Man Utd"},{"selectionId":12, "selectionName":"Arsenal"}] }

[END OF MARKET DATA FILE]

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=0 expAggrProfit=0  mBets=0 uBets=0
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=0 TotalMatchedBets=0 TotalUnmachedBets=0

[END Of THE OUTPUT]

Original issue reported on code.google.com by [email protected] on 15 Apr 2010 at 3:00

  • Blocked on: #6

Market simulation for not existing market data file

As a trading analyst I want to run market simulation for not existing
market data file.

So that I can check if correct message is printed when the input parameter
is wrong.

As proven by error message printed to the output screen:

[BEGINNING Of THE OUTPUT]

Market data file not found: /tmp/blabla/marketdata.csv

[END Of THE OUTPUT]

Original issue reported on code.google.com by [email protected] on 15 Apr 2010 at 2:19

  • Blocking: #6
  • Blocked on: #3

Refactoring of Market.placeBet method

As a developer
I want to refactor Market.placeBet
So that I can have a high quality code
As proven by

- Code review:
The placeBet method currently is written in an imperative style and use a  
lot of repeated code. Write it in a more functional and clean way.

- All existing tests pass.

Original issue reported on code.google.com by [email protected] on 25 May 2010 at 4:58

Create MarketEventProducer

As a MarketEventCollectorTask.
I want to get list of market events for monitored markets.
So that I can write them to disk

As proven by:
MarketEventCollectorTask is developed and tested with automated tests.

Acceptance criteria:
- Market data is collected in a format that is support by the MarketSimulator 
ver 1.0
- Market data is collected for all Horse Racing win only markets.
- Market data is collected starting 10 minutes before market start time until 
it's turned in play.

Blocked on:
MarketEventCalculator is ready to use.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 11:08

Market simulation for CREATE_MARKET, PLACE_BET, CANCEL_BET events and simple trader implementation

As a SimulatorApp I want to run market simulation for a given market
events and simple trader implementation.

Market impleementation:
- if(priceToBack between 2 and 4 then place bet (size: 5 price: priceToBack,
betType: back)
- if(numOfBetsOnRunner>0 and totalToBack<5) then place bet (size: 5 price:
priceToBack, betType: back)

[MARKET DATA FILE]
{"eventType":"CREATE_MARKET",
 "marketId":1, 
 "marketName":"Match Odds",
 "eventName":"Man Utd vs Arsenal", 
 "numOfWinners":1, 
 "marketTime":
 "2010-04-15 14:00:00", 
 "selections": [{"selectionId":11,
               "selectionName":"Man Utd"},
               {"selectionId":12, 
               "selectionName":"Arsenal"}]
}

{"eventType":"PLACE_BET",
 "userId":123
 "betSize": 10
 "betPrice": 3
 "betType": L
 "marketId": 1
 "selectionId": 11
}

{"eventType":"CANCEL_BET",
 "userId":123
 "betId": 1234
}

[END OF MARKET DATA FILE]

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=? expAggrProfit=?  mBets=1 uBets=1
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=0 TotalMatchedBets=? TotalUnmachedBets=?

[END Of THE OUTPUT]

? - Depends on the market expected profit implementation. 



Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 12:38

New structure for the betting ai project

The current project structure is:

trunc/
  pom.xml
  src

should be:

trunc/
  pom.xml - reactor
  betting-oracle/pom.xml
  market-simulator/pom.xml   

Ask all project members to commit before doing refactoring.

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 5:47

Design of market data collector

As an architect.
I want to design the Market Data Collector.
So that I can implement it.
As proven by design document is created and review.

Original issue reported on code.google.com by [email protected] on 21 Jun 2010 at 4:39

Simple trader implementation

As a trading analyst.
I want to run simulation for a given trader implementation.
So that I can analyse trading strategy.
As proven by trader implementation is implemented:
- if(priceToBack > 2) then place bet (size: 5 price: priceToBack,
betType: back)
- if(priceToLay < 2) then place bet (size: 5 price: priceToLay,
betType: lay)

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 3:05

Second e2e test

As a market analyst I want to run market simulation for a given market
events and simple trader implementation.

Market impleementation:
- if(priceToBack between 2 and 4 then place bet (size: 5 price: priceToBack,
betType: back)
- if(numOfBetsOnRunner>0 and totalToBack<5) then place bet (size: 5 price:
priceToBack, betType: back)

[MARKET DATA FILE]
{"eventType":"CREATE_MARKET",
 "marketId":1, 
 "marketName":"Match Odds",
 "eventName":"Man Utd vs Arsenal", 
 "numOfWinners":1, 
 "marketTime":
 "2010-04-15 14:00:00", 
 "selections": [{"selectionId":11,
               "selectionName":"Man Utd"},
               {"selectionId":12, 
               "selectionName":"Arsenal"}]
}

{"eventType":"PLACE_BET",
 "userId":123
 "betSize": 10
 "betPrice": 3
 "betType": L
 "marketId": 1
 "selectionId": 11
}

{"eventType":"CANCEL_BET",
 "userId":123
 "betId": 1234
}

plus simular data for 2 more markets
[END OF MARKET DATA FILE]

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=? expAggrProfit=?  mBets=7 uBets=4
Market 2...
Market 3...
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=? TotalMatchedBets=15 TotalUnmachedBets=9

[END Of THE OUTPUT]

? - Depends on the market expected profit implementation. 

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 2:52

Support PLACE_BET event

As a Simulator 
I want to process CREATE_MARKET_EVENT
So that I can run market simulation
As proven by appropriate method called on a betting exchange

PLACE_BET event
{"eventType":"PLACE_BET",
 "userId":123
 "betSize": 10
 "betPrice": 3
 "betType": L
 "marketId": 1
 "selectionId": 11
}


Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 12:45

Add timestamp to market event

As a developer
I want to add timestamp to collected market event
So that I can trigger traderImpl after all events with the same timestamp are 
processed




Original issue reported on code.google.com by [email protected] on 15 Aug 2010 at 9:29

Market simulation for PLACE_BET event and simple trader implementation.

As a trading analyst I want to run market simulation for a given market
data file and simple trader implementation.

Market impleementation:
if(priceToBack between 2 and 4 then place bet (size: 5 price: priceToBack,
betType: back)

[MARKET DATA FILE]
{"eventType":"CREATE_MARKET",
 "marketId":1, 
 "marketName":"Match Odds",
 "eventName":"Man Utd vs Arsenal", 
 "numOfWinners":1, 
 "marketTime":
 "2010-04-15 14:00:00", 
 "selections": [{"selectionId":11,
               "selectionName":"Man Utd"},
               {"selectionId":12, 
               "selectionName":"Arsenal"}]
}

{"eventType":"PLACE_BET",
 "userId":123
 "betSize": 10
 "betPrice": 3
 "betType": L
 "marketId": 1
 "selectionId": 11
}


[END OF MARKET DATA FILE]

So that I can analyze market trader.

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Simulation is started.
Simulation progress: 1% 2% 3% 4% 5% 6%
.......................................................
................................................................................
.................................
..................................100%
Simulation is finished in 0 sec.

Expected profit report for trader com.dk.bettingai.trader.SimpleTraderImpl:

Man Utd vs Arsenal: Match Odds expProfit=? expAggrProfit=?  mBets=1 uBets=0
--------------------------------------------------------------------------------
-----
TotalExpectedProfit=0 TotalMatchedBets=? TotalUnmachedBets=?

[END Of THE OUTPUT]

? - Depends on the market expected profit implementation. 

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 11:30

Market simulation for not existing trader implementation.

As a trading analyst I want to run market simulation for not existing
trader implementation

So that I can check if correct message is printed when the input parameter
is wrong

As proven by expected profit report printed to the output screen:

[BEGINNING Of THE OUTPUT]

Trader implementation class not found: com.dk.bettingai.blabla.SimpleTraderImpl

[END Of THE OUTPUT]

Original issue reported on code.google.com by [email protected] on 15 Apr 2010 at 12:12

  • Blocking: #6
  • Blocked on: #3

Release ver. 1.1 of Betting AI

As a developer
I want to release the version 1.1 of the Betting AI.
So that I can provide the Market Data Collector to end users.
As proven by
- Betting AI is released with the maven-release-plugin.
- Installation package with Market Data Collector is uploaded to the betting-ai 
project on google code.

Original issue reported on code.google.com by [email protected] on 23 Jun 2010 at 12:39

Release ver 1.0 of the Market Simulator.

As a developer
I want to release the version 1.0 of the Market Simulator.
So that I can provide the Market Simulator ver1.0 to end users.
As proven by
- Market Simulator released with the maven-release-plugin.
- Installation package with Market Simulator is uploaded to the betting-ai 
project on google code. 

Original issue reported on code.google.com by [email protected] on 15 Jun 2010 at 6:23

Create market

As a marketEventProcessor.
I want to create market.
So that I can process CREATE_MARKET event.
As proven by get active markets returns created market.

Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 1:02

Support CREATE_MARKET event

As a Simulator 
I want to process CREATE_MARKET_EVENT
So that I can run market simulation
As proven by appropriate method called on a betting exchange

Market event:
{"eventType":"CREATE_MARKET",
 "marketId":1, 
 "marketName":"Match Odds",
 "eventName":"Man Utd vs Arsenal", 
 "numOfWinners":1, 
 "marketTime":
 "2010-04-15 14:00:00", 
 "selections": [{"selectionId":11,
               "selectionName":"Man Utd"},
               {"selectionId":12, 
               "selectionName":"Arsenal"}]
}


Original issue reported on code.google.com by [email protected] on 19 Apr 2010 at 12:43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.