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 daniel.k...@gmail.com on 19 Apr 2010 at 2:44
Original issue reported on code.google.com by
daniel.k...@gmail.com
on 19 Apr 2010 at 2:44