Taketrung / betting-ai

Automatically exported from code.google.com/p/betting-ai
1 stars 1 forks source link

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

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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 daniel.k...@gmail.com on 19 Apr 2010 at 12:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by daniel.k...@gmail.com on 19 Apr 2010 at 3:12

GoogleCodeExporter commented 9 years ago

Original comment by daniel.k...@gmail.com on 7 Jun 2010 at 3:27

GoogleCodeExporter commented 9 years ago

Original comment by daniel.k...@gmail.com on 10 Jun 2010 at 3:09