betting | R Documentation |
Places bets using the WElo and Elo probabilities, on the basis of two thresholds r
and q
, according to \insertCiteangelini2021weighted;textualwelo.
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.
In general, higher thresholds r
and q
imply less betting opportunities.
betting(
x,
r,
q,
model,
bets = "Best_odds",
R = 2000,
alpha = 0.1,
start_oos = NULL,
end_oos = NULL
)
x |
an object of class 'welo', obtained from the |
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 Bet365 bookmaker.
No bets will be placed on those matches where players have implied probabilities smaller than |
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 for that match and "B365_odds" are the Bet365 odds |
R |
optional Number of bootstrap replicates to calculate the confidence intervals. Default to 2000 |
alpha |
optional Significance level for the boostrap confidence intervals. Default to 0.1 |
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" |
A matrix including the number of bets placed, the Return-on-Investiment (ROI), expressed in percentage, and its boostrap confidence interval,
calculated using R
replicates and the significance level \alpha
.
data(atp_2019)
db_clean<-clean(atp_2019)
db_est<-welofit(db_clean)
bets<-betting(db_est,r=c(1.1,1.2,1.3),q=0.3,model="WELO")
bets
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.