Calculation of average ROI

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Calculation of average ROI

Postby dumbFred » Mon Nov 08, 2021 7:45 pm

Hi everyone,

I'd like to add a custom stat in order to calculate my average ROI for all the tournaments I played.
Something like : Sum (ROI_per_tournament) / nb_tournaments_played

There is an available custom stat that seems to fit provided by kraada, with the following formula:
(amt_tourney_roi / cnt_tourneys) * 100

But when I use it I get an error code:

Unable to execute query: Fatal Error; Reason: Error: (ERROR: column tourney_results.cnt_bounty does not exist LINE 1: ...unmary.val_curr_conv *(tourney_results.amt_won + tourney_re...

Thank for the help.
Fred
dumbFred
 
Posts: 9
Joined: Thu Feb 26, 2015 5:09 am

Re: Calculation of average ROI

Postby Flag_Hippo » Wed Nov 10, 2021 9:55 am

The database schema for recording bounties has changed since that custom statistic was uploaded. The issue can be resolved by changing the two instances of tourney_results.cnt_bounty to tourney_results.val_bounty in the amt_tourney_roi custom column (Configure -> Statistics -> Columns).
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Calculation of average ROI

Postby dumbFred » Thu Nov 18, 2021 5:53 pm

Thank you Flag that solved the issue.

Now for a sample of 7 tournaments:

BUY IN NET WON ROI
1,00 € -1,00 € -100%
10,00 € -10,00 € -100%
20,00 € -15,50 € -78%
2,00 € 18,00 € 900%
5,00 € 11,26 € 225%
5,00 € 19,16 € 383%
10,00 € -10,00 € -100%

I manually calculate:
ROI 22,49%
Avg ROI 162%

While the result provided by the formula of amt_tourney_roi / cnt_tourneys is: 322,51% for the same sample.

The formula behind amt_tourney_roi is the following:

sum(if[tourney_summary.val_curr_conv!=0, (tourney_summary.val_curr_conv * (tourney_results.amt_won + tourney_results.val_bounty * tourney_summary.amt_bounty) - tourney_summary.val_curr_conv * tourney_summary.amt_buyin) / tourney_summary.val_curr_conv * tourney_summary.amt_buyin, if[currency_tourney_toglobal[tourney_summary.amt_buyin, tourney_summary.currency] != 0, (currency_tourney_toglobal[tourney_results.amt_won + tourney_results.val_bounty * tourney_summary.amt_bounty, tourney_summary.currency] - currency_tourney_toglobal[tourney_summary.amt_buyin, tourney_summary.currency]) / currency_tourney_toglobal[tourney_summary.amt_buyin, tourney_summary.currency], 0]])

Can you help to understand why the result is not the same between my calculation and the added statistic calculation ?

Thank you very much.
dumbFred
 
Posts: 9
Joined: Thu Feb 26, 2015 5:09 am

Re: Calculation of average ROI

Postby Flag_Hippo » Fri Nov 19, 2021 6:42 am

dumbFred wrote:I manually calculate:
ROI 22,49%
Avg ROI 162%

That works for me:

avgroi.PNG
avgroi.PNG (6.19 KiB) Viewed 420 times

Rebuild your custom database cache (Database -> Database Management -> Rebuild Cache -> Custom Cache Rebuild) otherwise open a Support Ticket and attach relevant screenshot(s), your custom statistic and the tournament hand histories:

Tutorial: Reporting A Problem
Flag_Hippo
Moderator
 
Posts: 14441
Joined: Tue Jan 31, 2012 7:50 am

Re: Calculation of average ROI

Postby dumbFred » Sun Nov 21, 2021 5:05 pm

Still doesn't work for me. I'll open a ticket.
Thanks again
dumbFred
 
Posts: 9
Joined: Thu Feb 26, 2015 5:09 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 32 guests

cron
highfalutin