random_betting {welo}R Documentation

Random betting function

Description

Places bets on players ii and jj 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 ii for all the matches where it holds that

p^i,j(t)qi,j(t)>r,\frac{\hat{p}_{i,j}(t)}{q_{i,j}(t)} > r,

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

Usage

random_betting(
  x,
  r,
  q,
  model,
  bets = "Best_odds",
  B = 10000,
  start_oos = NULL,
  end_oos = NULL
)

Arguments

x

an object of class 'welo', 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 qq

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"

Value

A matrix reporting the number of bets and the mean of the ROI (in percentage) across the BB values for every threshold r used

Examples


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)
rand_bets


[Package welo version 0.1.4 Index]