random_betting: Random betting function In welo: Weighted and Standard Elo Rates

Description

Places bets on players i and j randomly chosen, among all the matches selected by the following strategy: by default, the amount of \$1 is placed on the best odds (that is, the highest odds available) for player i for all the matches where it holds that

\frac{\hat{P}_{i,j}(t)}{q_{i,j}(t)} > r,

where \hat{P}_{i,j}(t) is the estimated probability (coming from the WElo or Elo model) that player i wins the match t against player j and q_{i,j}(t) is its implied probability obtained as the reciprical of the Bet365 odds. The implied probability q_{i,j}(t) is assumed to be greater than q. If q=0, all the players are considered. If q increases, heavy longshot players are excluded. Once got the number of matches satisfying the previously described strategy, each player (i and j) on which place a bet is randomly selected. Then the ROI of this strategy is stored. Finally, the mean of the ROI obtained from repeating this operation B times is reported.

Usage

  1 2 3 4 5 6 7 8 9 10 11 random_betting( x, r, q, model, bets = "Best_odds", B = 10000, start_oos = NULL, end_oos = NULL, values = "NO" ) 

Arguments

 x List including the best odds and the players i and j obtained from the welofit function r Vector or scalar identifying the threshold of the ratio between the estimated and the implied probability (see above) q Scalar parameter used to exclude the heavy underdogs signalled by B365 bookmaker. No bets will be placed on those matches where players have odds smaller than q model Valid choices are: "WELO" and "ELO" bets optional Parameter identifying on which type of odds the bet is placed. Default to "Best_odds". Valid choices are: "Best_odds", "Avg_odds" and "B365_odds". "Best_odds" are the highest odds available. "Avg_odds" are the average odds and "B365_odds" are the Bet365 odds B optional Number of replicates to calculate the overall mean ROI. Default to 10000 start_oos optional Character parameter denoting the starting year for the bets. If included (default to NULL), then the bets will be placed on matches starting in that year. It has to be formatted as "yyyy" end_oos optional Character parameter denoting the ending year for the bets. If included (default to NULL), then the bets will be placed on matches included in the period "start_oos/end_oos". It has to be formatted as "yyyy" values optional If it is "YES", then random_betting returns the ROI for each replicate B. Otherwise, it returns the average. Default to "NO"

Value

By default, the mean of the ROI (in percentage) across the B values. Alternately, it returns the ROI for each B replicate (setting parameter 'values' to 'YES')

Examples

 1 2 3 4 5 data(atp_2019) db_clean<-clean(atp_2019) db_est<-welofit(db_clean) rand_bets<-random_betting(db_est,r=c(1.1,1.2,1.3),q=0.3,model="WELO",B=1000,values="NO") rand_bets 

welo documentation built on Oct. 12, 2021, 5:08 p.m.