-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the strategy more sensible #72
Conversation
This makes the strategy more sensible and potentially more profitable.
bet_amount = self.params.get_bet_amount(confidence) | ||
fee = self.synchronized_data.sampled_bet.fee | ||
return bet_amount - fee >= bet_threshold | ||
potential_net_profit = num_shares - net_bet_amount - mech_price - bet_threshold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the mech's price should be removed from the profitability calculation as this has already been paid.
If 0 < num_shares - net_bet_amount - bet_threshold < mech_price
, then the service would at least have a chance to cover a part of the mech's costs plus the threshold's amount.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! We need to add the mech cost to the outer decision making problem later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def _calc_binary_shares(self, net_bet_amount: int, vote: int) -> Tuple[int, int]: | ||
"""Calculate the claimed shares. This calculation only works for binary markets.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output of this method was tested with multiple examples and the returned number of shares is accurate.
Add slippage
Fix exception handling
Makes the strategy more sensible and potentially more profitable.