Will this code give correct ROI for cash gane?

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Will this code give correct ROI for cash gane?

Postby Ricardo » Fri Dec 05, 2008 1:01 pm

ROI is return on investment on hand. I want it to be the net dollars gained over all hands divided by the total amount of dollars (bets, posted blinds, raises etc) a player risked on all hands in a cash game. Will these simple equations calculate that correctly?

column->>>amt_bet_ttl_sum =sum(holdem_hand_player_detail.amt_bet_ttl)
statistic->>ROI=amt_won / amt_bet_ttl_sum

Thanks to anyone who can check it.
Ricardo
 
Posts: 36
Joined: Thu May 01, 2008 2:38 pm

Re: Will this code give correct ROI for cash gane?

Postby kraada » Fri Dec 05, 2008 1:09 pm

Assuming amt_bet_ttl_sum is just a straight sum of how much you bet for the hand in question, you're close but not quite.

It wouldn't include blinds, as those aren't money you actively bet.

Though since the investment from the blinds is forced, you might not really want them in there anyway. And if you decide you don't, this should work fine, just add it to the Known Starting Hands Summary report.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Will this code give correct ROI for cash gane?

Postby Ricardo » Fri Dec 05, 2008 1:24 pm

Thanks for the quick reply.
Amt_won accounts for a players posted blinds, I think. So I think I do need to include the amount of dollars posted in the blinds in the denominator. Otherwise this ROI stat will be a biased upward. I'll look for an SQL variable for posted blind $ or some other way to get them in. I someone knows a simple solution, please post.
Ricardo
 
Posts: 36
Joined: Thu May 01, 2008 2:38 pm

Re: Will this code give correct ROI for cash gane?

Postby kraada » Fri Dec 05, 2008 1:51 pm

You can add in holdem_hand_player_detail.amt_blind to add in the amount of the blinds (sorry, I should've said that the first time :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Will this code give correct ROI for cash gane?

Postby Ricardo » Fri Dec 05, 2008 1:57 pm

Thanks I did this. Got amt_blind from a column may be from some other stat.

roi= amt_won / (amt_bet_ttl_sum+amt_blind)
Ricardo
 
Posts: 36
Joined: Thu May 01, 2008 2:38 pm

Re: Will this code give correct ROI for cash gane?

Postby kraada » Fri Dec 05, 2008 2:06 pm

It's a built in column in PT3.

Enjoy your new stat :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Will this code give correct ROI for cash gane?

Postby kraada » Fri Dec 05, 2008 6:42 pm

Double posting so it'll show as a new post: It's been brought to my attention via another thread that you don't actually need to add in amt_blind to get the right number (and in fact adding it will double count the blinds).

Sorry for the misleading information.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 1 guest